Skip to content

Commit

Permalink
Remove dependncy to Server
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Gielniewski <[email protected]>
  • Loading branch information
adigie committed Feb 5, 2025
1 parent 173c56a commit 4dd600b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/app/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -826,4 +826,9 @@ Crypto::DefaultSessionKeystore CommonCaseDeviceServerInitParams::sSessionKeystor
app::DefaultICDCheckInBackOffStrategy CommonCaseDeviceServerInitParams::sDefaultICDCheckInBackOffStrategy;
#endif

void ServerScheduleFactoryReset()
{
chip::Server::GetInstance().ScheduleFactoryReset();
}

} // namespace chip
2 changes: 2 additions & 0 deletions src/app/server/Server.h
Original file line number Diff line number Diff line change
Expand Up @@ -709,4 +709,6 @@ class Server
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
};

void ServerScheduleFactoryReset();

} // namespace chip
1 change: 0 additions & 1 deletion src/lib/shell/commands/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ source_set("commands") {
}

if (chip_device_platform != "none") {
public_deps += [ "${chip_root}/src/app/server" ]
public_deps += [ "${chip_root}/src/app/onboarding-codes-utils" ]
}

Expand Down
3 changes: 3 additions & 0 deletions src/lib/shell/commands/Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
#include <platform/CHIPDeviceLayer.h>

namespace chip {

void ServerScheduleFactoryReset();

namespace Shell {

static CHIP_ERROR FactoryResetHandler(int argc, char ** argv)
Expand Down

0 comments on commit 4dd600b

Please sign in to comment.