X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=include%2Fcectypes.h;h=4a503710248ea2557b92f4f577dde9f2dc054de5;hb=58c1f6f50ae4a5483e43fc9ec80233508adfe099;hp=6b9e0b5c6cfed5a75246ad450d882b5cd0728a66;hpb=f8513317a5f4bb2d9d0843193c3c98eca19f8e8a;p=deb_libcec.git diff --git a/include/cectypes.h b/include/cectypes.h index 6b9e0b5..4a50371 100644 --- a/include/cectypes.h +++ b/include/cectypes.h @@ -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 { @@ -115,15 +115,15 @@ typedef enum CEC_MINOR_CHANNEL_NUMBER_MASK = 0xFFFF } ECecChannelIdentifier; -typedef enum +typedef enum cec_deck_control_mode { CEC_DESK_CONTROL_MODE_SKIP_FORWARD_WIND = 1, CEC_DESK_CONTROL_MODE_SKIP_REVERSE_REWIND = 2, CEC_DESK_CONTROL_MODE_STOP = 3, CEC_DESK_CONTROL_MODE_EJECT = 4 -} ECecDeskControlMode; +} cec_deck_control_mode; -typedef enum +typedef enum cec_deck_info { CEC_DECK_INFO_PLAY = 0x11, CEC_DECK_INFO_RECORD = 0x12, @@ -140,7 +140,7 @@ typedef enum CEC_DECK_INFO_INDEX_SEARCH_FORWARD = 0x1D, CEC_DECK_INFO_INDEX_SEARCH_REVERSE = 0x1E, CEC_DECK_INFO_OTHER_STATUS = 0x1F -} ECecDeckInfo; +} cec_deck_info; typedef enum cec_device_type { @@ -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;