diff --git a/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h b/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h index cf9a55365b9191..afbcf03951fdfa 100644 --- a/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h +++ b/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h @@ -349,6 +349,9 @@ class DLL_EXPORT CommissionerDeclaration void SetQRCodeDisplayed(bool newValue) { mQRCodeDisplayed = newValue; }; bool GetQRCodeDisplayed() const { return mQRCodeDisplayed; }; + void SetCancelPasscode(bool newValue) { mCancelPasscode = newValue; }; + bool GetCancelPasscode() const { return mCancelPasscode; }; + /** * Writes the CommissionerDeclaration message to the given buffer. * @@ -390,6 +393,10 @@ class DLL_EXPORT CommissionerDeclaration { ChipLogDetail(AppServer, "\tQR code displayed: true"); } + if (mCancelPasscode) + { + ChipLogDetail(AppServer, "\tQR code displayed: true"); + } ChipLogDetail(AppServer, "---- Commissioner Declaration End ----"); } @@ -403,6 +410,7 @@ class DLL_EXPORT CommissionerDeclaration kPasscodeDialogDisplayedTag, kCommissionerPasscodeTag, kQRCodeDisplayedTag, + kCancelPasscodeTag, kMaxNum = UINT8_MAX }; @@ -413,6 +421,7 @@ class DLL_EXPORT CommissionerDeclaration bool mPasscodeDialogDisplayed = false; bool mCommissionerPasscode = false; bool mQRCodeDisplayed = false; + bool mCancelPasscode = false; }; class DLL_EXPORT InstanceNameResolver diff --git a/src/protocols/user_directed_commissioning/UserDirectedCommissioningClient.cpp b/src/protocols/user_directed_commissioning/UserDirectedCommissioningClient.cpp index aeb5691be2554c..f0ee3bbe69abfd 100644 --- a/src/protocols/user_directed_commissioning/UserDirectedCommissioningClient.cpp +++ b/src/protocols/user_directed_commissioning/UserDirectedCommissioningClient.cpp @@ -223,6 +223,9 @@ CHIP_ERROR CommissionerDeclaration::ReadPayload(uint8_t * udcPayload, size_t pay case kQRCodeDisplayedTag: err = reader.Get(mQRCodeDisplayed); break; + case kCancelPasscodeTag: + err = reader.Get(mCancelPasscode); + break; } }