Skip to content

Commit 20c8a2d

Browse files
authored
Merge pull request #114 from rdkcentral/develop (#121)
* RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * Merge branch 'develop' into feature/RDKEMW-1015_COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC * RDKEMW-1015 : HDMICEC SINK COMRPC
1 parent dbcbf9e commit 20c8a2d

File tree

2 files changed

+345
-1
lines changed

2 files changed

+345
-1
lines changed

apis/HdmiCecSink/IHdmiCecSink.h

Lines changed: 339 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,339 @@
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 2024 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+
22+
#include "Module.h"
23+
24+
// @stubgen:include <com/IIteratorType.h>
25+
26+
namespace WPEFramework
27+
{
28+
namespace Exchange
29+
{
30+
// @json @text:keep
31+
struct EXTERNAL IHdmiCecSink : virtual public Core::IUnknown {
32+
enum { ID = ID_HDMI_CEC_SINK };
33+
34+
struct HdmiCecSinkActivePath
35+
{
36+
uint8_t logicalAddress; /* @text logical address*/
37+
string physicalAddress; /* @text physical address*/
38+
string deviceType; /* @text device type*/
39+
string vendorID; /* @text vendor id*/
40+
string osdName; /* @text osd name*/
41+
};
42+
43+
struct HdmiCecSinkDevices
44+
{
45+
uint8_t logicalAddress; /* @text logical address*/
46+
string physicalAddress; /* @text physical address*/
47+
string deviceType; /* @text device type*/
48+
string cecVersion; /* @text cec version*/
49+
string osdName; /* @text osd name*/
50+
string vendorID; /* @text vendor id*/
51+
string powerStatus; /* @text power status*/
52+
string portNumber; /* @text port number*/
53+
};
54+
55+
struct EXTERNAL HdmiCecSinkSuccess {
56+
bool success;
57+
};
58+
59+
using IHdmiCecSinkActivePathIterator = RPC::IIteratorType<HdmiCecSinkActivePath, ID_HDMI_CEC_SINK_ACTIVE_PATH_ITERATOR>;
60+
using IHdmiCecSinkDeviceListIterator = RPC::IIteratorType<HdmiCecSinkDevices, ID_HDMI_CEC_SINK_DEVICE_LIST_ITERATOR>;
61+
62+
// @event
63+
struct EXTERNAL INotification : virtual public Core::IUnknown
64+
{
65+
enum { ID = ID_HDMI_CEC_SINK_NOTIFICATION };
66+
67+
68+
// @brief Triggered when routing though the HDMI ARC port is successfully established.
69+
// @text arcInitiationEvent
70+
// @param success: Is the operation successful or not
71+
virtual void ArcInitiationEvent(const string success /* @in */) {};
72+
73+
// @brief Triggered when routing though the HDMI ARC port terminates.
74+
// @text arcTerminationEvent
75+
// @param success: Is the operation successful or not
76+
virtual void ArcTerminationEvent(const string success /* @in */) {};
77+
78+
// @brief Triggered when the active source device changes.
79+
// @text onActiveSourceChange
80+
// @param logicalAddress: Logical address of the active source
81+
// @param physicalAddress: Physical address of the active source
82+
virtual void OnActiveSourceChange(const int logicalAddress /* @in */, const string physicalAddress /* @in */) {};
83+
84+
// @brief Triggered when a new device is added to the CEC network.
85+
// @text onDeviceAdded
86+
// @param logicalAddress: Logical address of the added device
87+
virtual void OnDeviceAdded(const int logicalAddress /* @in */) {};
88+
89+
// @brief Triggered when device information changes.
90+
// @text onDeviceInfoUpdated
91+
// @param logicalAddress: Logical address of the device
92+
virtual void OnDeviceInfoUpdated(const int logicalAddress /* @in */) {};
93+
94+
// @brief Triggered when a device is removed from the CEC network.
95+
// @text onDeviceRemoved
96+
// @param logicalAddress: Logical address of the removed device
97+
virtual void OnDeviceRemoved(const int logicalAddress /* @in */) {};
98+
99+
// @brief Triggered when an <Image View ON> CEC message is received from the source device.
100+
// @text onImageViewOnMsg
101+
// @param logicalAddress: Logical address of the device
102+
virtual void OnImageViewOnMsg(const int logicalAddress /* @in */) {};
103+
104+
// @brief Triggered when the source is no longer active.
105+
// @text onInActiveSource
106+
// @param logicalAddress: Logical address of the source
107+
// @param physicalAddress: Physical address of the source
108+
virtual void OnInActiveSource(const int logicalAddress /* @in */, const string physicalAddress /* @in */) {};
109+
110+
// @brief Triggered when a <Text View ON> CEC message is received from the source device.
111+
// @text onTextViewOnMsg
112+
// @param logicalAddress: Logical address of the device
113+
virtual void OnTextViewOnMsg(const int logicalAddress /* @in */) {};
114+
115+
// @brief Triggered when the TV is in standby mode and it receives <Image View ON>/ <Text View ON>/ <Active Source> CEC message from the connected source device.
116+
// @text onWakeupFromStandby
117+
// @param logicalAddress: Logical address of the device
118+
virtual void OnWakeupFromStandby(const int logicalAddress /* @in */) {};
119+
120+
// @brief Triggered when an audio device is added or removed.
121+
// @text reportAudioDeviceConnectedStatus
122+
// @param status: Status of the audio device
123+
// @param audioDeviceConnected: Audio device connected or not
124+
virtual void ReportAudioDeviceConnectedStatus(const string status /* @in */, const string audioDeviceConnected /* @in */) {};
125+
126+
// @brief Triggered when CEC <Report Audio Status> message of device is received.
127+
// @text reportAudioStatusEvent
128+
// @param muteStatus: Mute status of the device
129+
// @param volumeLevel: Volume level of the device
130+
virtual void ReportAudioStatusEvent(const int muteStatus /* @in */, const int volumeLevel /* @in */) {};
131+
132+
// @brief Triggered when CEC <Feature Abort> message of device is received.
133+
// @text reportFeatureAbortEvent
134+
// @param logicalAddress: Logical address of the device
135+
// @param opcode: Opcode of the message
136+
// @param FeatureAbortReason: Reason for the feature abort
137+
virtual void ReportFeatureAbortEvent(const int logicalAddress /* @in */, const int opcode /* @in */, const int FeatureAbortReason /* @in */) {};
138+
139+
// @brief Triggered when the HDMI-CEC is enabled.
140+
// @text reportCecEnabledEvent
141+
// @param cecEnable: HDMI-CEC enabled or not
142+
virtual void ReportCecEnabledEvent(const string cecEnable /* @in */) {};
143+
144+
// @brief Triggered when CEC <Set System Audio Mode> message of device is received.
145+
// @text setSystemAudioModeEvent
146+
// @param audioMode: Audio mode of the device
147+
virtual void SetSystemAudioModeEvent(const string audioMode /* @in */) {};
148+
149+
// @brief Triggered when SAD is received from the connected audio device. See requestShortAudioDescriptor.
150+
// @text shortAudiodescriptorEvent
151+
// @param jsonresponse: JSON response containing the Short Audio Descriptor (SAD) information
152+
virtual void ShortAudiodescriptorEvent(const string& jsonresponse) {};
153+
154+
// @brief Triggered when the source device changes status to STANDBY.
155+
// @text standbyMessageReceived
156+
// @param logicalAddress: Logical address of the device
157+
virtual void StandbyMessageReceived(const int logicalAddress /* @in */) {};
158+
159+
// @brief Triggered when the source device changes.
160+
// @text reportAudioDevicePowerStatus
161+
// @param powerStatus: Power status of the device
162+
virtual void ReportAudioDevicePowerStatus(const int powerStatus /* @in */) {};
163+
164+
165+
};
166+
167+
// @json:omit
168+
virtual Core::hresult Register(Exchange::IHdmiCecSink::INotification *notification) = 0;
169+
// @json:omit
170+
virtual Core::hresult Unregister(Exchange::IHdmiCecSink::INotification *notification) = 0;
171+
// @json:omit
172+
virtual Core::hresult Configure(PluginHost::IShell* service) = 0;
173+
174+
// @brief Gets the Active Route(s) of the HDMI CEC Sink
175+
// @text getActiveRoute
176+
// @param available: Is the active route available or not
177+
// @param length: Length of the active route
178+
// @param pathList: List of active path
179+
// @param ActiveRoute: Active route of the device
180+
// @param success: Is the operation successful or not
181+
virtual Core::hresult GetActiveRoute(bool &available /* @out */, uint8_t &length /* @out */, IHdmiCecSinkActivePathIterator*& pathList /* @out */, string &ActiveRoute /* @out */, bool &success /* @out */) = 0;
182+
183+
// @brief Gets the status of the current active source
184+
// @text getActiveSource
185+
// @param available: Is the active source available or not
186+
// @param logicalAddress: Logical address of the active source
187+
// @param physicalAddress: Physical address of the active source
188+
// @param deviceType: Device type of the active source
189+
// @param cecVersion: CEC version of the active source
190+
// @param osdName: OSD name of the active source
191+
// @param vendorID: Vendor ID of the active source
192+
// @param powerStatus: Power status of the active source
193+
// @param success: Is the operation successful or not
194+
virtual Core::hresult GetActiveSource(bool &available /* @out */, uint8_t &logicalAddress /* @out */, string &physicalAddress /* @out */, string &deviceType /* @out */, string &cecVersion /* @out */, string &osdName /* @out */, string &vendorID /* @out*/, string &powerStatus /* @out */, string &port /* @out */, bool &success /* @out */) = 0;
195+
196+
// @brief Gets audio device connected status
197+
// @text getAudioDeviceConnectedStatus
198+
// @param connected: Is the audio device connected or not
199+
// @param success: Is the operation successful or not
200+
virtual Core::hresult GetAudioDeviceConnectedStatus(bool &connected /* @out */, bool &success /* @out */) = 0;
201+
202+
// @brief Gets the list of devices connected to the HDMI CEC sink
203+
// @text getDeviceList
204+
// @param numberofdevices: Number of devices connected to the HDMI CEC sink
205+
// @param deviceList: List of devices connected to the HDMI CEC sink
206+
// @param success: Is the operation successful or not
207+
virtual Core::hresult GetDeviceList(uint32_t &numberofdevices /* @out */, IHdmiCecSinkDeviceListIterator*& deviceList /* @out */, bool &success /* @out */) = 0;
208+
209+
// @brief Gets the status of the HDMI CEC Sink
210+
// @text getEnabled
211+
// @param enabled: Is the HDMI CEC Sink enabled or not
212+
// @param success: Is the operation successful or not
213+
virtual Core::hresult GetEnabled(bool &enabled /* @out */, bool &success /* @out */) = 0;
214+
215+
// @brief Gets the OSD name of the HDMI CEC Sink
216+
// @text getOSDName
217+
// @param name: OSD name of the HDMI CEC Sink
218+
// @param success: Is the operation successful or not
219+
virtual Core::hresult GetOSDName(string &name /* @out */, bool &success /* @out */) = 0;
220+
221+
// @brief Gets the vendor ID of the HDMI CEC Sink
222+
// @text getVendorId
223+
// @param vendorid: Vendor ID of the HDMI CEC Sink
224+
// @param success: Is the operation successful or not
225+
virtual Core::hresult GetVendorId(string &vendorid /* @out */, bool &success /* @out */) = 0;
226+
227+
// @brief This is a helper debug command for developers. It prints the list of connected devices and properties of connected devices
228+
// @text printDeviceList
229+
// @param printed: Is the device list printed or not
230+
// @param success: Is the operation successful or not
231+
virtual Core::hresult PrintDeviceList(bool &printed /* @out */, bool &success /* @out */) = 0;
232+
233+
// @brief Request the active source in the network
234+
// @text requestActiveSource
235+
// @param success: Is the operation successful or not
236+
virtual Core::hresult RequestActiveSource(HdmiCecSinkSuccess &success /* @out */) = 0;
237+
238+
// @brief Sends the CEC Request Short Audio Descriptor (SAD) message as an
239+
// @text requestShortAudioDescriptor
240+
// @param success: Is the operation successful or not
241+
virtual Core::hresult RequestShortAudioDescriptor(HdmiCecSinkSuccess &success /* @out */) = 0;
242+
243+
// @brief This message is used to power on the connected audio device. Usually sent by the TV when it comes out of standby and detects audio device connected in the network.
244+
// @text sendAudioDevicePowerOnMessage
245+
// @param success: Is the operation successful or not
246+
virtual Core::hresult SendAudioDevicePowerOnMessage(HdmiCecSinkSuccess &success /* @out */) = 0;
247+
248+
// @brief Sends the CEC <Give Audio Status> message to request the audio status.
249+
// @text sendGetAudioStatusMessage
250+
// @param success: Is the operation successful or not
251+
virtual Core::hresult SendGetAudioStatusMessage(HdmiCecSinkSuccess &success /* @out */) = 0;
252+
253+
// @brief Sends the CEC <User Control Pressed> message when TV remote key is pressed.
254+
// @text sendKeyPressEvent
255+
// @param logicalAddress: Logical address of the device
256+
// @param keyCode: Key code of the key press event
257+
// @param success: Is the operation successful or not
258+
virtual Core::hresult SendKeyPressEvent(const uint32_t &logicalAddress /* @in */, const uint32_t &keyCode /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
259+
260+
// @brief Sends the CEC <User Control Pressed> message when TV remote key is pressed.
261+
// @text sendUserControlPressed
262+
// @param logicalAddress: Logical address of the device
263+
// @param keyCode: Key code of the key press event
264+
// @param success: Is the operation successful or not
265+
virtual Core::hresult SendUserControlPressed(const uint32_t &logicalAddress /* @in */, const uint32_t &keyCode /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
266+
267+
// @brief Sends the CEC <User Control Released> message when TV remote key is released.
268+
// @text sendUserControlReleased
269+
// @param logicalAddress: Logical address of the device
270+
// @param success: Is the operation successful or not
271+
virtual Core::hresult SendUserControlReleased(const uint32_t &logicalAddress /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
272+
273+
// @brief Sends the CEC <Standby> message to another CEC device
274+
// @text sendStandbyMessage
275+
// @param success: Is the operation successful or not
276+
virtual Core::hresult SendStandbyMessage(HdmiCecSinkSuccess &success /* @out */) = 0;
277+
278+
// @brief Sets the source device to active (setStreamPath). The source wakes from standby if it’s in the standby state.
279+
// @text setActivePath
280+
// @param activePath: Active path of the device
281+
// @param success: Is the operation successful or not
282+
virtual Core::hresult SetActivePath(const string &activePath /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
283+
284+
// @brief Sets the current active source as TV (physical address 0.0.0.0). This call needs to be made when the TV switches to internal tuner or any apps.
285+
// @text setActiveSource
286+
// @param success: Is the operation successful or not
287+
virtual Core::hresult SetActiveSource(HdmiCecSinkSuccess &success /* @out */) = 0;
288+
289+
// @brief Sets the status of the HDMI CEC Sink
290+
// @text setEnabled
291+
// @param enabled: Is the HDMI CEC Sink enabled or not
292+
// @param success: Is the operation successful or not
293+
virtual Core::hresult SetEnabled(const bool &enabled /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
294+
295+
// @brief Updates the internal data structure with the new menu Language and also broadcasts the <Set Menu Language> CEC message.
296+
// @text setMenuLanguage
297+
// @param language: Menu language to be set
298+
// @param success: Is the operation successful or not
299+
virtual Core::hresult SetMenuLanguage(const string &language /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
300+
301+
// @brief Sets the OSD name of the HDMI CEC Sink
302+
// @text setOSDName
303+
// @param osdName: OSD name of the HDMI CEC Sink
304+
// @param success: Is the operation successful or not
305+
virtual Core::hresult SetOSDName(const string &name /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
306+
307+
// @brief Changes routing while switching between HDMI inputs and TV.
308+
// @text setRoutingChange
309+
// @param oldPort: Old port number
310+
// @param newPort: New port number
311+
// @param success: Is the operation successful or not
312+
virtual Core::hresult SetRoutingChange(const string &oldPort /* @in */, const string &newPort /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
313+
314+
// @brief Enable (or disable) HDMI-CEC Audio Return Channel (ARC) routing. Upon enabling, triggers arcInitiationEvent and upon disabling, triggers arcTerminationEvent.
315+
// @text setupARCRouting
316+
// @param enabled: Is the HDMI-CEC ARC routing enabled or not
317+
// @param success: Is the operation successful or not
318+
virtual Core::hresult SetupARCRouting(const bool &enabled /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
319+
320+
// @brief Sets the vendor ID of the HDMI CEC Sink
321+
// @text setVendorId
322+
// @param vendorId: Vendor ID of the HDMI CEC Sink
323+
// @param success: Is the operation successful or not
324+
virtual Core::hresult SetVendorId(const string &vendorid /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
325+
326+
// @brief Sets the Current Latency Values such as Video Latency, Latency Flags,Audio Output Compensated value and Audio Output Delay by sending <Report Current Latency> message for Dynamic Auto LipSync Feature.
327+
// @text setLatencyInfo
328+
// @param videoLatency: Video Latency value
329+
// @param lowLatencyMode: Low Latency Mode value
330+
// @param audioOutputCompensated: Audio Output Compensated value
331+
// @param audioOutputDelay: Audio Output Delay value
332+
// @param success: Is the operation successful or not
333+
virtual Core::hresult SetLatencyInfo(const string &videoLatency /* @in */, const string &lowLatencyMode /* @in */, const string &audioOutputCompensated /* @in */, const string &audioOutputDelay /* @in */, HdmiCecSinkSuccess &success /* @out */) = 0;
334+
335+
};
336+
337+
} // namespace Exchange
338+
} // namespace WPEFramework
339+

0 commit comments

Comments
 (0)