vdr 2.6.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Attributes | Static Private Attributes | List of all members
cRemote Class Reference

#include <remote.h>

Public Member Functions

virtual ~cRemote ()
 
virtual bool Ready (void)
 
virtual bool Initialize (void)
 
const char * Name (void)
 
virtual ~cRemote ()
 
virtual bool Ready (void)
 
virtual bool Initialize (void)
 
const char * Name (void)
 
- Public Member Functions inherited from cListObject
 cListObject (void)
 
virtual ~cListObject ()
 
virtual int Compare (const cListObject &ListObject) const
 
void Append (cListObject *Object)
 
void Insert (cListObject *Object)
 
void Unlink (void)
 
int Index (void) const
 
cListObjectPrev (void) const
 
cListObjectNext (void) const
 
 cListObject (void)
 
virtual ~cListObject ()
 
virtual int Compare (const cListObject &ListObject) const
 
void Append (cListObject *Object)
 
void Insert (cListObject *Object)
 
void Unlink (void)
 
int Index (void) const
 
cListObjectPrev (void) const
 
cListObjectNext (void) const
 

Static Public Member Functions

static void SetLearning (cRemote *Learning)
 
static bool IsLearning ()
 
static bool Enabled (void)
 
static void SetEnabled (bool Enabled)
 
static void Clear (void)
 
static bool Put (eKeys Key, bool AtFront=false)
 
static bool PutMacro (eKeys Key)
 
static bool CallPlugin (const char *Plugin)
 
static const char * GetPlugin (void)
 
static bool HasKeys (void)
 
static eKeys Get (int WaitMs=1000, char **UnknownCode=NULL)
 
static time_t LastActivity (void)
 
static void TriggerLastActivity (void)
 
static void SetLearning (cRemote *Learning)
 
static bool IsLearning ()
 
static bool Enabled (void)
 
static void SetEnabled (bool Enabled)
 
static void Clear (void)
 
static bool Put (eKeys Key, bool AtFront=false)
 
static bool PutMacro (eKeys Key)
 
static bool CallPlugin (const char *Plugin)
 
static const char * GetPlugin (void)
 
static bool HasKeys (void)
 
static eKeys Get (int WaitMs=1000, char **UnknownCode=NULL)
 
static time_t LastActivity (void)
 
static void TriggerLastActivity (void)
 

Protected Member Functions

 cRemote (const char *Name)
 
const char * GetSetup (void)
 
void PutSetup (const char *Setup)
 
bool Put (uint64_t Code, bool Repeat=false, bool Release=false)
 
bool Put (const char *Code, bool Repeat=false, bool Release=false)
 
 cRemote (const char *Name)
 
const char * GetSetup (void)
 
void PutSetup (const char *Setup)
 
bool Put (uint64_t Code, bool Repeat=false, bool Release=false)
 
bool Put (const char *Code, bool Repeat=false, bool Release=false)
 

Private Types

enum  { MaxKeys = 2 * MAXKEYSINMACRO }
 
enum  { MaxKeys = 2 * MAXKEYSINMACRO }
 

Private Attributes

char * name
 

Static Private Attributes

static eKeys keys [MaxKeys]
 
static int in = 0
 
static int out = 0
 
static cTimeMs repeatTimeout
 
static cRemotelearning = NULL
 
static char * unknownCode = NULL
 
static cMutex mutex
 
static cCondVar keyPressed
 
static time_t lastActivity = 0
 
static const char * keyMacroPlugin = NULL
 
static const char * callPlugin = NULL
 
static bool enabled = true
 

Detailed Description

Definition at line 20 of file include/vdr/remote.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
MaxKeys 

Definition at line 22 of file include/vdr/remote.h.

◆ anonymous enum

anonymous enum
private
Enumerator
MaxKeys 

Definition at line 22 of file remote.h.

Constructor & Destructor Documentation

◆ cRemote() [1/2]

cRemote::cRemote ( const char *  Name)
protected

Definition at line 39 of file remote.c.

References cListBase::Add(), name, Name(), and Remotes.

◆ ~cRemote() [1/2]

cRemote::~cRemote ( )
virtual

Definition at line 45 of file remote.c.

References cListBase::Del(), name, and Remotes.

◆ cRemote() [2/2]

cRemote::cRemote ( const char *  Name)
protected

◆ ~cRemote() [2/2]

virtual cRemote::~cRemote ( )
virtual

Member Function Documentation

◆ CallPlugin() [1/2]

bool cRemote::CallPlugin ( const char *  Plugin)
static

Initiates calling the given plugin's main menu function.

The Plugin parameter is the name of the plugin, and must be a static string. Returns true if the plugin call was successfully initiated (the actual call to the plugin's main menu function will take place some time later, during the next execution of VDR's main loop). If there is already a plugin call pending false will be returned and the caller should try again later.

Definition at line 151 of file remote.c.

References callPlugin, k_Plugin, mutex, and Put().

Referenced by cSVDRPServer::CmdPLUG(), and cPictureControl::ProcessKey().

◆ CallPlugin() [2/2]

static bool cRemote::CallPlugin ( const char *  Plugin)
static

Initiates calling the given plugin's main menu function.

The Plugin parameter is the name of the plugin, and must be a static string. Returns true if the plugin call was successfully initiated (the actual call to the plugin's main menu function will take place some time later, during the next execution of VDR's main loop). If there is already a plugin call pending false will be returned and the caller should try again later.

◆ Clear() [1/2]

void cRemote::Clear ( void  )
static

Definition at line 72 of file remote.c.

References in, learning, mutex, out, and unknownCode.

Referenced by cInterface::LearnKeys(), Put(), and cInterface::QueryKeys().

◆ Clear() [2/2]

static void cRemote::Clear ( void  )
static

◆ Enabled() [1/2]

static bool cRemote::Enabled ( void  )
inlinestatic

◆ Enabled() [2/2]

static bool cRemote::Enabled ( void  )
inlinestatic

Definition at line 49 of file remote.h.

References enabled.

◆ Get() [1/2]

eKeys cRemote::Get ( int  WaitMs = 1000,
char **  UnknownCode = NULL 
)
static

◆ Get() [2/2]

static eKeys cRemote::Get ( int  WaitMs = 1000,
char **  UnknownCode = NULL 
)
static

◆ GetPlugin() [1/2]

const char * cRemote::GetPlugin ( void  )
static

Returns the name of the plugin that was set with a previous call to PutMacro() or CallPlugin().

The internally stored pointer to the plugin name will be reset to NULL by this call.

Definition at line 162 of file remote.c.

References callPlugin, keyMacroPlugin, and mutex.

Referenced by main().

◆ GetPlugin() [2/2]

static const char * cRemote::GetPlugin ( void  )
static

Returns the name of the plugin that was set with a previous call to PutMacro() or CallPlugin().

The internally stored pointer to the plugin name will be reset to NULL by this call.

◆ GetSetup() [1/2]

const char * cRemote::GetSetup ( void  )
protected

Definition at line 51 of file remote.c.

References cKeys::GetSetup(), Keys, and Name().

Referenced by cRcuRemote::cRcuRemote().

◆ GetSetup() [2/2]

const char * cRemote::GetSetup ( void  )
protected

◆ HasKeys() [1/2]

bool cRemote::HasKeys ( void  )
static

Definition at line 175 of file remote.c.

References in, k_Repeat, keys, mutex, and out.

Referenced by cRemoveDeletedRecordingsThread::Action(), and cInterface::GetKey().

◆ HasKeys() [2/2]

static bool cRemote::HasKeys ( void  )
static

◆ Initialize() [1/2]

bool cRemote::Initialize ( void  )
virtual

Reimplemented in cRcuRemote.

Definition at line 61 of file remote.c.

References Get(), INITTIMEOUT, kNone, and Ready().

Referenced by cInterface::QueryKeys().

◆ Initialize() [2/2]

virtual bool cRemote::Initialize ( void  )
virtual

Reimplemented in cRcuRemote.

◆ IsLearning() [1/2]

static bool cRemote::IsLearning ( )
inlinestatic

Definition at line 48 of file include/vdr/remote.h.

References learning.

Referenced by cInterface::GetKey(), and cKbdRemote::PutKey().

◆ IsLearning() [2/2]

static bool cRemote::IsLearning ( )
inlinestatic

Definition at line 48 of file remote.h.

References learning.

◆ LastActivity() [1/2]

static time_t cRemote::LastActivity ( void  )
inlinestatic

Absolute time when last key was delivered by Get().

Definition at line 68 of file include/vdr/remote.h.

References lastActivity.

Referenced by main().

◆ LastActivity() [2/2]

static time_t cRemote::LastActivity ( void  )
inlinestatic

Absolute time when last key was delivered by Get().

Definition at line 68 of file remote.h.

References lastActivity.

◆ Name() [1/2]

const char * cRemote::Name ( void  )
inline

◆ Name() [2/2]

const char * cRemote::Name ( void  )
inline

Definition at line 46 of file remote.h.

References name.

◆ Put() [1/6]

bool cRemote::Put ( const char *  Code,
bool  Repeat = false,
bool  Release = false 
)
protected

◆ Put() [2/6]

bool cRemote::Put ( const char *  Code,
bool  Repeat = false,
bool  Release = false 
)
protected

◆ Put() [3/6]

bool cRemote::Put ( eKeys  Key,
bool  AtFront = false 
)
static

Definition at line 82 of file remote.c.

References cCondVar::Broadcast(), Clear(), in, k_Release, k_Repeat, keyPressed, keys, kNone, MaxKeys, mutex, and out.

◆ Put() [4/6]

static bool cRemote::Put ( eKeys  Key,
bool  AtFront = false 
)
static

◆ Put() [5/6]

bool cRemote::Put ( uint64_t  Code,
bool  Repeat = false,
bool  Release = false 
)
protected

◆ Put() [6/6]

bool cRemote::Put ( uint64_t  Code,
bool  Repeat = false,
bool  Release = false 
)
protected

◆ PutMacro() [1/2]

bool cRemote::PutMacro ( eKeys  Key)
static

◆ PutMacro() [2/2]

static bool cRemote::PutMacro ( eKeys  Key)
static

◆ PutSetup() [1/2]

void cRemote::PutSetup ( const char *  Setup)
protected

Definition at line 56 of file remote.c.

References Keys, Name(), cKeys::PutSetup(), and Setup.

Referenced by cRcuRemote::Initialize().

◆ PutSetup() [2/2]

void cRemote::PutSetup ( const char *  Setup)
protected

◆ Ready() [1/2]

virtual bool cRemote::Ready ( void  )
inlinevirtual

Reimplemented in cLircRemote, cLircRemote, and cRcuRemote.

Definition at line 44 of file include/vdr/remote.h.

Referenced by Initialize().

◆ Ready() [2/2]

virtual bool cRemote::Ready ( void  )
inlinevirtual

Reimplemented in cLircRemote, cLircRemote, and cRcuRemote.

Definition at line 44 of file remote.h.

◆ SetEnabled() [1/2]

static void cRemote::SetEnabled ( bool  Enabled)
inlinestatic

Definition at line 50 of file include/vdr/remote.h.

References enabled, and Enabled().

Referenced by cSVDRPServer::CmdREMO().

◆ SetEnabled() [2/2]

static void cRemote::SetEnabled ( bool  Enabled)
inlinestatic

Definition at line 50 of file remote.h.

References enabled, and Enabled().

◆ SetLearning() [1/2]

static void cRemote::SetLearning ( cRemote Learning)
inlinestatic

Definition at line 47 of file include/vdr/remote.h.

References learning.

Referenced by cInterface::LearnKeys().

◆ SetLearning() [2/2]

static void cRemote::SetLearning ( cRemote Learning)
inlinestatic

Definition at line 47 of file remote.h.

References learning.

◆ TriggerLastActivity() [1/2]

void cRemote::TriggerLastActivity ( void  )
static

Simulates user activity, for instance to keep the current menu open even if no remote control key has been pressed.

Definition at line 204 of file remote.c.

References lastActivity.

Referenced by Get(), and cMenuCam::Set().

◆ TriggerLastActivity() [2/2]

static void cRemote::TriggerLastActivity ( void  )
static

Simulates user activity, for instance to keep the current menu open even if no remote control key has been pressed.

Member Data Documentation

◆ callPlugin

static const char * cRemote::callPlugin = NULL
staticprivate

Definition at line 33 of file include/vdr/remote.h.

Referenced by CallPlugin(), and GetPlugin().

◆ enabled

static bool cRemote::enabled = true
staticprivate

Definition at line 34 of file include/vdr/remote.h.

Referenced by Enabled(), Get(), and SetEnabled().

◆ in

static int cRemote::in = 0
staticprivate

Definition at line 24 of file include/vdr/remote.h.

Referenced by Clear(), Get(), HasKeys(), and Put().

◆ keyMacroPlugin

static const char * cRemote::keyMacroPlugin = NULL
staticprivate

Definition at line 32 of file include/vdr/remote.h.

Referenced by GetPlugin(), and PutMacro().

◆ keyPressed

static cCondVar cRemote::keyPressed
staticprivate

Definition at line 30 of file include/vdr/remote.h.

Referenced by Get(), and Put().

◆ keys

static eKeys cRemote::keys
staticprivate

Definition at line 23 of file include/vdr/remote.h.

Referenced by Get(), HasKeys(), and Put().

◆ lastActivity

static time_t cRemote::lastActivity = 0
staticprivate

Definition at line 31 of file include/vdr/remote.h.

Referenced by LastActivity(), and TriggerLastActivity().

◆ learning

static cRemote * cRemote::learning = NULL
staticprivate

Definition at line 27 of file include/vdr/remote.h.

Referenced by Clear(), Get(), IsLearning(), Put(), and SetLearning().

◆ mutex

static cMutex cRemote::mutex
staticprivate

Definition at line 29 of file include/vdr/remote.h.

Referenced by CallPlugin(), Clear(), Get(), GetPlugin(), HasKeys(), Put(), and PutMacro().

◆ name

char * cRemote::name
private

Definition at line 35 of file include/vdr/remote.h.

Referenced by cRemote(), Name(), and ~cRemote().

◆ out

static int cRemote::out = 0
staticprivate

Definition at line 25 of file include/vdr/remote.h.

Referenced by Clear(), Get(), HasKeys(), and Put().

◆ repeatTimeout

static cTimeMs cRemote::repeatTimeout
staticprivate

Definition at line 26 of file include/vdr/remote.h.

Referenced by Get().

◆ unknownCode

static char * cRemote::unknownCode = NULL
staticprivate

Definition at line 28 of file include/vdr/remote.h.

Referenced by Clear(), Get(), and Put().


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