MythTV  master
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
MythCECAdapter Class Reference

#include <mythcecadapter.h>

Public Types

enum  MythCECAction { None = 0x00, PowerOffTV = 0x01, PowerOnTV = 0x02, SwitchInput = 0x04 }
 

Public Member Functions

 MythCECAdapter ()=default
 
 ~MythCECAdapter ()
 
void Open (MythMainWindow *Window)
 
void Close (void)
 
void Action (const QString &Action)
 
void IgnoreKeys (bool Ignore)
 

Static Public Member Functions

static int LogMessageCallback (void *, const cec_log_message Message)
 
static int KeyPressCallback (void *Adapter, const cec_keypress Keypress)
 
static int CommandCallback (void *Adapter, const cec_command Command)
 
static int AlertCallback (void *, const libcec_alert Alert, const libcec_parameter Data)
 
static void SourceCallback (void *, cec_logical_address Address, uint8_t Activated)
 
static QString AddressToString (int Address)
 

Protected Member Functions

void HandleActions (MythCECActions Actions)
 
int HandleCommand (const cec_command &Command)
 
int HandleKeyPress (cec_keypress Key) const
 

Static Protected Member Functions

static void HandleSource (cec_logical_address Address, uint8_t Activated)
 
static int LogMessage (const cec_log_message &Message)
 
static int HandleAlert (libcec_alert Alert, libcec_parameter Data)
 

Protected Attributes

ICECAdapter * m_adapter { nullptr }
 
ICECCallbacks m_callbacks
 
bool m_valid { false }
 
bool m_ignoreKeys { false }
 
bool m_powerOffTVAllowed { false }
 
bool m_powerOffTVOnExit { false }
 
bool m_powerOnTVAllowed { false }
 
bool m_powerOnTVOnStart { false }
 
bool m_switchInputAllowed { true }
 

Detailed Description

Definition at line 23 of file mythcecadapter.h.

Member Enumeration Documentation

◆ MythCECAction

Enumerator
None 
PowerOffTV 
PowerOnTV 
SwitchInput 

Definition at line 26 of file mythcecadapter.h.

Constructor & Destructor Documentation

◆ MythCECAdapter()

MythCECAdapter::MythCECAdapter ( )
default

◆ ~MythCECAdapter()

MythCECAdapter::~MythCECAdapter ( )

Definition at line 89 of file mythcecadapter.cpp.

Member Function Documentation

◆ LogMessageCallback()

int MythCECAdapter::LogMessageCallback ( void *  ,
const cec_log_message  Message 
)
static

Definition at line 27 of file mythcecadapter.cpp.

Referenced by Open().

◆ KeyPressCallback()

int MythCECAdapter::KeyPressCallback ( void *  Adapter,
const cec_keypress  Keypress 
)
static

Definition at line 32 of file mythcecadapter.cpp.

Referenced by Open().

◆ CommandCallback()

int MythCECAdapter::CommandCallback ( void *  Adapter,
const cec_command  Command 
)
static

Definition at line 40 of file mythcecadapter.cpp.

Referenced by Open().

◆ AlertCallback()

int MythCECAdapter::AlertCallback ( void *  ,
const libcec_alert  Alert,
const libcec_parameter  Data 
)
static

Definition at line 48 of file mythcecadapter.cpp.

Referenced by Open().

◆ SourceCallback()

void MythCECAdapter::SourceCallback ( void *  ,
cec_logical_address  Address,
uint8_t  Activated 
)
static

Definition at line 78 of file mythcecadapter.cpp.

Referenced by Open().

◆ AddressToString()

QString MythCECAdapter::AddressToString ( int  Address)
static

Definition at line 83 of file mythcecadapter.cpp.

Referenced by Open().

◆ Open()

void MythCECAdapter::Open ( MythMainWindow Window)

Definition at line 94 of file mythcecadapter.cpp.

◆ Close()

void MythCECAdapter::Close ( void  )

Definition at line 260 of file mythcecadapter.cpp.

Referenced by Open(), and ~MythCECAdapter().

◆ Action()

void MythCECAdapter::Action ( const QString &  Action)

Definition at line 749 of file mythcecadapter.cpp.

◆ IgnoreKeys()

void MythCECAdapter::IgnoreKeys ( bool  Ignore)

Definition at line 757 of file mythcecadapter.cpp.

◆ HandleActions()

void MythCECAdapter::HandleActions ( MythCECActions  Actions)
protected

Definition at line 717 of file mythcecadapter.cpp.

Referenced by Action(), Close(), and Open().

◆ HandleCommand()

int MythCECAdapter::HandleCommand ( const cec_command &  Command)
protected

Definition at line 293 of file mythcecadapter.cpp.

Referenced by CommandCallback().

◆ HandleKeyPress()

int MythCECAdapter::HandleKeyPress ( cec_keypress  Key) const
protected

Definition at line 317 of file mythcecadapter.cpp.

Referenced by HandleCommand(), and KeyPressCallback().

◆ HandleSource()

void MythCECAdapter::HandleSource ( cec_logical_address  Address,
uint8_t  Activated 
)
staticprotected

Definition at line 709 of file mythcecadapter.cpp.

Referenced by SourceCallback().

◆ LogMessage()

int MythCECAdapter::LogMessage ( const cec_log_message &  Message)
staticprotected

Definition at line 277 of file mythcecadapter.cpp.

Referenced by LogMessageCallback().

◆ HandleAlert()

int MythCECAdapter::HandleAlert ( libcec_alert  Alert,
libcec_parameter  Data 
)
staticprotected

Definition at line 652 of file mythcecadapter.cpp.

Referenced by AlertCallback().

Member Data Documentation

◆ m_adapter

ICECAdapter* MythCECAdapter::m_adapter { nullptr }
protected

Definition at line 66 of file mythcecadapter.h.

Referenced by Close(), HandleActions(), and Open().

◆ m_callbacks

ICECCallbacks MythCECAdapter::m_callbacks
protected

Definition at line 67 of file mythcecadapter.h.

Referenced by Open().

◆ m_valid

bool MythCECAdapter::m_valid { false }
protected

Definition at line 68 of file mythcecadapter.h.

Referenced by Close(), HandleActions(), and Open().

◆ m_ignoreKeys

bool MythCECAdapter::m_ignoreKeys { false }
protected

Definition at line 69 of file mythcecadapter.h.

Referenced by HandleKeyPress(), and IgnoreKeys().

◆ m_powerOffTVAllowed

bool MythCECAdapter::m_powerOffTVAllowed { false }
protected

Definition at line 70 of file mythcecadapter.h.

Referenced by HandleActions(), and Open().

◆ m_powerOffTVOnExit

bool MythCECAdapter::m_powerOffTVOnExit { false }
protected

Definition at line 71 of file mythcecadapter.h.

Referenced by Close(), and Open().

◆ m_powerOnTVAllowed

bool MythCECAdapter::m_powerOnTVAllowed { false }
protected

Definition at line 72 of file mythcecadapter.h.

Referenced by HandleActions(), and Open().

◆ m_powerOnTVOnStart

bool MythCECAdapter::m_powerOnTVOnStart { false }
protected

Definition at line 73 of file mythcecadapter.h.

Referenced by Open().

◆ m_switchInputAllowed

bool MythCECAdapter::m_switchInputAllowed { true }
protected

Definition at line 74 of file mythcecadapter.h.

Referenced by HandleActions().


The documentation for this class was generated from the following files: