1 /* 2 * Copyright (c) 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 SOFTBUS_EVENT_H 17 #define SOFTBUS_EVENT_H 18 19 #include <stdlib.h> 20 21 #include "form/softbus_event_form.h" 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 #define CONN_EVENT_NAME "CONNECTION_BEHAVIOR" 28 #define DISC_EVENT_NAME "DISCOVER_BEHAVIOR" 29 #define LNN_EVENT_NAME "BUSCENTER_BEHAVIOR" 30 #define TRANS_EVENT_NAME "TRANSPORT_BEHAVIOR" 31 #define MANAGE_ALARM_EVENT_NAME "SOFTBUS_MANAGE_ALERT" 32 #define CONTROL_ALARM_EVENT_NAME "SOFTBUS_CONTROL_ALERT" 33 #define STATS_EVENT_NAME "SOFTBUS_STATISTIC" 34 35 #define CONN_AUDIT_NAME "CONNECTION_AUDIT" 36 #define DISC_AUDIT_NAME "DISCOVER_AUDIT" 37 #define LNN_AUDIT_NAME "BUSCENTER_AUDIT" 38 #define TRANS_AUDIT_NAME "TRANSPORT_AUDIT" 39 40 typedef enum { 41 EVENT_MODULE_CONN, 42 EVENT_MODULE_DISC, 43 EVENT_MODULE_LNN, 44 EVENT_MODULE_TRANS, 45 EVENT_MODULE_TRANS_ALARM, 46 EVENT_MODULE_CONN_ALARM, 47 EVENT_MODULE_LNN_ALARM, 48 EVENT_MODULE_DISC_ALARM, 49 EVENT_MODULE_STATS, 50 EVENT_MODULE_MAX, 51 } SoftbusEventModule; 52 53 void SoftbusEventInner(SoftbusEventModule module, SoftbusEventForm *form); 54 55 void SoftbusAuditInner(SoftbusEventModule module, SoftbusEventForm *form); 56 57 #ifdef __cplusplus 58 } 59 #endif /* __cplusplus */ 60 #endif // SOFTBUS_EVENT_H 61