@@ -338,30 +338,29 @@ const char * sDeviceOptionHelp =
338
338
" \n " ;
339
339
340
340
#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
341
- bool ParseAccessRestrictionEntriesFromJson (const char * jsonString,
342
- std::vector<Platform::SharedPtr<AccessRestriction::Entry>> & entries)
341
+ bool ParseAccessRestrictionEntriesFromJson (const char * jsonString, std::vector<AccessRestrictionProvider::Entry> & entries)
343
342
{
344
343
Json::Value root;
345
344
Json::Reader reader;
346
345
VerifyOrReturnValue (reader.parse (jsonString, root), false );
347
346
348
347
for (Json::Value::const_iterator eIt = root.begin (); eIt != root.end (); eIt++)
349
348
{
350
- auto entry = MakeShared<AccessRestriction ::Entry>() ;
349
+ AccessRestrictionProvider ::Entry entry ;
351
350
352
- entry-> endpointNumber = static_cast <EndpointId>((*eIt)[" endpoint" ].asUInt ());
353
- entry-> clusterId = static_cast <ClusterId>((*eIt)[" cluster" ].asUInt ());
351
+ entry. endpointNumber = static_cast <EndpointId>((*eIt)[" endpoint" ].asUInt ());
352
+ entry. clusterId = static_cast <ClusterId>((*eIt)[" cluster" ].asUInt ());
354
353
355
354
Json::Value restrictions = (*eIt)[" restrictions" ];
356
355
for (Json::Value::const_iterator rIt = restrictions.begin (); rIt != restrictions.end (); rIt++)
357
356
{
358
- AccessRestriction ::Restriction restriction;
359
- restriction.restrictionType = static_cast <AccessRestriction ::Type>((*rIt)[" type" ].asInt ());
357
+ AccessRestrictionProvider ::Restriction restriction;
358
+ restriction.restrictionType = static_cast <AccessRestrictionProvider ::Type>((*rIt)[" type" ].asInt ());
360
359
if ((*rIt).isMember (" id" ))
361
360
{
362
361
restriction.id .SetValue ((*rIt)[" id" ].asUInt ());
363
362
}
364
- entry-> restrictions .push_back (restriction);
363
+ entry. restrictions .push_back (restriction);
365
364
}
366
365
367
366
entries.push_back (entry);
@@ -582,7 +581,7 @@ bool HandleOption(const char * aProgram, OptionSet * aOptions, int aIdentifier,
582
581
583
582
#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS
584
583
case kDeviceOption_UseAccessRestrictions : {
585
- std::vector<Platform::SharedPtr<AccessRestriction:: Entry> > accessRestrictionEntries;
584
+ std::vector<AccessRestrictionProvider:: Entry> accessRestrictionEntries;
586
585
retval = ParseAccessRestrictionEntriesFromJson (aValue, accessRestrictionEntries);
587
586
if (retval)
588
587
{
0 commit comments