|
MythTV
0.26-pre
|
Handles incoming MythSystemEvent messages. More...
#include <mythsystemevent.h>
Public Member Functions | |
| MythSystemEventHandler () | |
| Null Constructor. | |
| ~MythSystemEventHandler () | |
| Destructor. | |
Private Member Functions | |
| void | SubstituteMatches (const QStringList &tokens, QString &command) |
| Substitutes MATCH% variables in given command line. | |
| QString | EventNameToSetting (const QString &name) |
| Convert an MythSystemEvent name to a database setting name. | |
| void | customEvent (QEvent *e) |
| Custom Event handler for receiving and processing System Events. | |
Handles incoming MythSystemEvent messages.
MythSystemEventHandler handles incoming MythSystemEvent messages and runs the appropriate event handler command on the local system if one is configured.
Definition at line 24 of file mythsystemevent.h.
Null Constructor.
Adds this object as a gContext event listener.
Definition at line 77 of file mythsystemevent.cpp.
Destructor.
Removes this object as a gContext event listener.
Definition at line 87 of file mythsystemevent.cpp.
| void MythSystemEventHandler::SubstituteMatches | ( | const QStringList & | tokens, |
| QString & | command | ||
| ) | [private] |
Substitutes MATCH% variables in given command line.
Subsitutes values for MATCH% type variables in given command string. Some of these matches come from the tokens list passed in and some may come from a ProgramInfo if a chanid and starttime are specified in the tokens list.
| tokens | Const QStringList containing token list passed with event. |
| command | Command line containing MATCH% variables to be substituted. |
Definition at line 105 of file mythsystemevent.cpp.
Referenced by customEvent().
| QString MythSystemEventHandler::EventNameToSetting | ( | const QString & | name | ) | [private] |
Convert an MythSystemEvent name to a database setting name.
Converts an underscored, all-capital-letters system event name of the form NET_CTRL_CONNECTED to the corresponding CamelCase database setting name EventCmdNetCtrlConnected.
| name | Const QString containing System Event name to convert |
Definition at line 223 of file mythsystemevent.cpp.
Referenced by customEvent().
| void MythSystemEventHandler::customEvent | ( | QEvent * | e | ) | [private] |
Custom Event handler for receiving and processing System Events.
This function listens for SYSTEM_EVENT messages and fires off any necessary event handler commands. In addition to SYSTEM_EVENT messages, this code also forwards GLOBAL_SYSTEM_EVENT which may have been sent by the local system via code that does not have access to the master backend connection to send events on its own. One example is the code that sends KEY_xx system events.
| e | Pointer to QEvent containing event to handle |
Definition at line 255 of file mythsystemevent.cpp.
1.7.6.1