Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apis/Ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ namespace Exchange {
ID_GOOGLE_CAST_RM_DELEGATE_NOTIFICATION = ID_GOOGLE_CAST + 3,

ID_RESOURCEMANAGER = ID_ENTOS_OFFSET + 0x480,

ID_UNIFIEDCASMANAGEMENT = ID_ENTOS_OFFSET + 0x490,
ID_UNIFIEDCASMANAGEMENT_NOTIFICATION = ID_UNIFIEDCASMANAGEMENT + 1,

}; // enum IDS

} // namespace Exchange
Expand Down
114 changes: 114 additions & 0 deletions apis/UnifiedCASManagement/IUnifiedCASManagement.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2026 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");

Check failure on line 7 in apis/UnifiedCASManagement/IUnifiedCASManagement.h

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'apis/UnifiedCASManagement/IUnifiedCASManagement.h' (Match: peridyno/peridyno/0.4.0, 14 lines, url: https://github.com/peridyno/peridyno/archive/refs/tags/v0.4.0.tar.gz, file: src/Framework/Module/Pipeline.h)
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once
#include "Module.h"

// @stubgen:include <com/IIteratorType.h>

namespace WPEFramework
{
namespace Exchange
{
/* @json 1.0.0 @text:keep */
struct EXTERNAL IUnifiedCASManagement : virtual public Core::IUnknown
{
enum { ID = ID_UNIFIEDCASMANAGEMENT };

// @text tunemode
enum TuneMode : uint8_t {
MODE_NONE = 0,
MODE_LIVE = 1,
MODE_RECORD = 2,
MODE_PLAYBACK = 3
};

// @text managementtype
enum ManagementType : uint8_t {
MANAGE_FULL = 0,
MANAGE_NO_PSI = 1,
MANAGE_NO_TUNER = 2
};

// @text datasource
enum DataSource : uint8_t {
PUBLIC = 0,
PRIVATE = 1
};

// @event
struct EXTERNAL INotification : virtual public Core::IUnknown
{
enum { ID = ID_UNIFIEDCASMANAGEMENT_NOTIFICATION };

// @text onDataReceived
// @alt data
// @brief Sent when the CAS needs to send data to the caller
// @param payload Data to transfer. Can be base64 coded if required
// @param source Origin of the data
virtual void OnDataReceived(const string& payload, const DataSource& source) {}
};

// @brief Register a notification callback
// @param notification: The notification callback object
// @retval Core::ERROR_NONE: Registration successful
// @retval Core::ERROR_ALREADY_CONNECTED: Callback already registered
virtual Core::hresult Register(IUnifiedCASManagement::INotification* notification) = 0;

// @brief Unregister a notification callback
// @param notification: The notification callback object to remove
// @retval Core::ERROR_NONE: Unregistration successful
// @retval Core::ERROR_UNKNOWN_KEY: Callback not found
virtual Core::hresult Unregister(IUnifiedCASManagement::INotification* notification) = 0;

// @text manage
// @brief Manage a well-known CAS (setup CAS management session)
// @param mediaurl The URL to tune to (tune://, ocap://, http://, https://)
// @param mode The use of the tune request
// @param managementType Type of CAS management
// @param casinitdata CAS specific initdata for the selected media
// @param casocdmid The well-known OCDM ID of the CAS to use
// @param success Returns true if the operation succeeded, false otherwise
// @retval Core::ERROR_NONE: Operation successful
// @retval Core::ERROR_GENERAL: Operation failed
virtual Core::hresult Manage(const string& mediaurl,
const TuneMode& mode,
const ManagementType& managementType,
const string& casinitdata,
const string& casocdmid,
bool& success /* @out */) = 0;

// @text unmanage
// @brief Destroy a management session
// @param success Returns true if the operation succeeded, false otherwise
// @retval Core::ERROR_NONE: Operation successful
// @retval Core::ERROR_GENERAL: Operation failed
virtual Core::hresult Unmanage(bool& success /* @out */) = 0;

// @text send
// @brief Sends data to the remote CAS
// @param payload Data to transfer. Can be base64 coded if required
// @param source Origin of the data
// @param success Returns true if the operation succeeded, false otherwise
// @retval Core::ERROR_NONE: Operation successful
// @retval Core::ERROR_GENERAL: Operation failed
virtual Core::hresult Send(const string& payload, const DataSource& source, bool& success /* @out */) = 0;
};
} // namespace Exchange
} // namespace WPEFramework
1 change: 1 addition & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
- [Telemetry](apis/Telemetry.md)
- [TextToSpeech<sup>@</sup>](apis/TextToSpeechPlugin.md)
- [TextTrack](apis/TextTrack.md)
- [UnifiedCASManagement](apis/UnifiedCASManagement.md)
- [USBDevice](apis/USBDevice.md)
- [USBMassStorage](apis/USBMassStorage.md)
- [UserSettings](apis/UserSettings.md)
Expand Down
259 changes: 259 additions & 0 deletions docs/apis/UnifiedCASManagement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
<!-- Generated automatically, DO NOT EDIT! -->
<a id="UnifiedCASManagement_Plugin"></a>
# UnifiedCASManagement Plugin

**Version: [1.0.0](https://github.com/rdkcentral/entservices-apis/tree/main/apis/UnifiedCASManagement/IUnifiedCASManagement.h)**

A UnifiedCASManagement plugin for Thunder framework.

### Table of Contents

- [Abbreviation, Acronyms and Terms](#abbreviation-acronyms-and-terms)
- [Description](#Description)
- [Configuration](#Configuration)
- [Methods](#Methods)
- [Notifications](#Notifications)

<a id="abbreviation-acronyms-and-terms"></a>
# Abbreviation, Acronyms and Terms

[[Refer to this link](overview/aat.md)]

<a id="Description"></a>
# Description

The `UnifiedCASManagement` plugin provides an interface for UnifiedCASManagement.

The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](https://rdkcentral.github.io/Thunder/)].

<a id="Configuration"></a>
# Configuration

The table below lists configuration options of the plugin.

| Name | Type | Description |
| :-------- | :-------- | :-------- |
| callsign | string | Plugin instance name (default: org.rdk.UnifiedCASManagement) |
| classname | string | Class name: *UnifiedCASManagement* |
| locator | string | Library name: *libWPEFrameworkUnifiedCASManagement.so* |
| autostart | boolean | Determines if the plugin shall be started automatically along with the framework |

<a id="Methods"></a>
# Methods

The following methods are provided by the UnifiedCASManagement plugin:

UnifiedCASManagement interface methods:

| Method | Description |
| :-------- | :-------- |
| [manage](#manage) | Manage a well-known CAS (setup CAS management session) |
| [send](#send) | Sends data to the remote CAS |
| [unmanage](#unmanage) | Destroy a management session |

<a id="manage"></a>
## *manage*

Manage a well-known CAS (setup CAS management session)

### Events
Event details will be updated soon.
### Parameters
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| params | object | |
| params.mediaurl | string | The URL to tune to (tune://, ocap://, http://, https://) |
| params.mode | string | The use of the tune request |
| params.managementType | string | Type of CAS management |
| params.casinitdata | string | CAS specific initdata for the selected media |
| params.casocdmid | string | The well-known OCDM ID of the CAS to use |
### Results
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| result | object | |
| result.success | bool | Returns true if the operation succeeded, false otherwise @retval Core::ERROR_NONE: Operation successful @retval Core::ERROR_GENERAL: Operation failed |

### Examples


#### Request

```json
{
"jsonrpc": 2.0,
"id": 0,
"method": "org.rdk.UnifiedCASManagement.manage",
"params": {
"mediaurl": "",
"mode": "MODE_NONE",
"managementType": "MANAGE_FULL",
"casinitdata": "",
"casocdmid": ""
}
}
```


#### CURL Command

```curl
curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 0, "method": "org.rdk.UnifiedCASManagement.manage", "params": {"mediaurl": "", "mode": "MODE_NONE", "managementType": "MANAGE_FULL", "casinitdata": "", "casocdmid": ""}}' http://127.0.0.1:9998/jsonrpc
```


#### Response

```json
{
"jsonrpc": 2.0,
"id": 0,
"result": {
"success": true
}
}
```

<a id="send"></a>
## *send*

Sends data to the remote CAS

### Events
Event details will be updated soon.
### Parameters
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| params | object | |
| params.payload | string | Data to transfer. Can be base64 coded if required |
| params.source | string | Origin of the data |
### Results
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| result | object | |
| result.success | bool | Returns true if the operation succeeded, false otherwise @retval Core::ERROR_NONE: Operation successful @retval Core::ERROR_GENERAL: Operation failed |

### Examples


#### Request

```json
{
"jsonrpc": 2.0,
"id": 1,
"method": "org.rdk.UnifiedCASManagement.send",
"params": {
"payload": "",
"source": "PUBLIC"
}
}
```


#### CURL Command

```curl
curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 1, "method": "org.rdk.UnifiedCASManagement.send", "params": {"payload": "", "source": "PUBLIC"}}' http://127.0.0.1:9998/jsonrpc
```


#### Response

```json
{
"jsonrpc": 2.0,
"id": 1,
"result": {
"success": true
}
}
```

<a id="unmanage"></a>
## *unmanage*

Destroy a management session

### Events
Event details will be updated soon.
### Parameters
This method takes no parameters.
### Results
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| result | object | |
| result.success | bool | Returns true if the operation succeeded, false otherwise @retval Core::ERROR_NONE: Operation successful @retval Core::ERROR_GENERAL: Operation failed |

### Examples


#### Request

```json
{
"jsonrpc": 2.0,
"id": 2,
"method": "org.rdk.UnifiedCASManagement.unmanage"
}
```


#### CURL Command

```curl
curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 2, "method": "org.rdk.UnifiedCASManagement.unmanage"}' http://127.0.0.1:9998/jsonrpc
```


#### Response

```json
{
"jsonrpc": 2.0,
"id": 2,
"result": {
"success": true
}
}
```



<a id="Notifications"></a>
# Notifications

Notifications are autonomous events, triggered by the internals of the implementation, and broadcasted via JSON-RPC to all registered observers. Refer to [[Thunder](https://rdkcentral.github.io/Thunder/)] for information on how to register for a notification.

The following events are provided by the UnifiedCASManagement plugin:

UnifiedCASManagement interface events:

| Event | Description |
| :-------- | :-------- |
| [data](#data) | Sent when the CAS needs to send data to the caller |

<a id="onDataReceived"></a>
## *onDataReceived*

Sent when the CAS needs to send data to the caller

### Parameters
| Name | Type | Description |
| :-------- | :-------- | :-------- |
| params | object | |
| params.payload | string | Data to transfer. Can be base64 coded if required |
| params.source | string | Origin of the data |

### Examples

```json
{
"jsonrpc": 2.0,
"id": 3,
"method": "org.rdk.UnifiedCASManagement.onDataReceived",
"params": {
"payload": "",
"source": "PUBLIC"
}
}
```
Loading