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 HITRACE_ADAPTER_H
17 #define HITRACE_ADAPTER_H
18 
19 #define TRACE_TAG_CALL_ADD_MEMBER "CallAddMember"
20 #define TRACE_TAG_CALL_AUTH_DEVICE "CallAuthDevice"
21 #define TRACE_TAG_CALL_PROCESS_BIND_DATA "CallProcessBindData"
22 #define TRACE_TAG_CALL_PROCESS_AUTH_DATA "CallProcessAuthData"
23 #define TRACE_TAG_PROC_ADD_MEMBER_WORK_TASK "ProcAddMemberWorkTask"
24 #define TRACE_TAG_PROC_BIND_DATA_WORK_TASK "ProcBindDataWorkTask"
25 #define TRACE_TAG_PROC_AUTH_DEVICE_WORK_TASK "ProcAuthDeviceWorkTask"
26 #define TRACE_TAG_PROC_AUTH_DATA_WORK_TASK "ProcAuthDataWorkTask"
27 #define TRACE_TAG_CREATE_SESSION "CreateSession"
28 #define TRACE_TAG_PROCESS_SESSION "ProcessSession"
29 #define TRACE_TAG_ON_SESSION_FINISH "OnSessionFinish"
30 #define TRACE_TAG_CREATE_KEY_PAIR "CreateKeyPair"
31 #define TRACE_TAG_OPEN_CHANNEL "OpenChannel"
32 #define TRACE_TAG_CHANNEL_OPENED "ChannelOpened"
33 #define TRACE_TAG_SEND_DATA "SendData"
34 #define TRACE_TAG_CREATE_AUTH_TASK "CreateAuthTask"
35 #define TRACE_TAG_PROCESS_AUTH_TASK "ProcessAuthTask"
36 #define TRACE_TAG_ON_REQUEST "OnRequest"
37 #define TRACE_TAG_ADD_TRUSTED_DEVICE "AddTrustedDevice"
38 
39 #ifndef DEV_AUTH_HIVIEW_ENABLE
40 
41 #define DEV_AUTH_START_TRACE(tag)
42 #define DEV_AUTH_FINISH_TRACE()
43 
44 #else
45 
46 #include <stdint.h>
47 
48 #define DEV_AUTH_START_TRACE(tag) DevAuthStartTrace(tag)
49 #define DEV_AUTH_FINISH_TRACE() DevAuthFinishTrace()
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
55 void DevAuthStartTrace(const char *value);
56 
57 void DevAuthFinishTrace(void);
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif
64 
65 #endif
66