|
| 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 onDataReceived |
| 40 | + // @alt data |
| 41 | + // @brief Sent when the CAS needs to send data to the caller |
| 42 | + // @param payload Data to transfer. Can be base64 coded if required |
| 43 | + // @param source Origin of the data (PUBLIC or PRIVATE) |
| 44 | + virtual void OnDataReceived(const string& payload, const string& source) {} |
| 45 | + }; |
| 46 | + |
| 47 | + // @brief Register a notification callback |
| 48 | + // @param notification: The notification callback object |
| 49 | + // @retval Core::ERROR_NONE: Registration successful |
| 50 | + // @retval Core::ERROR_ALREADY_CONNECTED: Callback already registered |
| 51 | + virtual Core::hresult Register(IUnifiedCASManagement::INotification* notification) = 0; |
| 52 | + |
| 53 | + // @brief Unregister a notification callback |
| 54 | + // @param notification: The notification callback object to remove |
| 55 | + // @retval Core::ERROR_NONE: Unregistration successful |
| 56 | + // @retval Core::ERROR_UNKNOWN_KEY: Callback not found |
| 57 | + virtual Core::hresult Unregister(IUnifiedCASManagement::INotification* notification) = 0; |
| 58 | + |
| 59 | + // @text manage |
| 60 | + // @brief Manage a well-known CAS (setup CAS management session) |
| 61 | + // @param mediaurl The URL to tune to (tune://, ocap://, http://, https://) |
| 62 | + // @param mode The use of the tune request (MODE_NONE, MODE_LIVE, MODE_RECORD, MODE_PLAYBACK) |
| 63 | + // @param managementType Type of CAS management (MANAGE_NONE, MANAGE_FULL, MANAGE_NO_PSI, MANAGE_NO_TUNER) |
| 64 | + // @param casinitdata CAS specific initdata for the selected media |
| 65 | + // @param casocdmid The well-known OCDM ID of the CAS to use |
| 66 | + // @param success |
| 67 | + // @retval Core::ERROR_NONE: Operation successful |
| 68 | + // @retval Core::ERROR_GENERAL: Operation failed |
| 69 | + virtual Core::hresult Manage(const string& mediaurl, |
| 70 | + const string& mode, |
| 71 | + const string& managementType, |
| 72 | + const string& casinitdata, |
| 73 | + const string& casocdmid, |
| 74 | + bool& success /* @out */) = 0; |
| 75 | + |
| 76 | + // @text unmanage |
| 77 | + // @brief Destroy a management session |
| 78 | + // @param success |
| 79 | + // @retval Core::ERROR_NONE: Operation successful |
| 80 | + // @retval Core::ERROR_GENERAL: Operation failed |
| 81 | + virtual Core::hresult Unmanage(bool& success /* @out */) = 0; |
| 82 | + |
| 83 | + // @text send |
| 84 | + // @brief Sends data to the remote CAS |
| 85 | + // @param payload Data to transfer. Can be base64 coded if required |
| 86 | + // @param source Origin of the data (PUBLIC or PRIVATE) |
| 87 | + // @param success |
| 88 | + // @retval Core::ERROR_NONE: Operation successful |
| 89 | + // @retval Core::ERROR_GENERAL: Operation failed |
| 90 | + virtual Core::hresult Send(const string& payload, const string& source, bool& success /* @out */) = 0; |
| 91 | + }; |
| 92 | + } // namespace Exchange |
| 93 | +} // namespace WPEFramework |
0 commit comments