@@ -58,7 +58,6 @@ class ConfigurationManager
58
58
59
59
enum
60
60
{
61
- kMaxPairingCodeLength = 16 ,
62
61
kMaxSerialNumberLength = 32 ,
63
62
kMaxFirmwareRevisionLength = 32 ,
64
63
#if CHIP_DEVICE_CONFIG_ENABLE_THREAD
@@ -82,22 +81,8 @@ class ConfigurationManager
82
81
CHIP_ERROR GetManufacturingDate (uint16_t & year, uint8_t & month, uint8_t & dayOfMonth);
83
82
CHIP_ERROR GetFirmwareRevisionString (char * buf, size_t bufSize);
84
83
CHIP_ERROR GetFirmwareRevision (uint32_t & firmwareRev);
85
- CHIP_ERROR GetFirmwareBuildTime (uint16_t & year, uint8_t & month, uint8_t & dayOfMonth, uint8_t & hour, uint8_t & minute,
86
- uint8_t & second);
87
- CHIP_ERROR GetDeviceId (uint64_t & deviceId);
88
- CHIP_ERROR GetDeviceCertificate (uint8_t * buf, size_t bufSize, size_t & certLen);
89
- CHIP_ERROR GetDeviceIntermediateCACerts (uint8_t * buf, size_t bufSize, size_t & certsLen);
90
- CHIP_ERROR GetDevicePrivateKey (uint8_t * buf, size_t bufSize, size_t & keyLen);
91
- CHIP_ERROR GetManufacturerDeviceId (uint64_t & deviceId);
92
- CHIP_ERROR GetManufacturerDeviceCertificate (uint8_t * buf, size_t bufSize, size_t & certLen);
93
- CHIP_ERROR GetManufacturerDeviceIntermediateCACerts (uint8_t * buf, size_t bufSize, size_t & certsLen);
94
- CHIP_ERROR GetManufacturerDevicePrivateKey (uint8_t * buf, size_t bufSize, size_t & keyLen);
95
84
CHIP_ERROR GetSetupPinCode (uint32_t & setupPinCode);
96
85
CHIP_ERROR GetSetupDiscriminator (uint16_t & setupDiscriminator);
97
- CHIP_ERROR GetServiceId (uint64_t & serviceId);
98
- CHIP_ERROR GetFabricId (uint64_t & fabricId);
99
- CHIP_ERROR GetServiceConfig (uint8_t * buf, size_t bufSize, size_t & serviceConfigLen);
100
- CHIP_ERROR GetPairedAccountId (char * buf, size_t bufSize, size_t & accountIdLen);
101
86
#if CHIP_ENABLE_ROTATING_DEVICE_ID
102
87
// Lifetime counter is monotonic counter that is incremented only in the case of a factory reset
103
88
CHIP_ERROR GetLifetimeCounter (uint16_t & lifetimeCounter);
@@ -110,40 +95,21 @@ class ConfigurationManager
110
95
CHIP_ERROR StorePrimary802154MACAddress (const uint8_t * buf);
111
96
CHIP_ERROR StoreManufacturingDate (const char * mfgDate, size_t mfgDateLen);
112
97
CHIP_ERROR StoreProductRevision (uint16_t productRev);
113
- CHIP_ERROR StoreFabricId (uint64_t fabricId);
114
- CHIP_ERROR StoreManufacturerDeviceId (uint64_t deviceId);
115
- CHIP_ERROR StoreManufacturerDeviceCertificate (const uint8_t * cert, size_t certLen);
116
- CHIP_ERROR StoreManufacturerDeviceIntermediateCACerts (const uint8_t * certs, size_t certsLen);
117
- CHIP_ERROR StoreManufacturerDevicePrivateKey (const uint8_t * key, size_t keyLen);
118
98
CHIP_ERROR StoreSetupPinCode (uint32_t setupPinCode);
119
99
CHIP_ERROR StoreSetupDiscriminator (uint16_t setupDiscriminator);
120
- CHIP_ERROR StoreServiceProvisioningData (uint64_t serviceId, const uint8_t * serviceConfig, size_t serviceConfigLen,
121
- const char * accountId, size_t accountIdLen);
122
- CHIP_ERROR ClearServiceProvisioningData ();
123
- CHIP_ERROR StoreServiceConfig (const uint8_t * serviceConfig, size_t serviceConfigLen);
124
- CHIP_ERROR StorePairedAccountId (const char * accountId, size_t accountIdLen);
125
100
CHIP_ERROR StoreRegulatoryLocation (uint32_t location);
126
101
CHIP_ERROR StoreCountryCode (const char * code, size_t codeLen);
127
102
CHIP_ERROR StoreBreadcrumb (uint64_t breadcrumb);
128
103
129
- CHIP_ERROR GetQRCodeString (char * buf, size_t bufSize);
130
-
131
- CHIP_ERROR GetWiFiAPSSID (char * buf, size_t bufSize);
132
-
133
104
CHIP_ERROR GetBLEDeviceIdentificationInfo (Ble::ChipBLEDeviceIdentificationInfo & deviceIdInfo);
134
105
135
106
#if !defined(NDEBUG)
136
107
CHIP_ERROR RunUnitTests ();
137
108
#endif
138
109
139
- bool IsServiceProvisioned ();
140
- bool IsPairedToAccount ();
141
- bool IsMemberOfFabric ();
142
110
bool IsFullyProvisioned ();
143
111
void InitiateFactoryReset ();
144
112
145
- CHIP_ERROR ComputeProvisioningHash (uint8_t * hashBuf, size_t hashBufSize);
146
-
147
113
void LogDeviceConfig ();
148
114
149
115
bool IsCommissionableDeviceTypeEnabled ();
@@ -170,7 +136,6 @@ class ConfigurationManager
170
136
using ImplClass = ::chip::DeviceLayer::ConfigurationManagerImpl;
171
137
172
138
CHIP_ERROR Init ();
173
- CHIP_ERROR ConfigureChipStack ();
174
139
bool CanFactoryReset ();
175
140
CHIP_ERROR GetFailSafeArmed (bool & val);
176
141
CHIP_ERROR SetFailSafeArmed (bool val);
@@ -303,52 +268,6 @@ inline CHIP_ERROR ConfigurationManager::GetFirmwareRevision(uint32_t & firmwareR
303
268
return static_cast <ImplClass *>(this )->_GetFirmwareRevision (firmwareRev);
304
269
}
305
270
306
- inline CHIP_ERROR ConfigurationManager::GetFirmwareBuildTime (uint16_t & year, uint8_t & month, uint8_t & dayOfMonth, uint8_t & hour,
307
- uint8_t & minute, uint8_t & second)
308
- {
309
- return static_cast <ImplClass *>(this )->_GetFirmwareBuildTime (year, month, dayOfMonth, hour, minute, second);
310
- }
311
-
312
- inline CHIP_ERROR ConfigurationManager::GetDeviceId (uint64_t & deviceId)
313
- {
314
- return static_cast <ImplClass *>(this )->_GetDeviceId (deviceId);
315
- }
316
-
317
- inline CHIP_ERROR ConfigurationManager::GetDeviceCertificate (uint8_t * buf, size_t bufSize, size_t & certLen)
318
- {
319
- return static_cast <ImplClass *>(this )->_GetDeviceCertificate (buf, bufSize, certLen);
320
- }
321
-
322
- inline CHIP_ERROR ConfigurationManager::GetDeviceIntermediateCACerts (uint8_t * buf, size_t bufSize, size_t & certsLen)
323
- {
324
- return static_cast <ImplClass *>(this )->_GetDeviceIntermediateCACerts (buf, bufSize, certsLen);
325
- }
326
-
327
- inline CHIP_ERROR ConfigurationManager::GetDevicePrivateKey (uint8_t * buf, size_t bufSize, size_t & keyLen)
328
- {
329
- return static_cast <ImplClass *>(this )->_GetDevicePrivateKey (buf, bufSize, keyLen);
330
- }
331
-
332
- inline CHIP_ERROR ConfigurationManager::GetManufacturerDeviceId (uint64_t & deviceId)
333
- {
334
- return static_cast <ImplClass *>(this )->_GetManufacturerDeviceId (deviceId);
335
- }
336
-
337
- inline CHIP_ERROR ConfigurationManager::GetManufacturerDeviceCertificate (uint8_t * buf, size_t bufSize, size_t & certLen)
338
- {
339
- return static_cast <ImplClass *>(this )->_GetManufacturerDeviceCertificate (buf, bufSize, certLen);
340
- }
341
-
342
- inline CHIP_ERROR ConfigurationManager::GetManufacturerDeviceIntermediateCACerts (uint8_t * buf, size_t bufSize, size_t & certsLen)
343
- {
344
- return static_cast <ImplClass *>(this )->_GetManufacturerDeviceIntermediateCACerts (buf, bufSize, certsLen);
345
- }
346
-
347
- inline CHIP_ERROR ConfigurationManager::GetManufacturerDevicePrivateKey (uint8_t * buf, size_t bufSize, size_t & keyLen)
348
- {
349
- return static_cast <ImplClass *>(this )->_GetManufacturerDevicePrivateKey (buf, bufSize, keyLen);
350
- }
351
-
352
271
inline CHIP_ERROR ConfigurationManager::GetSetupPinCode (uint32_t & setupPinCode)
353
272
{
354
273
return static_cast <ImplClass *>(this )->_GetSetupPinCode (setupPinCode);
@@ -359,26 +278,6 @@ inline CHIP_ERROR ConfigurationManager::GetSetupDiscriminator(uint16_t & setupDi
359
278
return static_cast <ImplClass *>(this )->_GetSetupDiscriminator (setupDiscriminator);
360
279
}
361
280
362
- inline CHIP_ERROR ConfigurationManager::GetServiceId (uint64_t & serviceId)
363
- {
364
- return static_cast <ImplClass *>(this )->_GetServiceId (serviceId);
365
- }
366
-
367
- inline CHIP_ERROR ConfigurationManager::GetFabricId (uint64_t & fabricId)
368
- {
369
- return static_cast <ImplClass *>(this )->_GetFabricId (fabricId);
370
- }
371
-
372
- inline CHIP_ERROR ConfigurationManager::GetServiceConfig (uint8_t * buf, size_t bufSize, size_t & serviceConfigLen)
373
- {
374
- return static_cast <ImplClass *>(this )->_GetServiceConfig (buf, bufSize, serviceConfigLen);
375
- }
376
-
377
- inline CHIP_ERROR ConfigurationManager::GetPairedAccountId (char * buf, size_t bufSize, size_t & accountIdLen)
378
- {
379
- return static_cast <ImplClass *>(this )->_GetPairedAccountId (buf, bufSize, accountIdLen);
380
- }
381
-
382
281
#if CHIP_ENABLE_ROTATING_DEVICE_ID
383
282
inline CHIP_ERROR ConfigurationManager::GetLifetimeCounter (uint16_t & lifetimeCounter)
384
283
{
@@ -426,31 +325,6 @@ inline CHIP_ERROR ConfigurationManager::StoreProductRevision(uint16_t productRev
426
325
return static_cast <ImplClass *>(this )->_StoreProductRevision (productRev);
427
326
}
428
327
429
- inline CHIP_ERROR ConfigurationManager::StoreFabricId (uint64_t fabricId)
430
- {
431
- return static_cast <ImplClass *>(this )->_StoreFabricId (fabricId);
432
- }
433
-
434
- inline CHIP_ERROR ConfigurationManager::StoreManufacturerDeviceId (uint64_t deviceId)
435
- {
436
- return static_cast <ImplClass *>(this )->_StoreManufacturerDeviceId (deviceId);
437
- }
438
-
439
- inline CHIP_ERROR ConfigurationManager::StoreManufacturerDeviceCertificate (const uint8_t * cert, size_t certLen)
440
- {
441
- return static_cast <ImplClass *>(this )->_StoreManufacturerDeviceCertificate (cert, certLen);
442
- }
443
-
444
- inline CHIP_ERROR ConfigurationManager::StoreManufacturerDeviceIntermediateCACerts (const uint8_t * certs, size_t certsLen)
445
- {
446
- return static_cast <ImplClass *>(this )->_StoreManufacturerDeviceIntermediateCACerts (certs, certsLen);
447
- }
448
-
449
- inline CHIP_ERROR ConfigurationManager::StoreManufacturerDevicePrivateKey (const uint8_t * key, size_t keyLen)
450
- {
451
- return static_cast <ImplClass *>(this )->_StoreManufacturerDevicePrivateKey (key, keyLen);
452
- }
453
-
454
328
inline CHIP_ERROR ConfigurationManager::StoreSetupPinCode (uint32_t setupPinCode)
455
329
{
456
330
return static_cast <ImplClass *>(this )->_StoreSetupPinCode (setupPinCode);
@@ -461,14 +335,6 @@ inline CHIP_ERROR ConfigurationManager::StoreSetupDiscriminator(uint16_t setupDi
461
335
return static_cast <ImplClass *>(this )->_StoreSetupDiscriminator (setupDiscriminator);
462
336
}
463
337
464
- inline CHIP_ERROR ConfigurationManager::StoreServiceProvisioningData (uint64_t serviceId, const uint8_t * serviceConfig,
465
- size_t serviceConfigLen, const char * accountId,
466
- size_t accountIdLen)
467
- {
468
- return static_cast <ImplClass *>(this )->_StoreServiceProvisioningData (serviceId, serviceConfig, serviceConfigLen, accountId,
469
- accountIdLen);
470
- }
471
-
472
338
inline CHIP_ERROR ConfigurationManager::StoreRegulatoryLocation (uint32_t location)
473
339
{
474
340
return static_cast <ImplClass *>(this )->_StoreRegulatoryLocation (location);
@@ -484,21 +350,6 @@ inline CHIP_ERROR ConfigurationManager::StoreBreadcrumb(uint64_t breadcrumb)
484
350
return static_cast <ImplClass *>(this )->_StoreBreadcrumb (breadcrumb);
485
351
}
486
352
487
- inline CHIP_ERROR ConfigurationManager::ClearServiceProvisioningData ()
488
- {
489
- return static_cast <ImplClass *>(this )->_ClearServiceProvisioningData ();
490
- }
491
-
492
- inline CHIP_ERROR ConfigurationManager::StoreServiceConfig (const uint8_t * serviceConfig, size_t serviceConfigLen)
493
- {
494
- return static_cast <ImplClass *>(this )->_StoreServiceConfig (serviceConfig, serviceConfigLen);
495
- }
496
-
497
- inline CHIP_ERROR ConfigurationManager::StorePairedAccountId (const char * accountId, size_t accountIdLen)
498
- {
499
- return static_cast <ImplClass *>(this )->_StorePairedAccountId (accountId, accountIdLen);
500
- }
501
-
502
353
inline CHIP_ERROR ConfigurationManager::ReadPersistedStorageValue (::chip::Platform::PersistedStorage::Key key, uint32_t & value)
503
354
{
504
355
return static_cast <ImplClass *>(this )->_ReadPersistedStorageValue (key, value);
@@ -509,36 +360,11 @@ inline CHIP_ERROR ConfigurationManager::WritePersistedStorageValue(::chip::Platf
509
360
return static_cast <ImplClass *>(this )->_WritePersistedStorageValue (key, value);
510
361
}
511
362
512
- inline CHIP_ERROR ConfigurationManager::GetQRCodeString (char * buf, size_t bufSize)
513
- {
514
- return static_cast <ImplClass *>(this )->_GetQRCodeString (buf, bufSize);
515
- }
516
-
517
- inline CHIP_ERROR ConfigurationManager::GetWiFiAPSSID (char * buf, size_t bufSize)
518
- {
519
- return static_cast <ImplClass *>(this )->_GetWiFiAPSSID (buf, bufSize);
520
- }
521
-
522
363
inline CHIP_ERROR ConfigurationManager::GetBLEDeviceIdentificationInfo (Ble::ChipBLEDeviceIdentificationInfo & deviceIdInfo)
523
364
{
524
365
return static_cast <ImplClass *>(this )->_GetBLEDeviceIdentificationInfo (deviceIdInfo);
525
366
}
526
367
527
- inline bool ConfigurationManager::IsServiceProvisioned ()
528
- {
529
- return static_cast <ImplClass *>(this )->_IsServiceProvisioned ();
530
- }
531
-
532
- inline bool ConfigurationManager::IsPairedToAccount ()
533
- {
534
- return static_cast <ImplClass *>(this )->_IsPairedToAccount ();
535
- }
536
-
537
- inline bool ConfigurationManager::IsMemberOfFabric ()
538
- {
539
- return static_cast <ImplClass *>(this )->_IsMemberOfFabric ();
540
- }
541
-
542
368
inline bool ConfigurationManager::IsFullyProvisioned ()
543
369
{
544
370
return static_cast <ImplClass *>(this )->_IsFullyProvisioned ();
@@ -559,21 +385,11 @@ inline CHIP_ERROR ConfigurationManager::RunUnitTests()
559
385
}
560
386
#endif
561
387
562
- inline CHIP_ERROR ConfigurationManager::ComputeProvisioningHash (uint8_t * hashBuf, size_t hashBufSize)
563
- {
564
- return static_cast <ImplClass *>(this )->_ComputeProvisioningHash (hashBuf, hashBufSize);
565
- }
566
-
567
388
inline CHIP_ERROR ConfigurationManager::Init ()
568
389
{
569
390
return static_cast <ImplClass *>(this )->_Init ();
570
391
}
571
392
572
- inline CHIP_ERROR ConfigurationManager::ConfigureChipStack ()
573
- {
574
- return static_cast <ImplClass *>(this )->_ConfigureChipStack ();
575
- }
576
-
577
393
inline bool ConfigurationManager::CanFactoryReset ()
578
394
{
579
395
return static_cast <ImplClass *>(this )->_CanFactoryReset ();
0 commit comments