@@ -259,10 +259,10 @@ Status ICDManagementServer::RegisterClient(CommandHandler * commandObj, const Co
259
259
bool isClientAdmin = false ;
260
260
261
261
// Check if ClientType is valid
262
- VerifyOrReturnError (clientType != ClientTypeEnum::kUnknownEnumValue , InteractionModel:: Status::ConstraintError);
262
+ VerifyOrReturnError (clientType != ClientTypeEnum::kUnknownEnumValue , Status::ConstraintError);
263
263
264
264
// Check if client is admin
265
- VerifyOrReturnError (CHIP_NO_ERROR == CheckAdmin (commandObj, commandPath, isClientAdmin), InteractionModel:: Status::Failure);
265
+ VerifyOrReturnError (CHIP_NO_ERROR == CheckAdmin (commandObj, commandPath, isClientAdmin), Status::Failure);
266
266
267
267
bool isFirstEntryForFabric = false ;
268
268
ICDMonitoringTable table (*mStorage , fabricIndex, mICDConfigurationData ->GetClientsSupportedPerFabric (), mSymmetricKeystore );
@@ -275,22 +275,22 @@ Status ICDManagementServer::RegisterClient(CommandHandler * commandObj, const Co
275
275
// Existing entry: Validate Key if, and only if, the ISD does NOT have administrator permissions
276
276
if (!isClientAdmin)
277
277
{
278
- VerifyOrReturnError (verificationKey.HasValue (), InteractionModel:: Status::Failure);
279
- VerifyOrReturnError (entry.IsKeyEquivalent (verificationKey.Value ()), InteractionModel:: Status::Failure);
278
+ VerifyOrReturnError (verificationKey.HasValue (), Status::Failure);
279
+ VerifyOrReturnError (entry.IsKeyEquivalent (verificationKey.Value ()), Status::Failure);
280
280
}
281
281
}
282
282
else if (CHIP_ERROR_NOT_FOUND == err)
283
283
{
284
284
// New entry
285
- VerifyOrReturnError (entry.index < table.Limit (), InteractionModel:: Status::ResourceExhausted);
285
+ VerifyOrReturnError (entry.index < table.Limit (), Status::ResourceExhausted);
286
286
287
287
// Check if it's going to be the first entry for fabric
288
288
isFirstEntryForFabric = table.IsEmpty ();
289
289
}
290
290
else
291
291
{
292
292
// Error
293
- return InteractionModel:: Status::Failure;
293
+ return Status::Failure;
294
294
}
295
295
296
296
// Save
@@ -304,8 +304,8 @@ Status ICDManagementServer::RegisterClient(CommandHandler * commandObj, const Co
304
304
}
305
305
306
306
err = entry.SetKey (key);
307
- VerifyOrReturnError (CHIP_ERROR_INVALID_ARGUMENT != err, InteractionModel:: Status::ConstraintError);
308
- VerifyOrReturnError (CHIP_NO_ERROR == err, InteractionModel:: Status::Failure);
307
+ VerifyOrReturnError (CHIP_ERROR_INVALID_ARGUMENT != err, Status::ConstraintError);
308
+ VerifyOrReturnError (CHIP_NO_ERROR == err, Status::Failure);
309
309
err = table.Set (entry.index , entry);
310
310
311
311
// Delete key upon failure to prevent key storage leakage.
@@ -314,8 +314,8 @@ Status ICDManagementServer::RegisterClient(CommandHandler * commandObj, const Co
314
314
entry.DeleteKey ();
315
315
}
316
316
317
- VerifyOrReturnError (CHIP_ERROR_INVALID_ARGUMENT != err, InteractionModel:: Status::ConstraintError);
318
- VerifyOrReturnError (CHIP_NO_ERROR == err, InteractionModel:: Status::Failure);
317
+ VerifyOrReturnError (CHIP_ERROR_INVALID_ARGUMENT != err, Status::ConstraintError);
318
+ VerifyOrReturnError (CHIP_NO_ERROR == err, Status::Failure);
319
319
320
320
if (isFirstEntryForFabric)
321
321
{
@@ -324,7 +324,7 @@ Status ICDManagementServer::RegisterClient(CommandHandler * commandObj, const Co
324
324
}
325
325
326
326
icdCounter = mICDConfigurationData ->GetICDCounter ().GetValue ();
327
- return InteractionModel:: Status::Success;
327
+ return Status::Success;
328
328
}
329
329
330
330
Status ICDManagementServer::UnregisterClient (CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
@@ -336,32 +336,32 @@ Status ICDManagementServer::UnregisterClient(CommandHandler * commandObj, const
336
336
bool isClientAdmin = false ;
337
337
338
338
// Check if client is admin
339
- VerifyOrReturnError (CHIP_NO_ERROR == CheckAdmin (commandObj, commandPath, isClientAdmin), InteractionModel:: Status::Failure);
339
+ VerifyOrReturnError (CHIP_NO_ERROR == CheckAdmin (commandObj, commandPath, isClientAdmin), Status::Failure);
340
340
341
341
ICDMonitoringTable table (*mStorage , fabricIndex, mICDConfigurationData ->GetClientsSupportedPerFabric (), mSymmetricKeystore );
342
342
343
343
// Get current entry, if exists
344
344
ICDMonitoringEntry entry (mSymmetricKeystore );
345
345
CHIP_ERROR err = table.Find (nodeId, entry);
346
- VerifyOrReturnError (CHIP_ERROR_NOT_FOUND != err, InteractionModel:: Status::NotFound);
347
- VerifyOrReturnError (CHIP_NO_ERROR == err, InteractionModel:: Status::Failure);
346
+ VerifyOrReturnError (CHIP_ERROR_NOT_FOUND != err, Status::NotFound);
347
+ VerifyOrReturnError (CHIP_NO_ERROR == err, Status::Failure);
348
348
349
349
// Existing entry: Validate Key if, and only if, the ISD has NOT administrator permissions
350
350
if (!isClientAdmin)
351
351
{
352
- VerifyOrReturnError (verificationKey.HasValue (), InteractionModel:: Status::Failure);
353
- VerifyOrReturnError (entry.IsKeyEquivalent (verificationKey.Value ()), InteractionModel:: Status::Failure);
352
+ VerifyOrReturnError (verificationKey.HasValue (), Status::Failure);
353
+ VerifyOrReturnError (entry.IsKeyEquivalent (verificationKey.Value ()), Status::Failure);
354
354
}
355
355
356
356
err = table.Remove (entry.index );
357
- VerifyOrReturnError (CHIP_NO_ERROR == err, InteractionModel:: Status::Failure);
357
+ VerifyOrReturnError (CHIP_NO_ERROR == err, Status::Failure);
358
358
359
359
if (table.IsEmpty ())
360
360
{
361
361
TriggerICDMTableUpdatedEvent ();
362
362
}
363
363
364
- return InteractionModel:: Status::Success;
364
+ return Status::Success;
365
365
}
366
366
367
367
void ICDManagementServer::TriggerICDMTableUpdatedEvent ()
@@ -396,9 +396,9 @@ bool emberAfIcdManagementClusterRegisterClientCallback(CommandHandler * commandO
396
396
uint32_t icdCounter = 0 ;
397
397
398
398
ICDManagementServer server;
399
- InteractionModel:: Status status = server.RegisterClient (commandObj, commandPath, commandData, icdCounter);
399
+ Status status = server.RegisterClient (commandObj, commandPath, commandData, icdCounter);
400
400
401
- if (InteractionModel:: Status::Success == status)
401
+ if (Status::Success == status)
402
402
{
403
403
// Response
404
404
IcdManagement::Commands::RegisterClientResponse::Type response{ .ICDCounter = icdCounter };
@@ -419,7 +419,7 @@ bool emberAfIcdManagementClusterUnregisterClientCallback(CommandHandler * comman
419
419
const Commands::UnregisterClient::DecodableType & commandData)
420
420
{
421
421
ICDManagementServer server;
422
- InteractionModel:: Status status = server.UnregisterClient (commandObj, commandPath, commandData);
422
+ Status status = server.UnregisterClient (commandObj, commandPath, commandData);
423
423
424
424
commandObj->AddStatus (commandPath, status);
425
425
return true ;
0 commit comments