Skip to content

Commit

Permalink
[icd] integrate ICD management command into CHIP tool (project-chip#3…
Browse files Browse the repository at this point in the history
…0863)

* [icd] integrate ICD management command into CHIP tool

* Delete entry on failure

* Fix build
  • Loading branch information
erjiaqing authored and thivya-amazon committed Dec 12, 2023
1 parent 7e0d59a commit 5ceab01
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions examples/chip-tool/commands/common/CHIPCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ class CHIPCommand : public Command

// Shut down the command. After a Shutdown call the command object is ready
// to be used for another command invocation.
virtual void Shutdown() { ResetArguments(); }
virtual void Shutdown()
{
ResetArguments();
}

// Clean up any resources allocated by the command. Some commands may hold
// on to resources after Shutdown(), but Cleanup() will guarantee those are
Expand All @@ -140,12 +143,18 @@ class CHIPCommand : public Command
// can keep doing work as needed. Cleanup() will be called when quitting
// interactive mode. This method will be called before Shutdown, so it can
// use member values that Shutdown will normally reset.
virtual bool DeferInteractiveCleanup() { return false; }
virtual bool DeferInteractiveCleanup()
{
return false;
}

// If true, the controller will be created with server capabilities enabled,
// such as advertising operational nodes over DNS-SD and accepting incoming
// CASE sessions.
virtual bool NeedsOperationalAdvertising() { return mAdvertiseOperational; }
virtual bool NeedsOperationalAdvertising()
{
return mAdvertiseOperational;
}

// Execute any deferred cleanups. Used when exiting interactive mode.
static void ExecuteDeferredCleanups(intptr_t ignored);
Expand Down

0 comments on commit 5ceab01

Please sign in to comment.