Skip to content

Commit 95accfe

Browse files
authored
RDKEMW-2854: Update IXCast.h
1 parent f88e62c commit 95accfe

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

apis/XCast/IXCast.h

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace WPEFramework {
3434
RUNNING = 0 /* @text running */,
3535
STOPPED = 1/* @text stopped */,
3636
HIDDEN = 2 /* @text suspended */
37-
};
37+
};
3838

3939
enum StandbyBehavior : uint8_t {
4040
ACTIVE = 0 /* @text active */,
@@ -49,6 +49,9 @@ namespace WPEFramework {
4949
INTERNAL = 500 /* @text internal */
5050
};
5151

52+
struct EXTERNAL XCastSuccess {
53+
bool success /* @text success */ /* @brief true if the request was successful, false otherwise */;
54+
};
5255

5356
struct EXTERNAL ApplicationInfo {
5457
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 {
110113
// @param state: Application state
111114
// @param applicationId: Application instance ID
112115
// @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;
114118
/****************************************UpdateApplicationState()*****************************/
115119

116120
/****************************************getProtocolVersion()**********************************/
@@ -125,7 +129,8 @@ namespace WPEFramework {
125129
// @text setManufacturerName
126130
// @brief Sets the manufacturer name of the device
127131
// @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;
129134
/***************************************** setManufacturerName() **********************************/
130135

131136
/****************************************getManufacturerName()**********************************/
@@ -140,7 +145,8 @@ namespace WPEFramework {
140145
// @text setModelName
141146
// @brief Sets the model name of the device
142147
// @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;
144150
/***************************************** setModelName() **********************************/
145151

146152
/****************************************getModelName()**********************************/
@@ -155,7 +161,8 @@ namespace WPEFramework {
155161
// @text setEnabled
156162
// @brief Enable or disable XCAST service
157163
// @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;
159166
/***************************************** setEnabled() **********************************/
160167

161168
/****************************************getEnabled()**********************************/
@@ -170,7 +177,8 @@ namespace WPEFramework {
170177
// @text setStandbyBehavior
171178
// @brief Sets the expected xcast behavior in standby mode
172179
// @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;
174182
/***************************************** setStandbyBehavior() *********************************/
175183

176184
/****************************************getStandbyBehavior()**********************************/
@@ -185,7 +193,8 @@ namespace WPEFramework {
185193
// @text setFriendlyName
186194
// @brief Sets the friendly name of the device
187195
// @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;
189198
/***************************************** setFriendlyName() **********************************/
190199

191200
/****************************************getFriendlyName()**********************************/
@@ -200,14 +209,16 @@ namespace WPEFramework {
200209
// @text registerApplications
201210
// @brief Registers an application
202211
// @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;
204214
/****************************************registerApplications()**********************************/
205215

206216
/****************************************unregisterApplications()**********************************/
207217
// @text unregisterApplications
208218
// @brief Unregisters an application
209219
// @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;
211222
/****************************************unregisterApplications()**********************************/
212223

213224

0 commit comments

Comments
 (0)