LIRC Class Reference
[MythUI Input handling]

Interface between mythtv and lircd. More...

#include <lirc.h>

Inheritance diagram for LIRC:
MThread

List of all members.

Public Member Functions

 LIRC (QObject *main_window, const QString &lircd_device, const QString &our_program, const QString &config_file)
bool Init (void)
virtual void start (void)
virtual void deleteLater (void)

Private Member Functions

virtual ~LIRC ()
void TeardownAll ()
bool IsDoRunSet (void) const
virtual void run (void)
 Run's the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
QList< QByteArray > GetCodes (void)
void Process (const QByteArray &data)

Private Attributes

QMutex lock
QObject * m_mainWindow
 window to send key events to
QString lircdDevice
 device on which to receive lircd data
QString program
 program to extract from config file
QString configFile
 file containing LIRC->key mappings
bool doRun
uint buf_offset
QByteArray buf
uint eofCount
uint retryCount
LIRCPrivd

Static Private Attributes

static QMutex lirclib_lock

Detailed Description

Interface between mythtv and lircd.

Listens for input from the Linux Infrared Remote Control daemon and translates it into internal input events.

Create connection to the lircd daemon and translate remote keypresses into custom events which are posted to the mainwindow.

Definition at line 24 of file lirc.h.


Constructor & Destructor Documentation

LIRC::LIRC ( QObject *  main_window,
const QString &  lircd_device,
const QString &  our_program,
const QString &  config_file 
)

Definition at line 72 of file lirc.cpp.

LIRC::~LIRC (  )  [private, virtual]

Definition at line 94 of file lirc.cpp.


Member Function Documentation

bool LIRC::Init ( void   ) 

Definition at line 165 of file lirc.cpp.

Referenced by run(), and MythMainWindow::StartLIRC().

void LIRC::start ( void   )  [virtual]

Definition at line 313 of file lirc.cpp.

Referenced by MythMainWindow::StartLIRC().

void LIRC::deleteLater ( void   )  [virtual]

Definition at line 99 of file lirc.cpp.

Referenced by MythMainWindow::StartLIRC(), and MythMainWindow::~MythMainWindow().

void LIRC::TeardownAll ( void   )  [private]

Definition at line 105 of file lirc.cpp.

Referenced by deleteLater(), and ~LIRC().

bool LIRC::IsDoRunSet ( void   )  const [private]

Definition at line 327 of file lirc.cpp.

Referenced by run().

void LIRC::run ( void   )  [private, virtual]

Run's the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.

Note:
If you override this method you must call RunProlog before you do any work and RunEpilog before you exit the run method.

Reimplemented from MThread.

Definition at line 398 of file lirc.cpp.

QList< QByteArray > LIRC::GetCodes ( void   )  [private]

Definition at line 467 of file lirc.cpp.

Referenced by run().

void LIRC::Process ( const QByteArray &  data  )  [private]

Definition at line 333 of file lirc.cpp.

Referenced by run().


Member Data Documentation

QMutex LIRC::lock [mutable, private]

Definition at line 46 of file lirc.h.

Referenced by Init(), IsDoRunSet(), run(), start(), and TeardownAll().

QMutex LIRC::lirclib_lock [static, private]

Definition at line 47 of file lirc.h.

Referenced by Init(), and Process().

QObject* LIRC::m_mainWindow [private]

window to send key events to

Definition at line 48 of file lirc.h.

Referenced by Process().

QString LIRC::lircdDevice [private]

device on which to receive lircd data

Definition at line 49 of file lirc.h.

Referenced by Init(), and LIRC().

QString LIRC::program [private]

program to extract from config file

Definition at line 50 of file lirc.h.

Referenced by LIRC().

QString LIRC::configFile [private]

file containing LIRC->key mappings

Definition at line 51 of file lirc.h.

Referenced by Init(), and LIRC().

bool LIRC::doRun [private]

Definition at line 52 of file lirc.h.

Referenced by IsDoRunSet(), run(), start(), and TeardownAll().

Definition at line 53 of file lirc.h.

Referenced by GetCodes().

QByteArray LIRC::buf [private]

Definition at line 54 of file lirc.h.

Referenced by GetCodes(), and LIRC().

uint LIRC::eofCount [private]

Definition at line 55 of file lirc.h.

Referenced by GetCodes(), and run().

Definition at line 56 of file lirc.h.

Referenced by GetCodes(), Init(), and run().

LIRCPriv* LIRC::d [private]

Definition at line 57 of file lirc.h.

Referenced by GetCodes(), Init(), Process(), run(), start(), and TeardownAll().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon Feb 6 06:42:03 2012 for MythTV by  doxygen 1.6.3