68
68
#define CEC_SETTING_OSD_NAME " cecOSDName"
69
69
#define CEC_SETTING_VENDOR_ID " cecVendorId"
70
70
71
-
72
- enum {
73
- HDMICECSOURCE_EVENT_DEVICE_ADDED=0 ,
74
- HDMICECSOURCE_EVENT_DEVICE_REMOVED,
75
- HDMICECSOURCE_EVENT_DEVICE_INFO_UPDATED,
76
- HDMICECSOURCE_EVENT_ACTIVE_SOURCE_STATUS_UPDATED,
77
- };
78
-
79
- static const char *eventString[] = {
80
- " onDeviceAdded" ,
81
- " onDeviceRemoved" ,
82
- " onDeviceInfoUpdated" ,
83
- " onActiveSourceStatusUpdated"
84
- };
85
-
86
71
static std::vector<uint8_t > defaultVendorId = {0x00 ,0x19 ,0xFB };
87
72
static VendorID appVendorId = {defaultVendorId.at (0 ),defaultVendorId.at (1 ),defaultVendorId.at (2 )};
88
73
static VendorID lgVendorId = {0x00 ,0xE0 ,0x91 };
@@ -145,7 +130,7 @@ namespace WPEFramework
145
130
else
146
131
isDeviceActiveSource = false ;
147
132
LOGINFO (" ActiveSource isDeviceActiveSource status :%d \n " , isDeviceActiveSource);
148
- HdmiCecSourceImplementation::_instance->OnActiveSourceStatusUpdated ();
133
+ HdmiCecSourceImplementation::_instance->sendActiveSourceEvent ();
149
134
HdmiCecSourceImplementation::_instance->addDevice (header.from .toInt ());
150
135
}
151
136
void HdmiCecSourceProcessor::process (const InActiveSource &msg, const Header &header)
@@ -285,7 +270,7 @@ namespace WPEFramework
285
270
else
286
271
isDeviceActiveSource = false ;
287
272
LOGINFO (" physical_addr : %s isDeviceActiveSource :%d \n " ,physical_addr.toString ().c_str (),isDeviceActiveSource);
288
- HdmiCecSourceImplementation::_instance->OnActiveSourceStatusUpdated ();
273
+ HdmiCecSourceImplementation::_instance->sendActiveSourceEvent ();
289
274
}
290
275
void HdmiCecSourceProcessor::process (const RoutingInformation &msg, const Header &header)
291
276
{
@@ -296,7 +281,7 @@ namespace WPEFramework
296
281
else
297
282
isDeviceActiveSource = false ;
298
283
LOGINFO (" physical_addr : %s isDeviceActiveSource :%d \n " ,physical_addr.toString ().c_str (),isDeviceActiveSource);
299
- HdmiCecSourceImplementation::_instance->OnActiveSourceStatusUpdated ();
284
+ HdmiCecSourceImplementation::_instance->sendActiveSourceEvent ();
300
285
}
301
286
void HdmiCecSourceProcessor::process (const SetStreamPath &msg, const Header &header)
302
287
{
@@ -307,7 +292,7 @@ namespace WPEFramework
307
292
else
308
293
isDeviceActiveSource = false ;
309
294
LOGINFO (" physical_addr : %s isDeviceActiveSource :%d \n " ,physical_addr.toString ().c_str (),isDeviceActiveSource);
310
- HdmiCecSourceImplementation::_instance->OnActiveSourceStatusUpdated ();
295
+ HdmiCecSourceImplementation::_instance->sendActiveSourceEvent ();
311
296
312
297
}
313
298
void HdmiCecSourceProcessor::process (const GetMenuLanguage &msg, const Header &header)
@@ -685,7 +670,7 @@ namespace WPEFramework
685
670
686
671
}
687
672
688
- uint32_t HdmiCecSourceImplementation::SendStandbyMessage (bool success)
673
+ uint32_t HdmiCecSourceImplementation::SendStandbyMessage (bool & success)
689
674
{
690
675
bool ret = false ;
691
676
@@ -720,7 +705,7 @@ namespace WPEFramework
720
705
}
721
706
}
722
707
723
- void HdmiCecSourceImplementation::InitializePowerManager ()
708
+ void HdmiCecSourceImplementation::InitializePowerManager (PluginHost::IShell *service )
724
709
{
725
710
LOGINFO (" Connect the COM-RPC socket\n " );
726
711
_powerManagerPlugin = PowerManagerInterfaceBuilder (_T (" org.rdk.PowerManager" ))
@@ -1211,7 +1196,7 @@ namespace WPEFramework
1211
1196
1212
1197
uint32_t HdmiCecSourceImplementation::GetOSDName (std::string &name, bool &success)
1213
1198
{
1214
- osdName = name.toString ();
1199
+ osdName = name.c_str ();
1215
1200
LOGINFO (" GetOSDName :%s " ,name.c_str ());
1216
1201
success = true ;
1217
1202
return Core::ERROR_NONE;
@@ -1221,7 +1206,7 @@ namespace WPEFramework
1221
1206
{
1222
1207
LOGINFO (" SetOSDName :%s " ,name.c_str ());
1223
1208
osdName = name.c_str ();
1224
- Utils::persistJsonSettings (CEC_SETTING_ENABLED_FILE, CEC_SETTING_OSD_NAME, JsonValue (osd .c_str ()));
1209
+ Utils::persistJsonSettings (CEC_SETTING_ENABLED_FILE, CEC_SETTING_OSD_NAME, JsonValue (name .c_str ()));
1225
1210
success = true ;
1226
1211
return Core::ERROR_NONE;
1227
1212
}
@@ -1234,7 +1219,7 @@ namespace WPEFramework
1234
1219
return Core::ERROR_NONE;
1235
1220
}
1236
1221
1237
- uint32_t HdmiCecSourceImplementation::SetVendorId (const std:: string vendorid, bool &success)
1222
+ uint32_t HdmiCecSourceImplementation::SetVendorId (( const string & vendorid) , bool &success)
1238
1223
{
1239
1224
LOGINFO (" SetVendorId :%s " ,vendorid.c_str ());
1240
1225
unsigned int vendorIdInt = 0 ;
@@ -1296,7 +1281,7 @@ namespace WPEFramework
1296
1281
}
1297
1282
}
1298
1283
1299
- uint32_t HdmiCecSourceImplementation::getDeviceList (Exchange ::IHdmiCecSourceDeviceListIterator *&devices )
1284
+ uint32_t HdmiCecSourceImplementation::getDeviceList (IHdmiCecSource ::IHdmiCecSourceDeviceListIterator *&deviceList )
1300
1285
{ // sample servicemanager response:
1301
1286
LOGINFOMETHOD ();
1302
1287
std::vector<Exchange::HdmiCecSourceDevices> localDevices;
@@ -1324,7 +1309,7 @@ namespace WPEFramework
1324
1309
LOGERR (" Exception in api" );
1325
1310
success = false ;
1326
1311
}
1327
- devices = (Core::Service<RPC::IteratorType<Exchange::IHdmiCecSource::IHdmiCecSourceDeviceListIterator>>::Create<Exchange::IHdmiCecSource::IHdmiCecSourceDeviceListIterator>(localDevices));
1312
+ deviceList = (Core::Service<RPC::IteratorType<Exchange::IHdmiCecSource::IHdmiCecSourceDeviceListIterator>>::Create<Exchange::IHdmiCecSource::IHdmiCecSourceDeviceListIterator>(localDevices));
1328
1313
returnResponse (success);
1329
1314
}
1330
1315
@@ -1585,7 +1570,7 @@ namespace WPEFramework
1585
1570
}
1586
1571
1587
1572
1588
- void HdmiCecSource ::sendDeviceUpdateInfo (const int logicalAddress)
1573
+ void HdmiCecSourceImplementation ::sendDeviceUpdateInfo (const int logicalAddress)
1589
1574
{
1590
1575
LOGINFO (" Device info updated notification send: for logical address:%d\r\n " , logicalAddress);
1591
1576
std::list<Exchange::IHdmiCecSource::INotification*>::const_iterator index (_hdmiCecSourceNotifications.begin ());
@@ -1595,7 +1580,7 @@ namespace WPEFramework
1595
1580
}
1596
1581
}
1597
1582
1598
- void HdmiCecSource ::sendActiveSourceEvent ()
1583
+ void HdmiCecSourceImplementation ::sendActiveSourceEvent ()
1599
1584
{
1600
1585
LOGWARN (" sendActiveSourceEvent isDeviceActiveSource: %d " ,isDeviceActiveSource);
1601
1586
std::list<Exchange::IHdmiCecSource::INotification*>::const_iterator index (_hdmiCecSourceNotifications.begin ());
@@ -1605,7 +1590,7 @@ namespace WPEFramework
1605
1590
}
1606
1591
}
1607
1592
1608
- void HdmiCecSource ::SendStandbyMsgEvent (const int logicalAddress)
1593
+ void HdmiCecSourceImplementation ::SendStandbyMsgEvent (const int logicalAddress)
1609
1594
{
1610
1595
std::list<Exchange::IHdmiCecSource::INotification*>::const_iterator index (_hdmiCecSourceNotifications.begin ());
1611
1596
while (index != _hdmiCecSourceNotifications.end ()) {
@@ -1614,7 +1599,7 @@ namespace WPEFramework
1614
1599
}
1615
1600
}
1616
1601
1617
- void HdmiCecSource ::SendKeyReleaseMsgEvent (const int logicalAddress)
1602
+ void HdmiCecSourceImplementation ::SendKeyReleaseMsgEvent (const int logicalAddress)
1618
1603
{
1619
1604
std::list<Exchange::IHdmiCecSource::INotification*>::const_iterator index (_hdmiCecSourceNotifications.begin ());
1620
1605
while (index != _hdmiCecSourceNotifications.end ()) {
@@ -1623,7 +1608,7 @@ namespace WPEFramework
1623
1608
}
1624
1609
}
1625
1610
1626
- void HdmiCecSource ::SendKeyPressMsgEvent (const int logicalAddress,const int keyCode)
1611
+ void HdmiCecSourceImplementation ::SendKeyPressMsgEvent (const int logicalAddress,const int keyCode)
1627
1612
{
1628
1613
std::list<Exchange::IHdmiCecSource::INotification*>::const_iterator index (_hdmiCecSourceNotifications.begin ());
1629
1614
while (index != _hdmiCecSourceNotifications.end ()) {
0 commit comments