cec: buffer up commands that are received while waiting for an ack. only send 'active...
[deb_libcec.git] / include / cectypes.h
index 6b9e0b5c6cfed5a75246ad450d882b5cd0728a66..cb647fd2230300eb848d1635e98173e278ff18c1 100644 (file)
@@ -82,14 +82,14 @@ typedef enum
   CEC_AUDIO_RATE_SLOW_RATE_MIN_99_9 = 6
 } ECecAudioRate;
 
-typedef enum
+typedef enum cec_audio_status
 {
   CEC_AUDIO_MUTE_STATUS_MASK = 0x80,
   CEC_AUDIO_VOLUME_STATUS_MASK = 0x7F,
   CEC_AUDIO_VOLUME_MIN = 0x00,
   CEC_AUDIO_VOLUME_MAX = 0x64,
   CEC_AUDIO_VOLUME_STATUS_UNKNOWN = 0x7F
-} ECecAudioStatus;
+} cec_audio_status;
 
 typedef enum
 {
@@ -196,6 +196,8 @@ typedef struct cec_device_type_list
     }
     return bReturn;
   }
+
+  cec_device_type operator[](uint8_t pos) const { return pos < 5 ? types[pos] : CEC_DEVICE_TYPE_RESERVED; }
 #endif
 } cec_device_type_list;
 
@@ -310,11 +312,11 @@ typedef enum
   CEC_STATUS_REQUEST_ONCE = 3
 } ECecStatusRequest;
 
-typedef enum
+typedef enum cec_system_audio_status
 {
   CEC_SYSTEM_AUDIO_STATUS_OFF = 0,
   CEC_SYSTEM_AUDIO_STATUS_ON = 1
-} ECecSystemAudioStatus;
+} cec_system_audio_status;
 
 typedef enum
 {
@@ -554,6 +556,7 @@ typedef struct cec_logical_addresses
   }
 
   bool isset(cec_logical_address address) const { return addresses[(int) address] == 1; }
+  bool operator[](uint8_t pos) const { return pos < 16 ? isset((cec_logical_address) pos) : false; }
 #endif
 } cec_logical_addresses;