1 /*
2 * Copyright (c) 2024 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_touch_ble.h"
17
18 #include "disc_manager.h"
19 #include "softbus_errcode.h"
20
TouchBleStartActivePublish(const PublishOption * option)21 static int32_t TouchBleStartActivePublish(const PublishOption *option)
22 {
23 (void)option;
24 return SOFTBUS_NOT_IMPLEMENT;
25 }
26
TouchBleStartPassivePublish(const PublishOption * option)27 static int32_t TouchBleStartPassivePublish(const PublishOption *option)
28 {
29 (void)option;
30 return SOFTBUS_NOT_IMPLEMENT;
31 }
32
TouchBleStopActivePublish(const PublishOption * option)33 static int32_t TouchBleStopActivePublish(const PublishOption *option)
34 {
35 (void)option;
36 return SOFTBUS_NOT_IMPLEMENT;
37 }
38
TouchBleStopPassivePublish(const PublishOption * option)39 static int32_t TouchBleStopPassivePublish(const PublishOption *option)
40 {
41 (void)option;
42 return SOFTBUS_NOT_IMPLEMENT;
43 }
44
TouchBleStartActiveDiscovery(const SubscribeOption * option)45 static int32_t TouchBleStartActiveDiscovery(const SubscribeOption *option)
46 {
47 (void)option;
48 return SOFTBUS_NOT_IMPLEMENT;
49 }
50
TouchBleStartPassiveDiscovery(const SubscribeOption * option)51 static int32_t TouchBleStartPassiveDiscovery(const SubscribeOption *option)
52 {
53 (void)option;
54 return SOFTBUS_NOT_IMPLEMENT;
55 }
56
TouchBleStopPassiveDiscovery(const SubscribeOption * option)57 static int32_t TouchBleStopPassiveDiscovery(const SubscribeOption *option)
58 {
59 (void)option;
60 return SOFTBUS_NOT_IMPLEMENT;
61 }
62
TouchBleStopActiveDiscovery(const SubscribeOption * option)63 static int32_t TouchBleStopActiveDiscovery(const SubscribeOption *option)
64 {
65 (void)option;
66 return SOFTBUS_NOT_IMPLEMENT;
67 }
68
TouchBleLinkStatusChanged(LinkStatus status)69 static void TouchBleLinkStatusChanged(LinkStatus status)
70 {
71 (void)status;
72 }
73
TouchBleUpdateLocalDeviceInfo(InfoTypeChanged type)74 static void TouchBleUpdateLocalDeviceInfo(InfoTypeChanged type)
75 {
76 (void)type;
77 }
78
TouchBleIsConcern(uint32_t capability)79 static bool TouchBleIsConcern(uint32_t capability)
80 {
81 (void)capability;
82 return false;
83 }
84
85 static DiscoveryFuncInterface g_discTouchFuncInterface = {
86 .Publish = TouchBleStartActivePublish,
87 .StartScan = TouchBleStartPassivePublish,
88 .Unpublish = TouchBleStopActivePublish,
89 .StopScan = TouchBleStopPassivePublish,
90 .StartAdvertise = TouchBleStartActiveDiscovery,
91 .Subscribe = TouchBleStartPassiveDiscovery,
92 .Unsubscribe = TouchBleStopPassiveDiscovery,
93 .StopAdvertise = TouchBleStopActiveDiscovery,
94 .LinkStatusChanged = TouchBleLinkStatusChanged,
95 .UpdateLocalDeviceInfo = TouchBleUpdateLocalDeviceInfo
96 };
97
98 static DiscoveryBleDispatcherInterface g_touchBleInterface = {
99 .IsConcern = TouchBleIsConcern,
100 .mediumInterface = &g_discTouchFuncInterface,
101 };
102
DiscTouchBleInit(DiscInnerCallback * discInnerCb)103 DiscoveryBleDispatcherInterface *DiscTouchBleInit(DiscInnerCallback *discInnerCb)
104 {
105 (void)discInnerCb;
106 return &g_touchBleInterface;
107 }
108
DiscTouchBleDeinit(void)109 void DiscTouchBleDeinit(void)
110 {
111 }
112
DiscTouchBleEventInit(void)113 int32_t DiscTouchBleEventInit(void)
114 {
115 return SOFTBUS_OK;
116 }
117
DiscTouchBleEventDeinit(void)118 void DiscTouchBleEventDeinit(void)
119 {
120 }
121
122