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 "nstackx.h"
17
18 #include "nstackx_error.h"
19
NSTACKX_RegisterDevice(const NSTACKX_LocalDeviceInfo * localDeviceInfo)20 int32_t NSTACKX_RegisterDevice(const NSTACKX_LocalDeviceInfo *localDeviceInfo)
21 {
22 (void)localDeviceInfo;
23 return NSTACKX_EOK;
24 }
25
NSTACKX_RegisterDeviceName(const char * devName)26 int32_t NSTACKX_RegisterDeviceName(const char *devName)
27 {
28 (void)devName;
29 return NSTACKX_EOK;
30 }
31
NSTACKX_RegisterDeviceAn(const NSTACKX_LocalDeviceInfo * localDeviceInfo,uint64_t deviceHash)32 int32_t NSTACKX_RegisterDeviceAn(const NSTACKX_LocalDeviceInfo *localDeviceInfo, uint64_t deviceHash)
33 {
34 (void)localDeviceInfo;
35 (void)deviceHash;
36 return NSTACKX_EOK;
37 }
38
NSTACKX_RegisterDeviceV2(const NSTACKX_LocalDeviceInfoV2 * localDeviceInfo)39 int32_t NSTACKX_RegisterDeviceV2(const NSTACKX_LocalDeviceInfoV2 *localDeviceInfo)
40 {
41 (void)localDeviceInfo;
42 return NSTACKX_EOK;
43 }
44
NSTACKX_DFinderSetEventFunc(void * softobj,DFinderEventFunc func)45 int NSTACKX_DFinderSetEventFunc(void *softobj, DFinderEventFunc func)
46 {
47 (void)softobj;
48 (void)func;
49 return NSTACKX_EOK;
50 }
51
NSTACKX_DFinderDump(const char ** argv,uint32_t argc,void * softObj,DFinderDumpFunc dump)52 int NSTACKX_DFinderDump(const char **argv, uint32_t argc, void *softObj, DFinderDumpFunc dump)
53 {
54 (void)argv;
55 (void)argc;
56 (void)softObj;
57 (void)dump;
58 return NSTACKX_EOK;
59 }
60
NSTACKX_Init(const NSTACKX_Parameter * parameter)61 int32_t NSTACKX_Init(const NSTACKX_Parameter *parameter)
62 {
63 (void)parameter;
64 return NSTACKX_EOK;
65 }
66
NSTACKX_InitV2(const NSTACKX_Parameter * parameter,bool isNotifyPerDevice)67 int32_t NSTACKX_InitV2(const NSTACKX_Parameter *parameter, bool isNotifyPerDevice)
68 {
69 (void)parameter;
70 (void)isNotifyPerDevice;
71 return NSTACKX_EOK;
72 }
73
NSTACKX_ThreadInit(void)74 int32_t NSTACKX_ThreadInit(void)
75 {
76 return NSTACKX_EOK;
77 }
78
NSTACKX_ThreadDeinit(void)79 void NSTACKX_ThreadDeinit(void)
80 {
81 return;
82 }
83
NSTACKX_Deinit(void)84 void NSTACKX_Deinit(void)
85 {
86 return;
87 }
88
NSTACKX_StartDeviceFind(void)89 int32_t NSTACKX_StartDeviceFind(void)
90 {
91 return NSTACKX_EOK;
92 }
93
NSTACKX_StartDeviceFindAn(uint8_t mode)94 int32_t NSTACKX_StartDeviceFindAn(uint8_t mode)
95 {
96 (void)mode;
97 return NSTACKX_EOK;
98 }
99
NSTACKX_StopDeviceFind(void)100 int32_t NSTACKX_StopDeviceFind(void)
101 {
102 return NSTACKX_EOK;
103 }
104
NSTACKX_SubscribeModule(void)105 int32_t NSTACKX_SubscribeModule(void)
106 {
107 return NSTACKX_EOK;
108 }
109
NSTACKX_UnsubscribeModule(void)110 int32_t NSTACKX_UnsubscribeModule(void)
111 {
112 return NSTACKX_EOK;
113 }
114
NSTACKX_RegisterCapability(uint32_t capabilityBitmapNum,uint32_t capabilityBitmap[])115 int32_t NSTACKX_RegisterCapability(uint32_t capabilityBitmapNum, uint32_t capabilityBitmap[])
116 {
117 (void)capabilityBitmapNum;
118 (void)capabilityBitmap;
119 return NSTACKX_EOK;
120 }
121
NSTACKX_SetFilterCapability(uint32_t capabilityBitmapNum,uint32_t capabilityBitmap[])122 int32_t NSTACKX_SetFilterCapability(uint32_t capabilityBitmapNum, uint32_t capabilityBitmap[])
123 {
124 (void)capabilityBitmapNum;
125 (void)capabilityBitmap;
126 return NSTACKX_EOK;
127 }
128
NSTACKX_SetDeviceListAgingTime(uint32_t agingTime)129 int32_t NSTACKX_SetDeviceListAgingTime(uint32_t agingTime)
130 {
131 (void)agingTime;
132 return NSTACKX_EOK;
133 }
134
NSTACKX_SetMaxDeviceNum(uint32_t maxDeviceNum)135 int32_t NSTACKX_SetMaxDeviceNum(uint32_t maxDeviceNum)
136 {
137 (void)maxDeviceNum;
138 return NSTACKX_EOK;
139 }
140
NSTACKX_ScreenStatusChange(bool isScreenOn)141 int32_t NSTACKX_ScreenStatusChange(bool isScreenOn)
142 {
143 (void)isScreenOn;
144 return NSTACKX_EOK;
145 }
146
NSTACKX_RegisterServiceData(const char * serviceData)147 int32_t NSTACKX_RegisterServiceData(const char *serviceData)
148 {
149 (void)serviceData;
150 return NSTACKX_EOK;
151 }
152
NSTACKX_RegisterBusinessData(const char * businessData)153 int32_t NSTACKX_RegisterBusinessData(const char *businessData)
154 {
155 (void)businessData;
156 return NSTACKX_EOK;
157 }
158
NSTACKX_RegisterExtendServiceData(const char * extendServiceData)159 int32_t NSTACKX_RegisterExtendServiceData(const char *extendServiceData)
160 {
161 (void)extendServiceData;
162 return NSTACKX_EOK;
163 }
164
NSTACKX_SendMsg(const char * moduleName,const char * deviceId,const uint8_t * data,uint32_t len)165 int32_t NSTACKX_SendMsg(const char *moduleName, const char *deviceId, const uint8_t *data,
166 uint32_t len)
167 {
168 (void)moduleName;
169 (void)deviceId;
170 (void)data;
171 (void)len;
172 return NSTACKX_EOK;
173 }
174
NSTACKX_SendMsgDirect(const char * moduleName,const char * deviceId,const uint8_t * data,uint32_t len,const char * ipaddr,uint8_t sendType)175 int32_t NSTACKX_SendMsgDirect(const char *moduleName, const char *deviceId, const uint8_t *data,
176 uint32_t len, const char *ipaddr, uint8_t sendType)
177 {
178 (void)moduleName;
179 (void)deviceId;
180 (void)data;
181 (void)len;
182 (void)ipaddr;
183 (void)sendType;
184 return NSTACKX_EOK;
185 }
186
NSTACKX_GetDeviceList(NSTACKX_DeviceInfo * deviceList,uint32_t * deviceCountPtr)187 int32_t NSTACKX_GetDeviceList(NSTACKX_DeviceInfo *deviceList, uint32_t *deviceCountPtr)
188 {
189 (void)deviceList;
190 (void)deviceCountPtr;
191 return NSTACKX_EOK;
192 }
193
NSTACKX_InitRestart(const NSTACKX_Parameter * parameter)194 int32_t NSTACKX_InitRestart(const NSTACKX_Parameter *parameter)
195 {
196 (void)parameter;
197 return NSTACKX_EOK;
198 }
199
NSTACKX_StartDeviceFindRestart(void)200 void NSTACKX_StartDeviceFindRestart(void)
201 {
202 return;
203 }
204
NSTACKX_StartDeviceDiscovery(const NSTACKX_DiscoverySettings * discoverySettings)205 int32_t NSTACKX_StartDeviceDiscovery(const NSTACKX_DiscoverySettings *discoverySettings)
206 {
207 (void)discoverySettings;
208 return NSTACKX_EOK;
209 }
210
NSTACKX_StartDeviceDiscoveryWithConfig(const DFinderDiscConfig * discConfig)211 int32_t NSTACKX_StartDeviceDiscoveryWithConfig(const DFinderDiscConfig *discConfig)
212 {
213 (void)discConfig;
214 return NSTACKX_EOK;
215 }
216
NSTACKX_SendDiscoveryRsp(const NSTACKX_ResponseSettings * responseSettings)217 int32_t NSTACKX_SendDiscoveryRsp(const NSTACKX_ResponseSettings *responseSettings)
218 {
219 (void)responseSettings;
220 return NSTACKX_EOK;
221 }
222
NSTACKX_SendNotification(const NSTACKX_NotificationConfig * config)223 int32_t NSTACKX_SendNotification(const NSTACKX_NotificationConfig *config)
224 {
225 (void)config;
226 return NSTACKX_EOK;
227 }
228
NSTACKX_StopSendNotification(uint8_t businessType)229 int32_t NSTACKX_StopSendNotification(uint8_t businessType)
230 {
231 (void)businessType;
232 return NSTACKX_EOK;
233 }
234
NSTACKX_DFinderRegisterLog(DFinderLogCallback userLogCallback)235 int32_t NSTACKX_DFinderRegisterLog(DFinderLogCallback userLogCallback)
236 {
237 (void)userLogCallback;
238 return NSTACKX_EOK;
239 }
240
NSTACKX_RegisterDeviceHash(uint64_t deviceHash)241 int32_t NSTACKX_RegisterDeviceHash(uint64_t deviceHash)
242 {
243 (void)deviceHash;
244 return NSTACKX_EOK;
245 }
246
NSTACKX_RegisterServiceDataV2(const struct NSTACKX_ServiceData * param,uint32_t cnt)247 int32_t NSTACKX_RegisterServiceDataV2(const struct NSTACKX_ServiceData *param, uint32_t cnt)
248 {
249 (void)param;
250 (void)cnt;
251 return NSTACKX_EOK;
252 }