1 /*
2  * Copyright (c) 2021 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 SOFTBUS_HIDUMPER_TRANS_H
17 #define SOFTBUS_HIDUMPER_TRANS_H
18 
19 #include "softbus_app_info.h"
20 #include "softbus_hidumper.h"
21 
22 #ifdef __cplusplus
23 #if __cplusplus
24 extern "C" {
25 #endif
26 #endif
27 
28 typedef enum {
29     DUMPER_LANE_BR = 0x0,
30     DUMPER_LANE_BLE,
31     DUMPER_LANE_P2P,
32     DUMPER_LANE_WLAN,
33     DUMPER_LANE_ETH,
34     DUMPER_LANE_LINK_TYPE_BUTT,
35 }TransDumpLaneLinkType;
36 
37 typedef void(*ShowDumpInfosFunc)(int fd);
38 
39 int32_t SoftBusRegTransVarDump(const char* dumpVar, SoftBusVarDumpCb cb);
40 
41 void SoftBusTransDumpRegisterSession(int fd, const char* pkgName, const char* sessionName,
42     int uid, int pid);
43 
44 void SoftBusTransDumpRunningSession(int fd, TransDumpLaneLinkType type, AppInfo* appInfo);
45 
46 int32_t SoftBusTransDumpHandlerInit(void);
47 
48 void SoftBusHiDumperTransDeInit(void);
49 
50 #ifdef __cplusplus
51 #if __cplusplus
52 }
53 #endif /* __cplusplus */
54 #endif /* __cplusplus */
55 #endif /* SOFTBUS_HIDUMPER_TRANS_H */