1 /*
2  * Copyright (c) 2022 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  * miscservices under the License is miscservices 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 #ifndef HISYSEVENT_TRANS_REPORTER_H
16 #define HISYSEVENT_TRANS_REPORTER_H
17 
18 #include <stdint.h>
19 #include "softbus_adapter_hisysevent.h"
20 
21 #ifdef __cplusplus
22 #if __cplusplus
23 extern "C" {
24 #endif
25 #endif
26 
27 typedef enum {
28     SOFTBUS_EVT_OPEN_SESSION_SUCC,
29     SOFTBUS_EVT_OPEN_SESSION_FAIL,
30 } SoftBusOpenSessionStatus;
31 
32 void SoftbusRecordCalledApiInfo(const char *appName, uint32_t code);
33 
34 void SoftbusRecordCalledApiCnt(uint32_t code);
35 
36 void SoftbusRecordOpenSessionKpi(const char *pkgName, int32_t linkType, SoftBusOpenSessionStatus isSucc, int64_t time);
37 
38 void SoftbusRecordOpenSession(SoftBusOpenSessionStatus isSucc, uint32_t time);
39 
40 void SoftbusReportTransErrorEvt(int32_t errcode);
41 
42 void SoftbusReportTransInfoEvt(const char *infoMsg);
43 
44 int32_t InitTransStatisticSysEvt(void);
45 
46 void DeinitTransStatisticSysEvt(void);
47 
48 int64_t GetSoftbusRecordTimeMillis(void);
49 
50 #ifdef __cplusplus
51 #if __cplusplus
52 }
53 #endif /* __cplusplus */
54 #endif /* __cplusplus */
55 
56 #endif /* HISYSEVENT_TRANS_REPORTER_H */