cec: change the default argument of PowerOnDevices() to CECDEVICE_TV. deprecate Power...
authorLars Op den Kamp <lars@opdenkamp.eu>
Sun, 2 Oct 2011 19:30:03 +0000 (21:30 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Sun, 2 Oct 2011 19:30:03 +0000 (21:30 +0200)
include/CECExportsC.h
include/CECExportsCpp.h
src/lib/CECParser.cpp
src/lib/CECParser.h

index 8d91fe26ad9010d964a061c45694a84e28c7eba6..f76e2f39f4e23510ff6115195e64b6c378246472 100644 (file)
@@ -79,9 +79,7 @@ extern DECLSPEC bool cec_ping(void);
 extern DECLSPEC bool cec_start_bootloader(void);
 
 /*!
- * @brief Power off connected CEC capable devices.
- * @param address The logical address to power off.
- * @return True when the command was sent succesfully, false otherwise.
+ * @depcrecated Use cec_standby_devices() instead
  */
 #ifdef __cplusplus
 extern DECLSPEC bool cec_power_off_devices(CEC::cec_logical_address address = CEC::CECDEVICE_BROADCAST);
@@ -95,9 +93,9 @@ extern DECLSPEC bool cec_power_off_devices(cec_logical_address address = CECDEVI
  * @return True when the command was sent succesfully, false otherwise.
  */
 #ifdef __cplusplus
-extern DECLSPEC bool cec_power_on_devices(CEC::cec_logical_address address = CEC::CECDEVICE_BROADCAST);
+extern DECLSPEC bool cec_power_on_devices(CEC::cec_logical_address address = CEC::CECDEVICE_TV);
 #else
-extern DECLSPEC bool cec_power_on_devices(cec_logical_address address = CECDEVICE_BROADCAST);
+extern DECLSPEC bool cec_power_on_devices(cec_logical_address address = CECDEVICE_TV);
 #endif
 
 /*!
index ac00190571599ea9510396faa83f489b25b79cb4..4f40bfec362b27d5668d46088c42f9f77f57406e 100644 (file)
@@ -62,7 +62,7 @@ namespace CEC
     virtual bool StartBootloader(void) = 0;
 
     /*!
-     * @see cec_power_off_devices
+     * @depcrecated Use StandbyDevices() instead
      */
     virtual bool PowerOffDevices(cec_logical_address address = CECDEVICE_BROADCAST) = 0;
 
index dad7a0d038a31340caeed08329afcfd58d6645d3..8273137c9dd5d5cf56fd0c39a86a677f9318862c 100644 (file)
@@ -217,19 +217,10 @@ uint8_t CCECParser::GetSourceDestination(cec_logical_address destination /* = CE
 
 bool CCECParser::PowerOffDevices(cec_logical_address address /* = CECDEVICE_BROADCAST */)
 {
-  if (!m_bRunning)
-    return false;
-
-  CStdString strLog;
-  strLog.Format("powering off devices with logical address %d", (int8_t)address);
-  AddLog(CEC_LOG_DEBUG, strLog.c_str());
-  cec_frame frame;
-  frame.push_back(GetSourceDestination(address));
-  frame.push_back(CEC_OPCODE_STANDBY);
-  return Transmit(frame);
+  return StandbyDevices(address);
 }
 
-bool CCECParser::PowerOnDevices(cec_logical_address address /* = CECDEVICE_BROADCAST */)
+bool CCECParser::PowerOnDevices(cec_logical_address address /* = CECDEVICE_TV */)
 {
   if (!m_bRunning)
     return false;
index be958553cb8ea9b22502d5ac44594064521ca199..ef39cfb581cba780dbff431d4931d62930500427 100644 (file)
@@ -57,7 +57,7 @@ namespace CEC
       virtual bool Ping(void);
       virtual bool StartBootloader(void);
       virtual bool PowerOffDevices(cec_logical_address address = CECDEVICE_BROADCAST);
-      virtual bool PowerOnDevices(cec_logical_address address = CECDEVICE_BROADCAST);
+      virtual bool PowerOnDevices(cec_logical_address address = CECDEVICE_TV);
       virtual bool StandbyDevices(cec_logical_address address = CECDEVICE_BROADCAST);
       virtual bool SetActiveView(void);
       virtual bool SetInactiveView(void);