@@ -34,7 +34,7 @@ namespace WPEFramework {
34
34
RUNNING = 0 /* @text running */ ,
35
35
STOPPED = 1 /* @text stopped */ ,
36
36
HIDDEN = 2 /* @text suspended */
37
- };
37
+ };
38
38
39
39
enum StandbyBehavior : uint8_t {
40
40
ACTIVE = 0 /* @text active */ ,
@@ -49,6 +49,9 @@ namespace WPEFramework {
49
49
INTERNAL = 500 /* @text internal */
50
50
};
51
51
52
+ struct EXTERNAL XCastSuccess {
53
+ bool success /* @text success */ /* @brief true if the request was successful, false otherwise */ ;
54
+ };
52
55
53
56
struct EXTERNAL ApplicationInfo {
54
57
string appName /* @text name */ /* @brief Application name in request URI must have exact match to one of the names. Otherwise, matching prefix is needed. If the application name in request URI does not match any names or prefixes, then the request shall fail */ ;
@@ -110,7 +113,8 @@ namespace WPEFramework {
110
113
// @param state: Application state
111
114
// @param applicationId: Application instance ID
112
115
// @param error: Error string, if any
113
- virtual Core::hresult UpdateApplicationState (const string& applicationName /* @in @text applicationName */ , const State& state /* @in @text state */ , const string& applicationId /* @in @text applicationId */ , const ErrorCode& error /* @in @text error */ , bool & success /* @out */ ) = 0;
116
+ // @param success: Whether the request succeeded
117
+ virtual Core::hresult UpdateApplicationState (const string& applicationName /* @in @text applicationName */ , const State& state /* @in @text state */ , const string& applicationId /* @in @text applicationId */ , const ErrorCode& error /* @in @text error */ , XCastSuccess& success /* @out */ ) = 0;
114
118
/* ***************************************UpdateApplicationState()*****************************/
115
119
116
120
/* ***************************************getProtocolVersion()**********************************/
@@ -125,7 +129,8 @@ namespace WPEFramework {
125
129
// @text setManufacturerName
126
130
// @brief Sets the manufacturer name of the device
127
131
// @param manufacturer: The Manufacturer name of the device which used to update in dd.xml
128
- virtual Core::hresult SetManufacturerName (const string &manufacturername /* @in @text manufacturer */ , bool & success /* @out */ ) = 0;
132
+ // @param success: Whether the request succeeded
133
+ virtual Core::hresult SetManufacturerName (const string &manufacturername /* @in @text manufacturer */ , XCastSuccess& success /* @out */ ) = 0;
129
134
/* **************************************** setManufacturerName() **********************************/
130
135
131
136
/* ***************************************getManufacturerName()**********************************/
@@ -140,7 +145,8 @@ namespace WPEFramework {
140
145
// @text setModelName
141
146
// @brief Sets the model name of the device
142
147
// @param model: The Model name of the device which used to update in dd.xml
143
- virtual Core::hresult SetModelName (const string &modelname /* @in @text model */ , bool & success /* @out */ ) = 0;
148
+ // @param success: Whether the request succeeded
149
+ virtual Core::hresult SetModelName (const string &modelname /* @in @text model */ , XCastSuccess& success /* @out */ ) = 0;
144
150
/* **************************************** setModelName() **********************************/
145
151
146
152
/* ***************************************getModelName()**********************************/
@@ -155,7 +161,8 @@ namespace WPEFramework {
155
161
// @text setEnabled
156
162
// @brief Enable or disable XCAST service
157
163
// @parm enabled: true for enabled or false for disabled
158
- virtual Core::hresult SetEnabled (const bool & enabled /* @in @text enabled */ , bool & success /* @out */ ) = 0;
164
+ // @param success: Whether the request succeeded
165
+ virtual Core::hresult SetEnabled (const bool & enabled /* @in @text enabled */ , XCastSuccess& success /* @out */ ) = 0;
159
166
/* **************************************** setEnabled() **********************************/
160
167
161
168
/* ***************************************getEnabled()**********************************/
@@ -170,7 +177,8 @@ namespace WPEFramework {
170
177
// @text setStandbyBehavior
171
178
// @brief Sets the expected xcast behavior in standby mode
172
179
// @param standbybehavior: whether to remain active or inactive during standby mode (must be one of the following: active, inactive)
173
- virtual Core::hresult SetStandbyBehavior (const StandbyBehavior &standbybehavior /* @in @text standbybehavior */ , bool & success /* @out */ ) = 0;
180
+ // @param success: Whether the request succeeded
181
+ virtual Core::hresult SetStandbyBehavior (const StandbyBehavior &standbybehavior /* @in @text standbybehavior */ , XCastSuccess& success /* @out */ ) = 0;
174
182
/* **************************************** setStandbyBehavior() *********************************/
175
183
176
184
/* ***************************************getStandbyBehavior()**********************************/
@@ -185,7 +193,8 @@ namespace WPEFramework {
185
193
// @text setFriendlyName
186
194
// @brief Sets the friendly name of the device
187
195
// @param friendlyname: The friendly name of the device which used to display on the client device list
188
- virtual Core::hresult SetFriendlyName (const string &friendlyname /* @in @text friendlyname */ , bool & success /* @out */ ) = 0;
196
+ // @param success: Whether the request succeeded
197
+ virtual Core::hresult SetFriendlyName (const string &friendlyname /* @in @text friendlyname */ , XCastSuccess& success /* @out */ ) = 0;
189
198
/* **************************************** setFriendlyName() **********************************/
190
199
191
200
/* ***************************************getFriendlyName()**********************************/
@@ -200,14 +209,16 @@ namespace WPEFramework {
200
209
// @text registerApplications
201
210
// @brief Registers an application
202
211
// @param applications: Json array with one or more application details to register
203
- virtual Core::hresult RegisterApplications (IApplicationInfoIterator* const appInfoList /* @text applications */ , bool & success /* @out */ ) = 0;
212
+ // @param success: Whether the request succeeded
213
+ virtual Core::hresult RegisterApplications (IApplicationInfoIterator* const appInfoList /* @text applications */ , XCastSuccess& success /* @out */ ) = 0;
204
214
/* ***************************************registerApplications()**********************************/
205
215
206
216
/* ***************************************unregisterApplications()**********************************/
207
217
// @text unregisterApplications
208
218
// @brief Unregisters an application
209
219
// @param applications: One or more application name to unregister
210
- virtual Core::hresult UnregisterApplications (IStringIterator* const applications /* @in @text applications */ , bool & success /* @out */ ) = 0;
220
+ // @param success: Whether the request succeeded
221
+ virtual Core::hresult UnregisterApplications (IStringIterator* const applications /* @in @text applications */ , XCastSuccess& success /* @out */ ) = 0;
211
222
/* ***************************************unregisterApplications()**********************************/
212
223
213
224
0 commit comments