@@ -22,31 +22,31 @@ @interface MCCommissionerDeclaration ()
22
22
23
23
/* * Feature: All - Indicates errors incurred during commissioning. */
24
24
@property (nonatomic ) CdError errorCode;
25
- /* *
26
- * Feature: Coordinate PIN Dialogs - When NoPasscode field set to true, and the Commissioner
27
- * determines that a Passcode code will be needed for commissioning.
28
- */
25
+ /* *
26
+ * Feature: Coordinate PIN Dialogs - When NoPasscode field set to true, and the Commissioner
27
+ * determines that a Passcode code will be needed for commissioning.
28
+ */
29
29
@property (nonatomic ) BOOL needsPasscode;
30
- /* *
31
- * Feature: Target Content Application - No apps with AccountLogin cluster implementation were
32
- * found for the last IdentificationDeclaration request. Only apps which provide access to the
33
- * vendor id of the Commissionee will be considered.
34
- */
30
+ /* *
31
+ * Feature: Target Content Application - No apps with AccountLogin cluster implementation were
32
+ * found for the last IdentificationDeclaration request. Only apps which provide access to the
33
+ * vendor id of the Commissionee will be considered.
34
+ */
35
35
@property (nonatomic ) BOOL noAppsFound;
36
- /* *
37
- * Feature: Coordinate PIN Dialogs - A Passcode input dialog is now displayed for the user on the
38
- * Commissioner.
39
- */
36
+ /* *
37
+ * Feature: Coordinate PIN Dialogs - A Passcode input dialog is now displayed for the user on the
38
+ * Commissioner.
39
+ */
40
40
@property (nonatomic ) BOOL passcodeDialogDisplayed;
41
- /* *
42
- * Feature: Commissioner-Generated Passcode - A Passcode is now displayed for the user by the
43
- * CastingPlayer/Commissioner.
44
- */
41
+ /* *
42
+ * Feature: Commissioner-Generated Passcode - A Passcode is now displayed for the user by the
43
+ * CastingPlayer/Commissioner.
44
+ */
45
45
@property (nonatomic ) BOOL commissionerPasscode;
46
- /* *
47
- * Feature: Commissioner-Generated Passcode - The user experience conveying a Passcode to the user
48
- * also displays a QR code.
49
- */
46
+ /* *
47
+ * Feature: Commissioner-Generated Passcode - The user experience conveying a Passcode to the user
48
+ * also displays a QR code.
49
+ */
50
50
@property (nonatomic ) BOOL qRCodeDisplayed;
51
51
52
52
@property (nonatomic , readwrite ) matter::casting::memory::Strong<chip::Protocols::UserDirectedCommissioning::CommissionerDeclaration> cppCommissionerDeclaration;
@@ -70,14 +70,15 @@ - (instancetype _Nonnull)initWithCppCommissionerDeclaration:(std::shared_ptr<chi
70
70
}
71
71
72
72
- (instancetype )initWithOptions : (NSInteger )errorCode
73
- needsPasscode : (BOOL )needsPasscode
74
- noAppsFound : (BOOL )noAppsFound
75
- passcodeDialogDisplayed : (BOOL )passcodeDialogDisplayed
76
- commissionerPasscode : (BOOL )commissionerPasscode
77
- qRCodeDisplayed : (BOOL )qRCodeDisplayed {
73
+ needsPasscode : (BOOL )needsPasscode
74
+ noAppsFound : (BOOL )noAppsFound
75
+ passcodeDialogDisplayed : (BOOL )passcodeDialogDisplayed
76
+ commissionerPasscode : (BOOL )commissionerPasscode
77
+ qRCodeDisplayed : (BOOL )qRCodeDisplayed
78
+ {
78
79
self = [super init ];
79
80
if (self) {
80
- _errorCode = (CdError)errorCode;
81
+ _errorCode = (CdError) errorCode;
81
82
_needsPasscode = needsPasscode;
82
83
_noAppsFound = noAppsFound;
83
84
_passcodeDialogDisplayed = passcodeDialogDisplayed;
@@ -87,86 +88,95 @@ - (instancetype)initWithOptions:(NSInteger)errorCode
87
88
return self;
88
89
}
89
90
90
- - (CdError)getErrorCode {
91
+ - (CdError)getErrorCode
92
+ {
91
93
return _errorCode;
92
94
}
93
95
94
- - (BOOL )getNeedsPasscode {
96
+ - (BOOL )getNeedsPasscode
97
+ {
95
98
return _needsPasscode;
96
99
}
97
100
98
- - (BOOL )getNoAppsFound {
101
+ - (BOOL )getNoAppsFound
102
+ {
99
103
return _noAppsFound;
100
104
}
101
105
102
- - (BOOL )getPasscodeDialogDisplayed {
106
+ - (BOOL )getPasscodeDialogDisplayed
107
+ {
103
108
return _passcodeDialogDisplayed;
104
109
}
105
110
106
- - (BOOL )getCommissionerPasscode {
111
+ - (BOOL )getCommissionerPasscode
112
+ {
107
113
return _commissionerPasscode;
108
114
}
109
115
110
- - (BOOL )getQRCodeDisplayed {
116
+ - (BOOL )getQRCodeDisplayed
117
+ {
111
118
return _qRCodeDisplayed;
112
119
}
113
120
114
- - (NSString *)description {
121
+ - (NSString *)description
122
+ {
115
123
return [NSString stringWithFormat: @" MCCommissionerDeclaration::errorCode: %@ \n MCCommissionerDeclaration::needsPasscode: %d \n MCCommissionerDeclaration::noAppsFound: %d \n MCCommissionerDeclaration::passcodeDialogDisplayed: %d \n MCCommissionerDeclaration::commissionerPasscode: %d \n MCCommissionerDeclaration::qRCodeDisplayed: %d " ,
116
- [self stringForErrorCode: self .errorCode],
117
- self .needsPasscode,
118
- self .noAppsFound,
119
- self .passcodeDialogDisplayed,
120
- self .commissionerPasscode,
121
- self .qRCodeDisplayed];
124
+ [self stringForErrorCode: self .errorCode],
125
+ self .needsPasscode,
126
+ self .noAppsFound,
127
+ self .passcodeDialogDisplayed,
128
+ self .commissionerPasscode,
129
+ self .qRCodeDisplayed];
122
130
}
123
131
124
- - (NSString *)stringForErrorCode : (CdError)errorCode {
132
+ - (NSString *)stringForErrorCode : (CdError)errorCode
133
+ {
125
134
switch (errorCode) {
126
- case kNoError :
127
- return @" kNoError" ;
128
- case kCommissionableDiscoveryFailed :
129
- return @" kCommissionableDiscoveryFailed" ;
130
- case kPaseConnectionFailed :
131
- return @" kPaseConnectionFailed" ;
132
- case kPaseAuthFailed :
133
- return @" kPaseAuthFailed" ;
134
- case kDacValidationFailed :
135
- return @" kDacValidationFailed" ;
136
- case kAlreadyOnFabric :
137
- return @" kAlreadyOnFabric" ;
138
- case kOperationalDiscoveryFailed :
139
- return @" kOperationalDiscoveryFailed" ;
140
- case kCaseConnectionFailed :
141
- return @" kCaseConnectionFailed" ;
142
- case kCaseAuthFailed :
143
- return @" kCaseAuthFailed" ;
144
- case kConfigurationFailed :
145
- return @" kConfigurationFailed" ;
146
- case kBindingConfigurationFailed :
147
- return @" kBindingConfigurationFailed" ;
148
- case kCommissionerPasscodeNotSupported :
149
- return @" kCommissionerPasscodeNotSupported" ;
150
- case kInvalidIdentificationDeclarationParams :
151
- return @" kInvalidIdentificationDeclarationParams" ;
152
- case kAppInstallConsentPending :
153
- return @" kAppInstallConsentPending" ;
154
- case kAppInstalling :
155
- return @" kAppInstalling" ;
156
- case kAppInstallFailed :
157
- return @" kAppInstallFailed" ;
158
- case kAppInstalledRetryNeeded :
159
- return @" kAppInstalledRetryNeeded" ;
160
- case kCommissionerPasscodeDisabled :
161
- return @" kCommissionerPasscodeDisabled" ;
162
- case kUnexpectedCommissionerPasscodeReady :
163
- return @" kUnexpectedCommissionerPasscodeReady" ;
164
- default :
165
- return @" Unknown Error" ;
135
+ case kNoError :
136
+ return @" kNoError" ;
137
+ case kCommissionableDiscoveryFailed :
138
+ return @" kCommissionableDiscoveryFailed" ;
139
+ case kPaseConnectionFailed :
140
+ return @" kPaseConnectionFailed" ;
141
+ case kPaseAuthFailed :
142
+ return @" kPaseAuthFailed" ;
143
+ case kDacValidationFailed :
144
+ return @" kDacValidationFailed" ;
145
+ case kAlreadyOnFabric :
146
+ return @" kAlreadyOnFabric" ;
147
+ case kOperationalDiscoveryFailed :
148
+ return @" kOperationalDiscoveryFailed" ;
149
+ case kCaseConnectionFailed :
150
+ return @" kCaseConnectionFailed" ;
151
+ case kCaseAuthFailed :
152
+ return @" kCaseAuthFailed" ;
153
+ case kConfigurationFailed :
154
+ return @" kConfigurationFailed" ;
155
+ case kBindingConfigurationFailed :
156
+ return @" kBindingConfigurationFailed" ;
157
+ case kCommissionerPasscodeNotSupported :
158
+ return @" kCommissionerPasscodeNotSupported" ;
159
+ case kInvalidIdentificationDeclarationParams :
160
+ return @" kInvalidIdentificationDeclarationParams" ;
161
+ case kAppInstallConsentPending :
162
+ return @" kAppInstallConsentPending" ;
163
+ case kAppInstalling :
164
+ return @" kAppInstalling" ;
165
+ case kAppInstallFailed :
166
+ return @" kAppInstallFailed" ;
167
+ case kAppInstalledRetryNeeded :
168
+ return @" kAppInstalledRetryNeeded" ;
169
+ case kCommissionerPasscodeDisabled :
170
+ return @" kCommissionerPasscodeDisabled" ;
171
+ case kUnexpectedCommissionerPasscodeReady :
172
+ return @" kUnexpectedCommissionerPasscodeReady" ;
173
+ default :
174
+ return @" Unknown Error" ;
166
175
}
167
176
}
168
177
169
- - (void )logDetail {
178
+ - (void )logDetail
179
+ {
170
180
ChipLogDetail (AppServer, " MCCommissionerDeclaration::logDetail()\n %@" , [self description ]);
171
181
}
172
182
0 commit comments