Skip to content

Commit 5e3cc5f

Browse files
committed
RDKEMW-1000 : Add COM-RPC support to UnifiedCASManagement plugin
Reason For Change: Adding UnifiedCASManagement interface header Changes Test procedure : Test UnifiedCASManagement Priority: P1 Signed-off-by: naveen-0206 <naveenkumar.t@ltts.com>
1 parent 9264df6 commit 5e3cc5f

File tree

2 files changed

+117
-0
lines changed

2 files changed

+117
-0
lines changed

apis/Ids.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,9 @@ namespace Exchange {
344344
ID_GOOGLE_CAST_RM_DELEGATE = ID_GOOGLE_CAST + 2,
345345
ID_GOOGLE_CAST_RM_DELEGATE_NOTIFICATION = ID_GOOGLE_CAST + 3,
346346

347+
ID_UNIFIEDCASMANAGEMENT = ID_ENTOS_OFFSET + 0x490,
348+
ID_UNIFIEDCASMANAGEMENT_NOTIFICATION = ID_UNIFIEDCASMANAGEMENT + 1,
349+
347350
}; // enum IDS
348351

349352
} // namespace Exchange
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
/*
2+
* If not stated otherwise in this file or this component's LICENSE file the
3+
* following copyright and licenses apply:
4+
*
5+
* Copyright 2026 RDK Management
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
20+
#pragma once
21+
#include "Module.h"
22+
23+
// @stubgen:include <com/IIteratorType.h>
24+
25+
namespace WPEFramework
26+
{
27+
namespace Exchange
28+
{
29+
/* @json 1.0.0 @text:keep */
30+
struct EXTERNAL IUnifiedCASManagement : virtual public Core::IUnknown
31+
{
32+
enum { ID = ID_UNIFIEDCASMANAGEMENT };
33+
34+
// @text tunemode
35+
enum TuneMode : uint8_t {
36+
MODE_NONE = 0,
37+
MODE_LIVE = 1,
38+
MODE_RECORD = 2,
39+
MODE_PLAYBACK = 3
40+
};
41+
42+
// @text managementtype
43+
enum ManagementType : uint8_t {
44+
MANAGE_FULL = 0,
45+
MANAGE_NO_PSI = 1,
46+
MANAGE_NO_TUNER = 2
47+
};
48+
49+
// @text datasource
50+
enum DataSource : uint8_t {
51+
PUBLIC = 0,
52+
PRIVATE = 1
53+
};
54+
55+
// @event
56+
struct EXTERNAL INotification : virtual public Core::IUnknown
57+
{
58+
enum { ID = ID_UNIFIEDCASMANAGEMENT_NOTIFICATION };
59+
60+
// @text onDataReceived
61+
// @alt data
62+
// @brief Sent when the CAS needs to send data to the caller
63+
// @param payload Data to transfer. Can be base64 coded if required
64+
// @param source Origin of the data
65+
virtual void OnDataReceived(const string& payload, const DataSource& source) {}
66+
};
67+
68+
// @brief Register a notification callback
69+
// @param notification: The notification callback object
70+
// @retval Core::ERROR_NONE: Registration successful
71+
// @retval Core::ERROR_ALREADY_CONNECTED: Callback already registered
72+
virtual Core::hresult Register(IUnifiedCASManagement::INotification* notification) = 0;
73+
74+
// @brief Unregister a notification callback
75+
// @param notification: The notification callback object to remove
76+
// @retval Core::ERROR_NONE: Unregistration successful
77+
// @retval Core::ERROR_UNKNOWN_KEY: Callback not found
78+
virtual Core::hresult Unregister(IUnifiedCASManagement::INotification* notification) = 0;
79+
80+
// @text manage
81+
// @brief Manage a well-known CAS (setup CAS management session)
82+
// @param mediaurl The URL to tune to (tune://, ocap://, http://, https://)
83+
// @param mode The use of the tune request
84+
// @param managementType Type of CAS management
85+
// @param casinitdata CAS specific initdata for the selected media
86+
// @param casocdmid The well-known OCDM ID of the CAS to use
87+
// @param success Returns true if the operation succeeded, false otherwise
88+
// @retval Core::ERROR_NONE: Operation successful
89+
// @retval Core::ERROR_GENERAL: Operation failed
90+
virtual Core::hresult Manage(const string& mediaurl,
91+
const TuneMode& mode,
92+
const ManagementType& managementType,
93+
const string& casinitdata,
94+
const string& casocdmid,
95+
bool& success /* @out */) = 0;
96+
97+
// @text unmanage
98+
// @brief Destroy a management session
99+
// @param success Returns true if the operation succeeded, false otherwise
100+
// @retval Core::ERROR_NONE: Operation successful
101+
// @retval Core::ERROR_GENERAL: Operation failed
102+
virtual Core::hresult Unmanage(bool& success /* @out */) = 0;
103+
104+
// @text send
105+
// @brief Sends data to the remote CAS
106+
// @param payload Data to transfer. Can be base64 coded if required
107+
// @param source Origin of the data
108+
// @param success Returns true if the operation succeeded, false otherwise
109+
// @retval Core::ERROR_NONE: Operation successful
110+
// @retval Core::ERROR_GENERAL: Operation failed
111+
virtual Core::hresult Send(const string& payload, const DataSource& source, bool& success /* @out */) = 0;
112+
};
113+
} // namespace Exchange
114+
} // namespace WPEFramework

0 commit comments

Comments
 (0)