-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic support for reporting application installation status #33614
Changes from all commits
2ddf563
970a793
963ab2f
a42b4a0
4af41f7
71c1bbf
5a47bcc
fd4769e
007460c
22d9239
83753fe
90e114f
ca17606
e37775f
05c6db8
8e42f42
4ae3a36
106d30c
d396f5d
30769d4
40eb3df
8751e24
8246f0e
d373a0f
9def1a3
0184744
de7b390
2ca4374
f401ba7
f7f8d3d
6c2fa94
bc2ec4a
ae6715d
c9e783f
1f7ba4e
7d35e6c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -235,6 +235,21 @@ class DLL_EXPORT AppInstallationService | |
*/ | ||
virtual bool LookupTargetContentApp(uint16_t vendorId, uint16_t productId) = 0; | ||
|
||
/** | ||
* @brief | ||
* Called to get app's installation error code. | ||
* | ||
* CdError status is designed for CommissionerDeclaration and should be set by using SetErrorCode() and | ||
* sent back to the client as a CDC Message. It is expected that app during installation can return following errors: | ||
* kNoError, kAppInstallConsentPending, kAppInstalling, kAppInstallFailed, kAppInstalledRetryNeeded | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is a subset of errors, the comment should explain why only this subset will be returned here (and that it is a subset). If this is an exhaustive set, then we should NOT have this list as this would mean we have to maintain the list in sync. Overall listing anything except kNoError or special one-offs adds a maintenance burden to update the comment if the underlying code changes (and worse, you return a generic CdError yet your api claims to never return the entire set of errors and if clients rely on that, they may break on updates). How about something like:
unsure if the above comment is true ... however please see how it can be phrased to make expectations clear. Is for example Should we maybe consider having a separate enum that is more restricted and that can be directly converted to a CdError instead? |
||
* | ||
* @param[in] vendorId The vendorId in the DNS-SD advertisement of the requesting commissionee. | ||
* @param[in] productId The productId in the DNS-SD advertisement of the requesting commissionee. | ||
* | ||
*/ | ||
virtual chip::Protocols::UserDirectedCommissioning::CommissionerDeclaration::CdError | ||
lazarkov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
GetAppInstallationErrorCode(uint16_t vendorId, uint16_t productId) = 0; | ||
|
||
virtual ~AppInstallationService() = default; | ||
}; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: naming should probably be
kCamelCasename
and using constexpr.