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 #include "disc_approach_ble.h"
17 #include "disc_event_manager.h"
18 #include "disc_log.h"
19 #include "disc_touch_ble.h"
20 #include "disc_virtual_link_ble.h"
21 #include "softbus_error_code.h"
22 
DiscEventManagerInit(void)23 int32_t DiscEventManagerInit(void)
24 {
25     int32_t ret = DiscApproachBleEventInit();
26     DISC_CHECK_AND_RETURN_RET_LOGE(ret == SOFTBUS_OK, ret, DISC_INIT, "init approach ble event failed");
27 
28     ret = DiscVLinkBleEventInit();
29     DISC_CHECK_AND_RETURN_RET_LOGE(ret == SOFTBUS_OK, ret, DISC_INIT, "init vlink ble event failed");
30 
31     ret = DiscTouchBleEventInit();
32     DISC_CHECK_AND_RETURN_RET_LOGE(ret == SOFTBUS_OK, ret, DISC_INIT, "init touch ble event failed");
33 
34     DISC_LOGI(DISC_INIT, "disc event manager init succ");
35     return SOFTBUS_OK;
36 }
37 
DiscEventManagerDeinit(void)38 void DiscEventManagerDeinit(void)
39 {
40     DiscApproachBleEventDeinit();
41     DiscVLinkBleEventDeinit();
42     DiscTouchBleEventDeinit();
43 }
44 
45