fixed return value check of m_communication->Write()
[deb_libcec.git] / include / CECExportsC.h
index 6fa4dbeebc6115f991a65040a4770d68d56c9bbf..19706f468f93ddd70f607072c03a0aec79204428 100644 (file)
@@ -52,12 +52,6 @@ extern DECLSPEC bool cec_init(const char *strDeviceName, CEC::cec_logical_addres
 extern DECLSPEC bool cec_init(const char *strDeviceName, cec_logical_address iLogicalAddress = CECDEVICE_PLAYBACKDEVICE1, int iPhysicalAddress = CEC_DEFAULT_PHYSICAL_ADDRESS);
 #endif
 
-/*!
- * @brief Close the CEC adapter connection.
- * @return True when the device was closed, false otherwise.
- */
-extern DECLSPEC bool cec_close(void);
-
 /*!
  * @brief Open a connection to the CEC adapter.
  * @param strPort The path to the port.
@@ -66,6 +60,12 @@ extern DECLSPEC bool cec_close(void);
  */
 extern DECLSPEC bool cec_open(const char *strPort, int iTimeout);
 
+/*!
+ * @brief Close the connection to the CEC adapter.
+ * @param iTimeout Timeout in ms
+ */
+extern DECLSPEC bool cec_close(int iTimeout);
+
 /*!
  * @brief Ping the CEC adapter.
  * @return True when the ping was succesful, false otherwise.
@@ -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
 
 /*!
@@ -145,17 +143,27 @@ extern DECLSPEC bool cec_get_next_keypress(CEC::cec_keypress *key);
 extern DECLSPEC bool cec_get_next_keypress(cec_keypress *key);
 #endif
 
+/*!
+ * @brief Get the next CEC command that was received by the adapter.
+ * @param action The next command.
+ * @return True when a command was passed, false otherwise.
+ */
+#ifdef __cplusplus
+extern DECLSPEC bool cec_get_next_command(CEC::cec_command *command);
+#else
+extern DECLSPEC bool cec_get_next_command(cec_command *command);
+#endif
+
 /*!
  * @brief Transmit a frame on the CEC line.
  * @param data The frame to send.
  * @param bWaitForAck Wait for an ACK message for 1 second after this frame has been sent.
- * @param iTimeout Timeout if the message could not be sent for this amount of ms. Does not influence the timeout of the wait for the ACK message. That timeout is specified by the CEC standard.
  * @return True when the data was sent and acked, false otherwise.
  */
 #ifdef __cplusplus
-extern DECLSPEC bool cec_transmit(const CEC::cec_frame &data, bool bWaitForAck = true, int64_t iTimeout = (int64_t) 5000);
+extern DECLSPEC bool cec_transmit(const CEC::cec_frame &data, bool bWaitForAck = true);
 #else
-extern DECLSPEC bool cec_transmit(const cec_frame &data, bool bWaitForAck = true, int64_t iTimeout = (int64_t) 5000);
+extern DECLSPEC bool cec_transmit(const cec_frame &data, bool bWaitForAck = true);
 #endif
 
 /*!