blob: 86b8bdce2bfa0829fe657d55e7cfc14c5936a095 [file] [log] [blame]
Yilong Li5a3e3692020-12-01 10:23:29 -08001/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef __COMMON_TRACE_PROVIDER_FUCHSIA_H
18#define __COMMON_TRACE_PROVIDER_FUCHSIA_H
19
20#ifndef __Fuchsia__
21#error "TraceProviderFuchsia is only supported on Fuchsia!"
22#endif // __Fuchsia__
23
24#include <memory>
25
26#include <lib/async-loop/cpp/loop.h>
27#include <lib/trace-provider/provider.h>
28
29class TraceProviderFuchsia {
30public:
31 TraceProviderFuchsia();
32 ~TraceProviderFuchsia();
33
34 bool Initialize();
35
36private:
37 async::Loop mLoop;
38 std::unique_ptr<trace::TraceProvider> mTraceProvider;
39};
40
41#endif // __COMMON_TRACE_PROVIDER_FUCHSIA_H