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+ // @event
35+ struct EXTERNAL INotification : virtual public Core::IUnknown
36+ {
37+ enum { ID = ID_UNIFIEDCASMANAGEMENT_NOTIFICATION };
38+
39+ // @text data
40+ // @brief Sent when the CAS needs to send data to the caller
41+ // @param payload - in - string - Data to transfer. Can be base64 coded if required
42+ // @param source - in - string - Origin of the data (PUBLIC or PRIVATE)
43+ virtual void Event_data (const string& payload, const string& source) {}
44+ };
45+
46+ virtual Core::hresult Register (IUnifiedCASManagement::INotification* notification) = 0;
47+ virtual Core::hresult Unregister (IUnifiedCASManagement::INotification* notification) = 0;
48+
49+ /* *********************manage() - start****************************/
50+ // @text manage
51+ // @brief Manage a well-known CAS (setup CAS management session)
52+ // @param mediaurl - in - string - The URL to tune to (tune://, ocap://, http://, https://)
53+ // @param mode - in - string - The use of the tune request (MODE_NONE, MODE_LIVE, MODE_RECORD, MODE_PLAYBACK)
54+ // @param managementType - in - string - Type of CAS management (MANAGE_NONE, MANAGE_FULL, MANAGE_NO_PSI, MANAGE_NO_TUNER)
55+ // @param casinitdata - in - string - CAS specific initdata for the selected media
56+ // @param casocdmid - in - string - The well-known OCDM ID of the CAS to use
57+ // @param message - out - string
58+ // @param success - out - bool
59+ virtual Core::hresult Manage (const string& mediaurl,
60+ const string& mode,
61+ const string& managementType,
62+ const string& casinitdata,
63+ const string& casocdmid,
64+ string& message /* @out */ ,
65+ bool & success /* @out */ ) = 0;
66+ /* *********************manage() - end******************************/
67+
68+ /* *********************unmanage() - start***************************/
69+ // @text unmanage
70+ // @brief Destroy a management session
71+ // @param message - out - string
72+ // @param success - out - bool
73+ virtual Core::hresult Unmanage (string& message /* @out */ , bool & success /* @out */ ) = 0;
74+ /* *********************unmanage() - end*****************************/
75+
76+ /* *********************send() - start*******************************/
77+ // @text send
78+ // @brief Sends data to the remote CAS
79+ // @param payload - in - string - Data to transfer. Can be base64 coded if required
80+ // @param source - in - string - Origin of the data (PUBLIC or PRIVATE)
81+ // @param message - out - string
82+ // @param success - out - bool
83+ virtual Core::hresult Send (const string& payload, const string& source, string& message /* @out */ , bool & success /* @out */ ) = 0;
84+ /* *********************send() - end*********************************/
85+ };
86+ } // namespace Exchange
87+ } // namespace WPEFramework
0 commit comments