Skip to content

Commit 4c4f4fc

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 8d63325 commit 4c4f4fc

File tree

3 files changed

+6
-22
lines changed

3 files changed

+6
-22
lines changed

HdmiCecSource/HdmiCecSource.cpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ namespace WPEFramework
115115
LOGWARN("dtor");
116116
}
117117

118-
const string HdmiCecSource::Initialize(PluginHost::IShell* /* service */)
118+
const string HdmiCecSource::Initialize(PluginHost::IShell *service)
119119
{
120120
LOGWARN("Initlaizing CEC_2");
121121
uint32_t res = Core::ERROR_GENERAL;
@@ -134,7 +134,7 @@ namespace WPEFramework
134134

135135
if(nullptr != _hdmiCecSource)
136136
{
137-
_hdmiCecSource->Configure();
137+
_hdmiCecSource->Configure(service);
138138
_hdmiCecSource->Register(&_hdmiCecSourceNotification);
139139
msg = "HdmiCecSource plugin is available";
140140
LOGINFO("HdmiCecSource plugin is available. Successfully activated HdmiCecSource Plugin");
@@ -158,17 +158,6 @@ namespace WPEFramework
158158
{
159159
_powerManagerPlugin.Reset();
160160
}
161-
LOGINFO("Disconnect from the COM-RPC socket\n");
162-
// Disconnect from the COM-RPC socket
163-
if (_communicatorClient.IsValid())
164-
{
165-
_communicatorClient->Close(RPC::CommunicationTimeOut);
166-
_communicatorClient.Release();
167-
}
168-
if(_engine.IsValid())
169-
{
170-
_engine.Release();
171-
}
172161
_registeredEventHandlers = false;
173162

174163
profileType = searchRdkProfile();

HdmiCecSource/HdmiCecSourceImplementation.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,6 @@ namespace WPEFramework
390390
, _registeredEventHandlers(false)
391391
{
392392
LOGWARN("ctor");
393-
_engine = Core::ProxyType<RPC::InvokeServerType<1, 0, 4>>::Create();
394-
_communicatorClient = Core::ProxyType<RPC::CommunicatorClient>::Create(Core::NodeId("/tmp/communicator"), Core::ProxyType<Core::IIPCServer>(_engine));
395393
HdmiCecSourceImplementation::_instance = this;
396394
}
397395

@@ -420,7 +418,7 @@ namespace WPEFramework
420418

421419
//CEC plugin functionalities will only work if CECmgr is available. If plugin Initialize failure upper layer will call dtor directly.
422420
InitializeIARM();
423-
InitializePowerManager();
421+
InitializePowerManager(service);
424422

425423
// load persistence setting
426424
loadSettings();
@@ -697,9 +695,8 @@ namespace WPEFramework
697695
void HdmiCecSourceImplementation::InitializePowerManager()
698696
{
699697
LOGINFO("Connect the COM-RPC socket\n");
700-
_powerManagerPlugin = PowerManagerInterfaceBuilder(_communicatorClient, _T("org.rdk.PowerManager"))
701-
.withTimeout(3000)
702-
.withVersion(~0)
698+
_powerManagerPlugin = PowerManagerInterfaceBuilder(_T("org.rdk.PowerManager"))
699+
.withIShell(service)
703700
.createInterface();
704701
registerEventHandlers();
705702
}

HdmiCecSource/HdmiCecSourceImplementation.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ namespace WPEFramework {
281281

282282
HdmiCecSourceProcessor *msgProcessor;
283283
HdmiCecSourceFrameListener *msgFrameListener;
284-
void InitializePowerManager();
284+
void InitializePowerManager(PluginHost::IShell *service);
285285
const void InitializeIARM();
286286
void DeinitializeIARM();
287287
static void dsHdmiEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len);
@@ -308,8 +308,6 @@ namespace WPEFramework {
308308
static void threadCecDaemonInitHandler();
309309
static void threadCecStatusUpdateHandler(int data);
310310
uint32_t sendKeyPressEvent(const int logicalAddress, int keyCode);
311-
Core::ProxyType<RPC::InvokeServerType<1, 0, 4> > _engine;
312-
Core::ProxyType<RPC::CommunicatorClient> _communicatorClient;
313311
PowerManagerInterfaceRef _powerManagerPlugin;
314312
Core::Sink<PowerManagerNotification> _pwrMgrNotification;
315313
bool _registeredEventHandlers;

0 commit comments

Comments
 (0)