Skip to content

Commit

Permalink
Remove needless OpcredsIssuer dependency (#12338)
Browse files Browse the repository at this point in the history
* Remove needless OpcredsIssuer dependency

- Dependency on ExampleOperationalCredentialsIssuer was in
  many files where not needed, making other refactors more
  difficult.

Remove this dependency and make CHIPCommand own its ephemeral
operational credentials issuer.

* Restyled by clang-format

* Apply review comment

* Fix merge issue

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
  • Loading branch information
3 people authored and pull[bot] committed May 12, 2022
1 parent 9bd20b9 commit 1723419
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion examples/chip-tool/commands/clusters/ModelCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "../../config/PersistentStorage.h"
#include "../common/CHIPCommand.h"
#include <app/chip-zcl-zpro-codec.h>
#include <controller/ExampleOperationalCredentialsIssuer.h>
#include <lib/core/CHIPEncoding.h>

class ModelCommand : public CHIPCommand
Expand Down
4 changes: 3 additions & 1 deletion examples/chip-tool/commands/common/CHIPCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#pragma once

#include <controller/ExampleOperationalCredentialsIssuer.h>

#include "../../config/PersistentStorage.h"
#include "Command.h"

Expand Down Expand Up @@ -69,6 +71,7 @@ class CHIPCommand : public Command
PersistentStorage mDefaultStorage;
PersistentStorage mCommissionerStorage;
chip::SimpleFabricStorage mFabricStorage;
chip::Controller::ExampleOperationalCredentialsIssuer mOpCredsIssuer;

std::string GetIdentity();
void SetIdentity(const char * name);
Expand All @@ -88,7 +91,6 @@ class CHIPCommand : public Command
static void RunQueuedCommand(intptr_t commandArg);

CHIP_ERROR mCommandExitStatus = CHIP_ERROR_INTERNAL;
chip::Controller::ExampleOperationalCredentialsIssuer mOpCredsIssuer;

CHIP_ERROR StartWaiting(chip::System::Clock::Timeout seconds);
void StopWaiting();
Expand Down
1 change: 0 additions & 1 deletion examples/chip-tool/commands/common/Command.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#pragma once

#include "controller/ExampleOperationalCredentialsIssuer.h"
#include <app/data-model/Nullable.h>
#include <controller/CHIPDeviceController.h>
#include <inet/InetInterface.h>
Expand Down
1 change: 0 additions & 1 deletion examples/chip-tool/commands/common/Commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include "../../config/PersistentStorage.h"
#include "Command.h"
#include <controller/ExampleOperationalCredentialsIssuer.h>
#include <map>

class Commands
Expand Down
1 change: 0 additions & 1 deletion examples/chip-tool/commands/discover/DiscoverCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include "../../config/PersistentStorage.h"
#include "../common/CHIPCommand.h"
#include <controller/ExampleOperationalCredentialsIssuer.h>

class DiscoverCommand : public CHIPCommand, public chip::Controller::DeviceAddressUpdateDelegate
{
Expand Down
2 changes: 0 additions & 2 deletions examples/chip-tool/commands/reporting/ReportingCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
#include "../../config/PersistentStorage.h"
#include "../common/CHIPCommand.h"

#include <controller/ExampleOperationalCredentialsIssuer.h>

class ReportingCommand : public CHIPCommand
{
public:
Expand Down
1 change: 0 additions & 1 deletion examples/chip-tool/commands/tests/TestCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <app/data-model/DecodableList.h>
#include <app/tests/suites/pics/PICSBooleanExpressionParser.h>
#include <app/tests/suites/pics/PICSBooleanReader.h>
#include <controller/ExampleOperationalCredentialsIssuer.h>
#include <lib/support/BitFlags.h>
#include <lib/support/TypeTraits.h>
#include <lib/support/UnitTestUtils.h>
Expand Down

0 comments on commit 1723419

Please sign in to comment.