You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/apis/XCastPlugin.md
+29-85Lines changed: 29 additions & 85 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,14 +45,13 @@ XCast interface methods:
45
45
46
46
| Method | Description |
47
47
| :-------- | :-------- |
48
-
|[getApiVersionNumber](#getApiVersionNumber)| Gets the API version number |
49
48
|[getEnabled](#getEnabled)| Reports whether xcast plugin is enabled or disabled |
50
49
|[getFriendlyName](#getFriendlyName)| Returns the friendly name set by setFriendlyName API |
51
50
|[getManufacturerName](#getManufacturerName)| Returns the friendly name set by setManufacturerName API |
52
51
|[getModelName](#getModelName)| Returns the friendly name set by setModelName API |
53
52
|[getProtocolVersion](#getProtocolVersion)| Returns the DIAL protocol version supported by the server |
54
53
|[getStandbyBehavior](#getStandbyBehavior)| Return current standby behavior option string set uisng setStandbyBehavior or default value |
55
-
|[onApplicationStateChanged](#onApplicationStateChanged)| Provides notification whenever an application changes state due to user activity, an internal error, or other reasons |
54
+
|[setApplicationState](#setApplicationState)| Provides notification whenever an application changes state due to user activity, an internal error, or other reasons |
56
55
|[registerApplications](#registerApplications)| Registers an application |
57
56
|[unregisterApplications](#unregisterApplications)| Unregisters an application |
58
57
|[setEnabled](#setEnabled)| Enable or disable XCAST service |
@@ -62,52 +61,6 @@ XCast interface methods:
62
61
|[setStandbyBehavior](#setStandbyBehavior)| Sets the expected xcast behavior in standby mode |
63
62
64
63
65
-
<aname="getApiVersionNumber"></a>
66
-
## *getApiVersionNumber*
67
-
68
-
Gets the API version number.
69
-
70
-
### Events
71
-
72
-
No Events
73
-
74
-
### Parameters
75
-
76
-
This method takes no parameters.
77
-
78
-
### Result
79
-
80
-
| Name | Type | Description |
81
-
| :-------- | :-------- | :-------- |
82
-
| result | object ||
83
-
| result.version | integer | a version number |
84
-
| result.success | boolean | Whether the request succeeded |
85
-
86
-
### Example
87
-
88
-
#### Request
89
-
90
-
```json
91
-
{
92
-
"jsonrpc": "2.0",
93
-
"id": 42,
94
-
"method": "org.rdk.Xcast.getApiVersionNumber"
95
-
}
96
-
```
97
-
98
-
#### Response
99
-
100
-
```json
101
-
{
102
-
"jsonrpc": "2.0",
103
-
"id": 42,
104
-
"result": {
105
-
"version": 1,
106
-
"success": true
107
-
}
108
-
}
109
-
```
110
-
111
64
<aname="getEnabled"></a>
112
65
## *getEnabled*
113
66
@@ -386,8 +339,8 @@ This method takes no parameters.
386
339
}
387
340
```
388
341
389
-
<aname="onApplicationStateChanged"></a>
390
-
## *onApplicationStateChanged*
342
+
<aname="setApplicationState"></a>
343
+
## *setApplicationState*
391
344
392
345
Provides notification whenever an application changes state due to user activity, an internal error, or other reasons. For singleton applications, the `applicationId` parameter is optional. If an application request is denied, fails to fulfill, or the state change is triggered by an internal error, then a predefined error string should be included. This error may be translated to an XCast client.
| params.applications | array | Json array with one or more application details to register |
470
423
| params.applications[#]| object ||
471
-
| params.applications[#].names | array | case-sensitive. Group of acceptable names for a related application. 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 |
472
-
| params.applications[#].names[#]| string ||
473
-
| params.applications[#]?.prefixes | array | <sup>*(optional)*</sup> If the application name in request URI does not match the list of names, it must contain one of the prefixes.If the application name in request URI does not match any names or prefixes, then the request shall fail |
| params.applications[#]?.properties | object | <sup>*(optional)*</sup> specific application properties applicable to app management. If not present in descriptor, the default value is assumed |
478
-
| params.applications[#]?.properties.allowStop | boolean | is the application (matching name list or prefix list) allowed to stop (no PID presence) after launched |
479
-
| params.applications[#]?.launchParameters | object | <sup>*(optional)*</sup> launchParameters that application wants dial-server to append before sending the request to launch application |
480
-
| params.applications[#]?.launchParameters.query | string | query string that need to be appended in launch request |
481
-
| params.applications[#]?.launchParameters.payload | string | optional payload string that need to be appended in launch request |
424
+
| params.applications[#]?.name | string | <sup>*(optional)*</sup> case-sensitive. 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 |
425
+
| params.applications[#]?.prefix | string | <sup>*(optional)*</sup> If the application name in request URI does not match the list of names, it must contain one of the prefixes.If the application name in request URI does not match any names or prefixes, then the request shall fail |
426
+
| params.applications[#]?.cors | string | <sup>*(optional)*</sup> a set of origins allowed for the application. This must not be empty |
427
+
| params.applications[#]?.query | string | <sup>*(optional)*</sup> query string that need to be appended in launch request |
428
+
| params.applications[#]?.payload | string | <sup>*(optional)*</sup> optional payload string that need to be appended in launch request |
429
+
| params.applications[#]?.allowStop | boolean | <sup>*(optional)*</sup> is the application (matching name list or prefix list) allowed to stop (no PID presence) after launched |
482
430
483
431
### Result
484
432
@@ -499,22 +447,12 @@ No Events
499
447
"params": {
500
448
"applications": [
501
449
{
502
-
"names": [
503
-
"Youtube"
504
-
],
505
-
"prefixes": [
506
-
"myYouTube"
507
-
],
508
-
"cors": [
509
-
".youtube.com"
510
-
],
511
-
"properties": {
512
-
"allowStop": true
513
-
},
514
-
"launchParameters": {
515
-
"query": "source_type=12",
516
-
"payload": "..."
517
-
}
450
+
"name": "Youtube",
451
+
"prefix": "myYouTube",
452
+
"cors": ".youtube.com",
453
+
"query": "source_type=12",
454
+
"payload": "...",
455
+
"allowStop": true
518
456
}
519
457
]
520
458
}
@@ -547,7 +485,8 @@ No Events
547
485
| Name | Type | Description |
548
486
| :-------- | :-------- | :-------- |
549
487
| params | object ||
550
-
| params.applications | string | One or more application name to unregister |
488
+
| params.applications | array | case-sensitive. Group of Application names 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 |
489
+
| params.applications[#]| string ||
551
490
552
491
### Result
553
492
@@ -566,7 +505,9 @@ No Events
566
505
"id": 42,
567
506
"method": "org.rdk.Xcast.unregisterApplications",
568
507
"params": {
569
-
"applications": "['YouTube', 'Netflix']"
508
+
"applications": [
509
+
"Youtube"
510
+
]
570
511
}
571
512
}
572
513
```
@@ -892,8 +833,10 @@ Upon launching the application, the resident application is responsible for call
892
833
| :-------- | :-------- | :-------- |
893
834
| params | object ||
894
835
| params.applicationName | string | Registered application name |
895
-
| params.parameters | object | The format and interpretation is determined between the application launcher or cast target and the cast client for each application. For example, a Netflix DIAL-client returns a `pluginURL` parameter with the application launch string. A Youtube DIAL-client returns a `url` parameter with the application launch string |
| params?.strPayLoad | string | <sup>*(optional)*</sup> optional payload string that need to be appended in launch request |
837
+
| params?.strQuery | string | <sup>*(optional)*</sup> query string that need to be appended in launch request |
838
+
| params?.strAddDataUrl | string | <sup>*(optional)*</sup> optional Additional data URL to be passed to the application |
839
+
| params?.parameters | string | <sup>*(optional)*</sup> Application launch string AND The format and interpretation is determined between the application launcher or cast target and the cast client for each application |
897
840
898
841
### Example
899
842
@@ -903,9 +846,10 @@ Upon launching the application, the resident application is responsible for call
Copy file name to clipboardExpand all lines: tools/json_generator/output/XCast/XCast.json
+56-88Lines changed: 56 additions & 88 deletions
Original file line number
Diff line number
Diff line change
@@ -49,8 +49,13 @@
49
49
"type": "string",
50
50
"example": "active"
51
51
},
52
-
"names": {
53
-
"summary": "case-sensitive. Group of acceptable names for a related application. 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.",
52
+
"appname": {
53
+
"summary": "case-sensitive. 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.",
54
+
"type": "string",
55
+
"example": "Youtube"
56
+
},
57
+
"appnames": {
58
+
"summary": "case-sensitive. Group of Application names 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.",
54
59
"type": "array",
55
60
"items": {
56
61
"type": "string",
@@ -59,75 +64,58 @@
59
64
},
60
65
"prefixes": {
61
66
"summary": "If the application name in request URI does not match the list of names, it must contain one of the prefixes.If the application name in request URI does not match any names or prefixes, then the request shall fail.",
62
-
"type": "array",
63
-
"items": {
64
-
"type": "string",
65
-
"example": "myYouTube"
66
-
}
67
+
"type": "string",
68
+
"example": "myYouTube"
67
69
},
68
70
"cors": {
69
71
"summary": "a set of origins allowed for the application. This must not be empty",
70
-
"type": "array",
71
-
"items": {
72
-
"type": "string",
73
-
"example": ".youtube.com"
74
-
}
72
+
"type": "string",
73
+
"example": ".youtube.com"
75
74
},
76
-
"properties": {
77
-
"summary": "specific application properties applicable to app management. If not present in descriptor, the default value is assumed",
78
-
"type": "object",
79
-
"properties": {
80
-
"allowStop": {
81
-
"summary": "is the application (matching name list or prefix list) allowed to stop (no PID presence) after launched",
82
-
"type": "boolean",
83
-
"example": true
84
-
}
85
-
},
86
-
"required":[
87
-
"allowStop"
88
-
]
89
-
},
90
-
"launchParameters": {
91
-
"summary": "launchParameters that application wants dial-server to append before sending the request to launch application",
92
-
"type": "object",
93
-
"properties": {
94
-
"query": {
95
-
"summary": "query string that need to be appended in launch request",
96
-
"type": "string",
97
-
"example": "source_type=12"
98
-
},
99
-
"payload": {
100
-
"summary": "optional payload string that need to be appended in launch request",
101
-
"type": "string",
102
-
"example": ""
103
-
}
104
-
},
105
-
"required":[
106
-
"query",
107
-
"payload"
108
-
]
75
+
"query": {
76
+
"summary": "query string that need to be appended in launch request",
77
+
"type": "string",
78
+
"example": "source_type=12"
79
+
},
80
+
"payload": {
81
+
"summary": "optional payload string that need to be appended in launch request",
82
+
"type": "string",
83
+
"example": ""
84
+
},
85
+
"AddDataUrl": {
86
+
"summary": "optional Additional data URL to be passed to the application",
87
+
"type": "string",
88
+
"example": ""
89
+
},
90
+
"allowStop": {
91
+
"summary": "is the application (matching name list or prefix list) allowed to stop (no PID presence) after launched",
92
+
"type": "boolean",
93
+
"example": true
109
94
},
110
95
"applicationsList": {
111
96
"summary": "Json array with one or more application details to register",
112
97
"type": "array",
113
98
"items": {
114
99
"type": "object",
115
100
"properties": {
116
-
"names": {
117
-
"$ref": "#/definitions/names"
101
+
"name": {
102
+
"$ref": "#/definitions/appname"
118
103
},
119
-
"prefixes": {
104
+
"prefix": {
120
105
"$ref": "#/definitions/prefixes"
121
106
},
122
107
"cors": {
123
108
"$ref": "#/definitions/cors"
124
109
},
125
-
"properties": {
126
-
"$ref": "#/definitions/properties"
110
+
"query": {
111
+
"$ref": "#/definitions/query"
127
112
},
128
-
"launchParameters": {
129
-
"$ref": "#/definitions/launchParameters"
130
-
}
113
+
"payload": {
114
+
"$ref": "#/definitions/payload"
115
+
},
116
+
"allowStop": {
117
+
"$ref": "#/definitions/allowStop"
118
+
}
131
119
},
132
120
"required":[
133
121
"names",
@@ -142,26 +130,6 @@
142
130
}
143
131
},
144
132
"methods": {
145
-
"getApiVersionNumber":{
146
-
"summary": "Gets the API version number.",
147
-
"result": {
148
-
"type":"object",
149
-
"properties": {
150
-
"version": {
151
-
"description": "a version number",
152
-
"type":"integer",
153
-
"example": 1
154
-
},
155
-
"success": {
156
-
"$ref": "#/common/success"
157
-
}
158
-
},
159
-
"required": [
160
-
"version",
161
-
"success"
162
-
]
163
-
}
164
-
},
165
133
"getEnabled":{
166
134
"summary": "Reports whether xcast plugin is enabled or disabled.",
167
135
"result": {
@@ -272,7 +240,7 @@
272
240
]
273
241
}
274
242
},
275
-
"onApplicationStateChanged":{
243
+
"setApplicationState":{
276
244
"summary": "Provides notification whenever an application changes state due to user activity, an internal error, or other reasons. For singleton applications, the `applicationId` parameter is optional. If an application request is denied, fails to fulfill, or the state change is triggered by an internal error, then a predefined error string should be included. This error may be translated to an XCast client. \n\nThe following table provides a client error mapping example: \n\n| Error | Description | HTTP Status Codes | \n| :-------- | :-------- | :-------- | \n| `none` | The request (start/stop) is fulfilled successfully | HTTP 200 OK | \n| `forbidden` | The user is not allowed to change the state of the application. This is not related to user account authentication of the native application | HTTP 403 Forbidden | \n| `unavailable` | The target native application is not available on the device | HTTP 404 Not Found | \n| `invalid` | The request is invalid (bad parameter for example) | HTTP 400 Bad Request | \n| `internal` | The server failed to fulfill the request (server error) | HTTP 500 Internal |",
277
245
"params": {
278
246
"type":"object",
@@ -323,9 +291,7 @@
323
291
"type":"object",
324
292
"properties": {
325
293
"applications": {
326
-
"summary": "One or more application name to unregister",
327
-
"type": "string",
328
-
"example": ["YouTube","Netflix"]
294
+
"$ref": "#/definitions/appnames"
329
295
}
330
296
},
331
297
"required": [
@@ -451,21 +417,23 @@
451
417
"applicationName": {
452
418
"$ref": "#/definitions/applicationName"
453
419
},
420
+
"strPayLoad": {
421
+
"$ref": "#/definitions/payload"
422
+
},
423
+
"strQuery": {
424
+
"$ref": "#/definitions/query"
425
+
},
426
+
"strAddDataUrl": {
427
+
"$ref": "#/definitions/AddDataUrl"
428
+
},
454
429
"parameters": {
455
-
"summary":"The format and interpretation is determined between the application launcher or cast target and the cast client for each application. For example, a Netflix DIAL-client returns a `pluginURL` parameter with the application launch string. A Youtube DIAL-client returns a `url` parameter with the application launch string.",
456
-
"type":"object",
457
-
"properties": {
458
-
"pluginUrl":{
459
-
"summary":"Application launch string",
460
-
"type":"string",
461
-
"example": "https://www.netflix.com"
462
-
}
463
-
}
430
+
"summary":"Application launch string AND The format and interpretation is determined between the application launcher or cast target and the cast client for each application.",
0 commit comments