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 
18 #include "disc_manager.h"
19 #include "softbus_errcode.h"
20 
ApproachBleStartActivePublish(const PublishOption * option)21 static int32_t ApproachBleStartActivePublish(const PublishOption *option)
22 {
23     (void)option;
24     return SOFTBUS_NOT_IMPLEMENT;
25 }
26 
ApproachBleStartPassivePublish(const PublishOption * option)27 static int32_t ApproachBleStartPassivePublish(const PublishOption *option)
28 {
29     (void)option;
30     return SOFTBUS_NOT_IMPLEMENT;
31 }
32 
ApproachBleStopActivePublish(const PublishOption * option)33 static int32_t ApproachBleStopActivePublish(const PublishOption *option)
34 {
35     (void)option;
36     return SOFTBUS_NOT_IMPLEMENT;
37 }
38 
ApproachBleStopPassivePublish(const PublishOption * option)39 static int32_t ApproachBleStopPassivePublish(const PublishOption *option)
40 {
41     (void)option;
42     return SOFTBUS_NOT_IMPLEMENT;
43 }
44 
ApproachBleStartActiveDiscovery(const SubscribeOption * option)45 static int32_t ApproachBleStartActiveDiscovery(const SubscribeOption *option)
46 {
47     (void)option;
48     return SOFTBUS_NOT_IMPLEMENT;
49 }
50 
ApproachBleStartPassiveDiscovery(const SubscribeOption * option)51 static int32_t ApproachBleStartPassiveDiscovery(const SubscribeOption *option)
52 {
53     (void)option;
54     return SOFTBUS_NOT_IMPLEMENT;
55 }
56 
ApproachBleStopPassiveDiscovery(const SubscribeOption * option)57 static int32_t ApproachBleStopPassiveDiscovery(const SubscribeOption *option)
58 {
59     (void)option;
60     return SOFTBUS_NOT_IMPLEMENT;
61 }
62 
ApproachBleStopActiveDiscovery(const SubscribeOption * option)63 static int32_t ApproachBleStopActiveDiscovery(const SubscribeOption *option)
64 {
65     (void)option;
66     return SOFTBUS_NOT_IMPLEMENT;
67 }
68 
ApproachBleLinkStatusChanged(LinkStatus status)69 static void ApproachBleLinkStatusChanged(LinkStatus status)
70 {
71     (void)status;
72 }
73 
ApproachBleUpdateLocalDeviceInfo(InfoTypeChanged type)74 static void ApproachBleUpdateLocalDeviceInfo(InfoTypeChanged type)
75 {
76     (void)type;
77 }
78 
ApproachBleIsConcern(uint32_t capability)79 static bool ApproachBleIsConcern(uint32_t capability)
80 {
81     (void)capability;
82     return false;
83 }
84 
85 static DiscoveryFuncInterface g_discApproachFuncInterface = {
86     .Publish = ApproachBleStartActivePublish,
87     .StartScan = ApproachBleStartPassivePublish,
88     .Unpublish = ApproachBleStopActivePublish,
89     .StopScan = ApproachBleStopPassivePublish,
90     .StartAdvertise = ApproachBleStartActiveDiscovery,
91     .Subscribe = ApproachBleStartPassiveDiscovery,
92     .Unsubscribe = ApproachBleStopPassiveDiscovery,
93     .StopAdvertise = ApproachBleStopActiveDiscovery,
94     .LinkStatusChanged = ApproachBleLinkStatusChanged,
95     .UpdateLocalDeviceInfo = ApproachBleUpdateLocalDeviceInfo
96 };
97 
98 static DiscoveryBleDispatcherInterface g_approachBleInterface = {
99     .IsConcern = ApproachBleIsConcern,
100     .mediumInterface = &g_discApproachFuncInterface,
101 };
102 
DiscApproachBleInit(DiscInnerCallback * discInnerCb)103 DiscoveryBleDispatcherInterface *DiscApproachBleInit(DiscInnerCallback *discInnerCb)
104 {
105     (void)discInnerCb;
106     return &g_approachBleInterface;
107 }
108 
DiscApproachBleDeinit(void)109 void DiscApproachBleDeinit(void)
110 {
111 }
112 
DiscApproachBleEventInit(void)113 int32_t DiscApproachBleEventInit(void)
114 {
115     return SOFTBUS_OK;
116 }
117 
DiscApproachBleEventDeinit(void)118 void DiscApproachBleEventDeinit(void)
119 {
120 }
121 
122