Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and yunhanw-google committed Feb 23, 2024
1 parent 5191511 commit ab8bba6
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/app/icd/client/CheckInHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CHIP_ERROR CheckInHandler::Init(Messaging::ExchangeManager * exchangeManager, IC
mpExchangeManager = exchangeManager;
mpICDClientStorage = clientStorage;
mpCheckInDelegate = delegate;
mpImEngine = engine;
mpImEngine = engine;
return mpExchangeManager->RegisterUnsolicitedMessageHandlerForType(Protocols::SecureChannel::MsgType::ICD_CheckIn, this);
}

Expand Down
5 changes: 3 additions & 2 deletions src/app/icd/client/CheckInHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class CheckInHandler : public Messaging::ExchangeDelegate, public Messaging::Uns
{

public:
CHIP_ERROR Init(Messaging::ExchangeManager * exchangeManager, ICDClientStorage * clientStorage, CheckInDelegate * delegate, InteractionModelEngine *engine);
CHIP_ERROR Init(Messaging::ExchangeManager * exchangeManager, ICDClientStorage * clientStorage, CheckInDelegate * delegate,
InteractionModelEngine * engine);
void Shutdown();

CheckInHandler();
Expand Down Expand Up @@ -87,7 +88,7 @@ class CheckInHandler : public Messaging::ExchangeDelegate, public Messaging::Uns
Messaging::ExchangeManager * mpExchangeManager = nullptr;
CheckInDelegate * mpCheckInDelegate = nullptr;
ICDClientStorage * mpICDClientStorage = nullptr;
InteractionModelEngine *mpImEngine = nullptr;
InteractionModelEngine * mpImEngine = nullptr;
};

} // namespace app
Expand Down
2 changes: 1 addition & 1 deletion src/app/icd/client/DefaultCheckInDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CHIP_ERROR DefaultCheckInDelegate::Init(ICDClientStorage * storage, InteractionM
{
VerifyOrReturnError(storage != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
VerifyOrReturnError(mpStorage == nullptr, CHIP_ERROR_INCORRECT_STATE);
mpStorage = storage;
mpStorage = storage;
mpImEngine = engine;
return CHIP_NO_ERROR;
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/icd/client/DefaultCheckInDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class DefaultCheckInDelegate : public CheckInDelegate
void OnKeyRefreshDone(RefreshKeySender * refreshKeySender, CHIP_ERROR error) override;

private:
ICDClientStorage * mpStorage = nullptr;
InteractionModelEngine * mpImEngine = nullptr;
ICDClientStorage * mpStorage = nullptr;
InteractionModelEngine * mpImEngine = nullptr;
};

} // namespace app
Expand Down
9 changes: 5 additions & 4 deletions src/app/icd/client/RefreshKeySender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ namespace chip {
namespace app {

RefreshKeySender::RefreshKeySender(CheckInDelegate * checkInDelegate, const ICDClientInfo & icdClientInfo,
ICDClientStorage * icdClientStorage, InteractionModelEngine *engine, const RefreshKeyBuffer & refreshKeyBuffer) :
mpCheckInDelegate(checkInDelegate), mICDClientInfo(icdClientInfo),
mpICDClientStorage(icdClientStorage), mpImEngine(engine), mOnConnectedCallback(HandleDeviceConnected, this),
mOnConnectionFailureCallback(HandleDeviceConnectionFailure, this)
ICDClientStorage * icdClientStorage, InteractionModelEngine * engine,
const RefreshKeyBuffer & refreshKeyBuffer) :
mpCheckInDelegate(checkInDelegate),
mICDClientInfo(icdClientInfo), mpICDClientStorage(icdClientStorage), mpImEngine(engine),
mOnConnectedCallback(HandleDeviceConnected, this), mOnConnectionFailureCallback(HandleDeviceConnectionFailure, this)

{
mNewKey = refreshKeyBuffer;
Expand Down
6 changes: 3 additions & 3 deletions src/app/icd/client/RefreshKeySender.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class RefreshKeySender
typedef Crypto::SensitiveDataBuffer<Crypto::kAES_CCM128_Key_Length> RefreshKeyBuffer;

RefreshKeySender(CheckInDelegate * checkInDelegate, const ICDClientInfo & icdClientInfo, ICDClientStorage * icdClientStorage,
InteractionModelEngine *engine, const RefreshKeyBuffer & refreshKeyBuffer);
InteractionModelEngine * engine, const RefreshKeyBuffer & refreshKeyBuffer);

/**
* @brief Sets up a CASE session to the peer for re-registering a client with the peer when a key refresh is required to avoid
Expand Down Expand Up @@ -82,10 +82,10 @@ class RefreshKeySender
*/
CHIP_ERROR RegisterClientWithNewKey(Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle);

CheckInDelegate * mpCheckInDelegate = nullptr;
CheckInDelegate * mpCheckInDelegate = nullptr;
ICDClientInfo mICDClientInfo;
ICDClientStorage * mpICDClientStorage = nullptr;
InteractionModelEngine *mpImEngine = nullptr;
InteractionModelEngine * mpImEngine = nullptr;
RefreshKeyBuffer mNewKey;
Callback::Callback<OnDeviceConnected> mOnConnectedCallback;
Callback::Callback<OnDeviceConnectionFailure> mOnConnectionFailureCallback;
Expand Down

0 comments on commit ab8bba6

Please sign in to comment.