Skip to content

Commit 1e415cf

Browse files
Address comments from PR 41725 (#41769)
* Address comments from PR 41725 * address comments * Restyled by clang-format --------- Co-authored-by: Restyled.io <[email protected]>
1 parent 42efed9 commit 1e415cf

File tree

2 files changed

+24
-15
lines changed

2 files changed

+24
-15
lines changed

src/app/clusters/icd-management-server/ICDManagementCluster.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,13 @@ void MatterIcdManagementPluginServerInitCallback()
453453

454454
// Configure ICD Management
455455
ICDManagementServer::GetInstance().Init(storage, symmetricKeystore, icdConfigurationData);
456+
457+
// TODO(#32321): Remove #if after issue is resolved
458+
// Note: We only need this #if statement for platform examples that enable the ICD management server without building the sample
459+
// as an ICD. Since this is not spec compliant, we should remove this #if statement once we stop compiling the ICD management
460+
// server in those examples.
456461
#if CHIP_CONFIG_ENABLE_ICD_SERVER
457-
chip::Server::GetInstance().GetICDManager().RegisterObserver(&ICDManagementServer::GetInstance());
462+
Server::GetInstance().GetICDManager().RegisterObserver(&ICDManagementServer::GetInstance());
458463
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
459464
}
460465

@@ -466,7 +471,12 @@ void MatterIcdManagementPluginServerShutdownCallback()
466471
FabricTable & fabricTable = Server::GetInstance().GetFabricTable();
467472
fabricTable.RemoveFabricDelegate(&gFabricDelegate);
468473
#endif // CHIP_CONFIG_ENABLE_ICD_CIP
474+
475+
// TODO(#32321): Remove #if after issue is resolved
476+
// Note: We only need this #if statement for platform examples that enable the ICD management server without building the sample
477+
// as an ICD. Since this is not spec compliant, we should remove this #if statement once we stop compiling the ICD management
478+
// server in those examples.
469479
#if CHIP_CONFIG_ENABLE_ICD_SERVER
470-
chip::Server::GetInstance().GetICDManager().ReleaseObserver(&ICDManagementServer::GetInstance());
480+
Server::GetInstance().GetICDManager().ReleaseObserver(&ICDManagementServer::GetInstance());
471481
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
472482
}

src/app/clusters/icd-management-server/ICDManagementCluster.h

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ class ICDManagementServer : public chip::app::ICDStateObserver
5353
public:
5454
ICDManagementServer() = default;
5555

56-
void Init(chip::PersistentStorageDelegate & storage, chip::Crypto::SymmetricKeystore * symmetricKeystore,
57-
chip::ICDConfigurationData & ICDConfigurationData);
56+
void Init(PersistentStorageDelegate & storage, Crypto::SymmetricKeystore * symmetricKeystore,
57+
ICDConfigurationData & ICDConfigurationData);
5858

5959
static ICDManagementServer & GetInstance() { return instance; };
6060
#if CHIP_CONFIG_ENABLE_ICD_CIP
@@ -65,14 +65,13 @@ class ICDManagementServer : public chip::app::ICDStateObserver
6565
* ICDConfigurationData If function fails, icdCounter will be unchanged
6666
* @return Status
6767
*/
68-
chip::Protocols::InteractionModel::Status
69-
RegisterClient(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
70-
const chip::app::Clusters::IcdManagement::Commands::RegisterClient::DecodableType & commandData,
71-
uint32_t & icdCounter);
72-
73-
chip::Protocols::InteractionModel::Status
74-
UnregisterClient(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
75-
const chip::app::Clusters::IcdManagement::Commands::UnregisterClient::DecodableType & commandData);
68+
Protocols::InteractionModel::Status RegisterClient(CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
69+
const IcdManagement::Commands::RegisterClient::DecodableType & commandData,
70+
uint32_t & icdCounter);
71+
72+
Protocols::InteractionModel::Status
73+
UnregisterClient(CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
74+
const IcdManagement::Commands::UnregisterClient::DecodableType & commandData);
7675
#endif // CHIP_CONFIG_ENABLE_ICD_CIP
7776

7877
private:
@@ -85,11 +84,11 @@ class ICDManagementServer : public chip::app::ICDStateObserver
8584
void TriggerICDMTableUpdatedEvent();
8685
#endif // CHIP_CONFIG_ENABLE_ICD_CIP
8786

88-
chip::ICDConfigurationData * mICDConfigurationData;
87+
ICDConfigurationData * mICDConfigurationData;
8988

9089
#if CHIP_CONFIG_ENABLE_ICD_CIP
91-
chip::PersistentStorageDelegate * mStorage;
92-
chip::Crypto::SymmetricKeystore * mSymmetricKeystore;
90+
PersistentStorageDelegate * mStorage;
91+
Crypto::SymmetricKeystore * mSymmetricKeystore;
9392
#endif // CHIP_CONFIG_ENABLE_ICD_CIP
9493

9594
void OnEnterActiveMode() override{};

0 commit comments

Comments
 (0)