cec: buffer up commands that are received while waiting for an ack. only send 'active...
[deb_libcec.git] / include / cectypes.h
index 8c6cf9c79dab4e7d428662104926a097d0b76548..cb647fd2230300eb848d1635e98173e278ff18c1 100644 (file)
@@ -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;
 
@@ -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;