Skip to content

Commit 08ab8fd

Browse files
committed
RDKEMW-1061: RDK-E Add COMRPC
Reason for change: Create the interface file for HdmiCecSource Test Procedure: Risks: low Priority: P1 Signed-off-by:Hayden Gfeller [email protected]
1 parent 05d7b78 commit 08ab8fd

File tree

2 files changed

+35
-15
lines changed

2 files changed

+35
-15
lines changed

HdmiCecSource/HdmiCecSourceImplementation.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ namespace WPEFramework
494494

495495
}
496496

497-
void HdmiCecSourceImplementation::Register(IHdmiCecSource::INotification* notification)
497+
uint32_t HdmiCecSourceImplementation::Register(IHdmiCecSource::INotification* notification)
498498
{
499499

500500
LOGINFO("Register");
@@ -513,6 +513,26 @@ namespace WPEFramework
513513
}
514514
}
515515

516+
517+
uint32_t HdmiCecSourceImplementation::Unregister(IHdmiCecSource::INotification* notification)
518+
{
519+
LOGINFO("Unregister");
520+
if(notification != nullptr){
521+
_adminLock.Lock();
522+
std::list<Exchange::IHdmiCecSource::INotification*>::iterator index = std::find(_hdmiCecSourceNotifications.begin(), _hdmiCecSourceNotifications.end(), notification);
523+
if(index != _hdmiCecSourceNotifications.end())
524+
{
525+
(*index)->Release();
526+
_hdmiCecSourceNotifications.erase(index);
527+
}
528+
else
529+
{
530+
LOGERR("Notification is not registered");
531+
}
532+
_adminLock.Unlock();
533+
}
534+
}
535+
516536
void HdmiCecSourceImplementation::addDevice(const int logicalAddress) {
517537

518538
if(!HdmiCecSourceImplementation::_instance)
@@ -1286,7 +1306,7 @@ namespace WPEFramework
12861306
}
12871307
}
12881308

1289-
uint32_t HdmiCecSourceImplementation::getDeviceList (Exchange::IHdmiCecSource::IHdmiCecSourceDeviceListIterator *&deviceList, bool &success /* @out */)
1309+
uint32_t HdmiCecSourceImplementation::getDeviceList (IHdmiCecSource::IHdmiCecSourceDeviceListIterator *&deviceList, bool &success /* @out */)
12901310
{ //sample servicemanager response:
12911311
LOGINFOMETHOD();
12921312
std::vector<Exchange::HdmiCecSourceDevices> localDevices;

HdmiCecSource/HdmiCecSourceImplementation.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -317,19 +317,19 @@ namespace WPEFramework {
317317
std::list<Exchange::IHdmiCecSource::INotification*> _hdmiCecSourceNotifications;
318318

319319
public:
320-
uint32_t SetEnabled(bool &enabled, bool &success);
321-
uint32_t GetEnabled(bool &enabled, bool &success);
322-
uint32_t SetOTPEnabled(bool &enabled, bool &success);
323-
uint32_t GetOTPEnabled(bool &enabled, bool &success);
324-
uint32_t SetOSDName(const string &name, bool &success);
325-
uint32_t GetOSDName(string &name, bool &success);
326-
uint32_t SetVendorId(const string &vendorid, bool &success);
327-
uint32_t GetVendorId(string &vendorid, bool &success);
328-
uint32_t PerformOTPAction(bool &success);
329-
uint32_t SendStandbyMessage(bool &success);
330-
uint32_t SendKeyPressEvent(const int &logicalAddress, int &keyCode, bool &success);
331-
uint32_t GetActiveSourceStatus(bool &isActiveSource, bool &success);
332-
uint32_t GetDeviceList(Exchange::IHdmiCecSource::IHdmiCecSourceDeviceListIterator*& deviceList, bool &success);
320+
uint32_t SetEnabled(bool &enabled, bool &success) override;
321+
uint32_t GetEnabled(bool &enabled, bool &success) override;
322+
uint32_t SetOTPEnabled(bool &enabled, bool &success) override;
323+
uint32_t GetOTPEnabled(bool &enabled, bool &success) override;
324+
uint32_t SetOSDName(const string &name, bool &success) override;
325+
uint32_t GetOSDName(string &name, bool &success) override;
326+
uint32_t SetVendorId(const string &vendorid, bool &success) override;
327+
uint32_t GetVendorId(string &vendorid, bool &success) override;
328+
uint32_t PerformOTPAction(bool &success) override;
329+
uint32_t SendStandbyMessage(bool &success) override;
330+
uint32_t SendKeyPressEvent(const int &logicalAddress,const int &keyCode, bool &success) override;
331+
uint32_t GetActiveSourceStatus(bool &isActiveSource, bool &success) override;
332+
uint32_t GetDeviceList(IHdmiCecSource::IHdmiCecSourceDeviceListIterator*& deviceList, bool &success) override;
333333
uint32_t Configure(PluginHost::IShell* service) override;
334334
uint32_t Register(IHdmiCecSource::INotification *notification) override;
335335
uint32_t Unregister(IHdmiCecSource::INotification *notification) override;

0 commit comments

Comments
 (0)