|
35 | 35 | #include <Weave/Profiles/device-description/DeviceDescription.h>
|
36 | 36 | #include <Weave/Profiles/network-provisioning/NetworkProvisioning.h>
|
37 | 37 | #include <Weave/Profiles/network-provisioning/NetworkInfo.h>
|
| 38 | +#include <Weave/Profiles/network-provisioning/WirelessRegConfig.h> |
38 | 39 | #include <Weave/Profiles/security/WeaveSecurity.h>
|
39 | 40 | #include <Weave/Profiles/security/WeaveCASE.h>
|
40 | 41 | #include <Weave/Profiles/security/WeaveSig.h>
|
@@ -89,6 +90,7 @@ typedef void (*ConnectionClosedFunc)(WeaveDeviceManager *deviceMgr, void *appReq
|
89 | 90 | typedef void (*PairTokenCompleteFunct)(WeaveDeviceManager *deviceMgr, void *appReqState, const uint8_t *tokenPairingBundle, uint32_t tokenPairingBunldeLen);
|
90 | 91 | typedef void (*UnpairTokenCompleteFunct)(WeaveDeviceManager *deviceMgr, void *appReqState);
|
91 | 92 | typedef void (*GetCameraAuthDataCompleteFunct)(WeaveDeviceManager *deviceMgr, void *appReqState, const char *macAddress, const char *authData);
|
| 93 | +typedef void (*GetWirelessRegulatoryConfigCompleteFunct)(WeaveDeviceManager *deviceMgr, void *appReqState, const WirelessRegConfig *regConfig); |
92 | 94 | };
|
93 | 95 |
|
94 | 96 | class NL_DLL_EXPORT WeaveDeviceManager : private Security::CASE::WeaveCASEAuthDelegate
|
@@ -209,6 +211,8 @@ class NL_DLL_EXPORT WeaveDeviceManager : private Security::CASE::WeaveCASEAuthDe
|
209 | 211 | ErrorFunct onError);
|
210 | 212 | WEAVE_ERROR GetRendezvousMode(void* appReqState, GetRendezvousModeCompleteFunct onComplete, ErrorFunct onError);
|
211 | 213 | WEAVE_ERROR SetRendezvousMode(uint16_t modeFlags, void* appReqState, CompleteFunct onComplete, ErrorFunct onError);
|
| 214 | + WEAVE_ERROR GetWirelessRegulatoryConfig(void* appReqState, GetWirelessRegulatoryConfigCompleteFunct onComplete, ErrorFunct onError); |
| 215 | + WEAVE_ERROR SetWirelessRegulatoryConfig(const WirelessRegConfig *regConfig, void* appReqState, CompleteFunct onComplete, ErrorFunct onError); |
212 | 216 | WEAVE_ERROR GetLastNetworkProvisioningResult(void* appReqState, CompleteFunct onComplete, ErrorFunct onError);
|
213 | 217 |
|
214 | 218 | // ----- Fabric Provisioning -----
|
@@ -300,36 +304,38 @@ class NL_DLL_EXPORT WeaveDeviceManager : private Security::CASE::WeaveCASEAuthDe
|
300 | 304 | kOpState_UnpairToken = 41,
|
301 | 305 | kOpState_GetCameraAuthData = 42,
|
302 | 306 | kOpState_EnumerateDevices = 43,
|
303 |
| - kOpState_RemotePassiveRendezvousTimedOut = 44 |
| 307 | + kOpState_RemotePassiveRendezvousTimedOut = 44, |
| 308 | + kOpState_GetWirelessRegulatoryConfig = 45, |
| 309 | + kOpState_SetWirelessRegulatoryConfig = 46, |
304 | 310 | };
|
305 | 311 |
|
306 | 312 | enum ConnectionState
|
307 | 313 | {
|
308 |
| - kConnectionState_NotConnected = 0, |
309 |
| - kConnectionState_WaitDeviceConnect = 1, |
310 |
| - kConnectionState_IdentifyDevice = 2, |
311 |
| - kConnectionState_ConnectDevice = 3, |
312 |
| - kConnectionState_StartSession = 4, |
313 |
| - kConnectionState_ReenableConnectionMonitor = 5, |
314 |
| - kConnectionState_Connected = 6, |
315 |
| - kConnectionState_IdentifyRemoteDevice = 7 |
| 314 | + kConnectionState_NotConnected = 0, |
| 315 | + kConnectionState_WaitDeviceConnect = 1, |
| 316 | + kConnectionState_IdentifyDevice = 2, |
| 317 | + kConnectionState_ConnectDevice = 3, |
| 318 | + kConnectionState_StartSession = 4, |
| 319 | + kConnectionState_ReenableConnectionMonitor = 5, |
| 320 | + kConnectionState_Connected = 6, |
| 321 | + kConnectionState_IdentifyRemoteDevice = 7 |
316 | 322 | };
|
317 | 323 |
|
318 | 324 | enum
|
319 | 325 | {
|
320 |
| - kMaxPairingCodeLength = 16, |
| 326 | + kMaxPairingCodeLength = 16, |
321 | 327 |
|
322 |
| - kConRetryInterval = 500, // ms |
323 |
| - kEnumerateDevicesRetryInterval = 500, // ms |
324 |
| - kSessionRetryInterval = 1000, // ms |
325 |
| - kMaxSessionRetryCount = 20, |
| 328 | + kConRetryInterval = 500, // ms |
| 329 | + kEnumerateDevicesRetryInterval = 500, // ms |
| 330 | + kSessionRetryInterval = 1000, // ms |
| 331 | + kMaxSessionRetryCount = 20, |
326 | 332 | };
|
327 | 333 |
|
328 | 334 | enum
|
329 | 335 | {
|
330 |
| - kAuthType_None = 0, |
331 |
| - kAuthType_PASEWithPairingCode = 1, |
332 |
| - kAuthType_CASEWithAccessToken = 2 |
| 336 | + kAuthType_None = 0, |
| 337 | + kAuthType_PASEWithPairingCode = 1, |
| 338 | + kAuthType_CASEWithAccessToken = 2 |
333 | 339 | };
|
334 | 340 |
|
335 | 341 | enum
|
@@ -370,6 +376,7 @@ class NL_DLL_EXPORT WeaveDeviceManager : private Security::CASE::WeaveCASEAuthDe
|
370 | 376 | UnpairTokenCompleteFunct UnpairToken;
|
371 | 377 | GetCameraAuthDataCompleteFunct GetCameraAuthData;
|
372 | 378 | DeviceEnumerationResponseFunct DeviceEnumeration;
|
| 379 | + GetWirelessRegulatoryConfigCompleteFunct GetWirelessRegulatoryConfig; |
373 | 380 | } mOnComplete;
|
374 | 381 | CompleteFunct mOnRemotePassiveRendezvousComplete;
|
375 | 382 | ErrorFunct mOnError;
|
|
0 commit comments