1/* 2 * Copyright (c) 2022-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16#ifndef BYTRACE_ADAPTER_H 17#define BYTRACE_ADAPTER_H 18 19#include <cstring> 20#ifdef MSDP_HIVIEWDFX_HITRACE_ENABLE 21#include "hitrace_meter.h" 22#endif // MSDP_HIVIEWDFX_HITRACE_ENABLE 23 24namespace OHOS { 25namespace Msdp { 26namespace DeviceStatus { 27class BytraceAdapter { 28public: 29 enum TraceBtn { 30 TRACE_STOP = 0, 31 TRACE_START = 1 32 }; 33 enum SubscribeType { 34 SUBSCRIBE, 35 UNSUBSCRIBE 36 }; 37 enum SubscribeObject { 38 CLIENT, 39 SERVICE 40 }; 41 42 static void StartBytrace(TraceBtn traceBtn, SubscribeType subscribeType, SubscribeObject subscribeObject); 43}; 44} // namespace DeviceStatus 45} // namespace MSDP 46} // namespace OHOS 47#endif // BYTRACE_ADAPTER_H 48