vdr 2.8.2
cKbdRemote Class Reference

#include <remote.h>

Public Member Functions

 cKbdRemote (void)
virtual ~cKbdRemote () override
Public Member Functions inherited from cRemote
virtual ~cRemote () override
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

Static Public Member Functions

static bool KbdAvailable (void)
static uint64_t MapFuncToCode (int Func)
static void SetRawMode (bool RawMode)
Static Public Member Functions inherited from cRemote
static void SetLearning (cRemote *Learning)
static bool IsLearning (void)
static bool Enabled (void)
static void SetEnabled (bool Enabled)
static bool InEditMode (void)
static void SetInEditMode (bool InEditMode)
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)

Private Member Functions

virtual void Action (void) override
int ReadKey (void)
uint64_t ReadKeySequence (void)
int MapCodeToFunc (uint64_t Code)
void PutKey (uint64_t Code, bool Repeat=false, bool Release=false)
Private Member Functions inherited from cThread
 cThread (const char *Description=NULL, bool LowPriority=false)
virtual ~cThread ()
void SetDescription (const char *Description,...) __attribute__((format(printf
void bool Start (void)
bool Active (void)
void SetPriority (int Priority)
void SetIOPriority (int Priority)
void Lock (void)
void Unlock (void)
bool Running (void)
void Cancel (int WaitSeconds=0)

Private Attributes

bool systemIsUtf8
struct termios savedTm

Static Private Attributes

static bool kbdAvailable = false
static bool rawMode = false

Additional Inherited Members

Protected Member Functions inherited from cRemote
 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)
Static Private Member Functions inherited from cThread
static tThreadId ThreadId (void)
static tThreadId IsMainThread (void)
static void SetMainThreadId (void)

Detailed Description

Definition at line 108 of file remote.h.

Constructor & Destructor Documentation

◆ cKbdRemote()

cKbdRemote::cKbdRemote ( void )

◆ ~cKbdRemote()

cKbdRemote::~cKbdRemote ( )
overridevirtual

Definition at line 273 of file remote.c.

References cThread::Cancel(), kbdAvailable, and savedTm.

Member Function Documentation

◆ Action()

void cKbdRemote::Action ( void )
overrideprivatevirtual

A derived cThread class must implement the code it wants to execute as a separate thread in this function.

If this is a loop, it must check Running() repeatedly to see whether it's time to stop.

Implements cThread.

Definition at line 388 of file remote.c.

References cTimeMs::Elapsed(), PutKey(), ReadKeySequence(), cThread::Running(), cTimeMs::Set(), and Setup.

◆ KbdAvailable()

bool cKbdRemote::KbdAvailable ( void )
inlinestatic

Definition at line 122 of file remote.h.

References kbdAvailable.

◆ MapCodeToFunc()

int cKbdRemote::MapCodeToFunc ( uint64_t Code)
private

Definition at line 294 of file remote.c.

References KbdMap, and kfNone.

Referenced by PutKey().

◆ MapFuncToCode()

uint64_t cKbdRemote::MapFuncToCode ( int Func)
static

Definition at line 285 of file remote.c.

References KbdMap, and kfNone.

◆ PutKey()

void cKbdRemote::PutKey ( uint64_t Code,
bool Repeat = false,
bool Release = false )
private

Definition at line 305 of file remote.c.

References cRemote::IsLearning(), KBDKEY, MapCodeToFunc(), cRemote::Put(), and rawMode.

Referenced by Action().

◆ ReadKey()

int cKbdRemote::ReadKey ( void )
private

Definition at line 313 of file remote.c.

References LOG_ERROR_STR, cPoller::Poll(), safe_read(), and Setup.

Referenced by ReadKeySequence().

◆ ReadKeySequence()

uint64_t cKbdRemote::ReadKeySequence ( void )
private

Definition at line 327 of file remote.c.

References ReadKey(), systemIsUtf8, and Utf8CharGet().

Referenced by Action().

◆ SetRawMode()

void cKbdRemote::SetRawMode ( bool RawMode)
static

Definition at line 280 of file remote.c.

References rawMode.

Member Data Documentation

◆ kbdAvailable

bool cKbdRemote::kbdAvailable = false
staticprivate

Definition at line 110 of file remote.h.

Referenced by cKbdRemote(), KbdAvailable(), and ~cKbdRemote().

◆ rawMode

bool cKbdRemote::rawMode = false
staticprivate

Definition at line 111 of file remote.h.

Referenced by PutKey(), and SetRawMode().

◆ savedTm

struct termios cKbdRemote::savedTm
private

Definition at line 113 of file remote.h.

Referenced by cKbdRemote(), and ~cKbdRemote().

◆ systemIsUtf8

bool cKbdRemote::systemIsUtf8
private

Definition at line 112 of file remote.h.

Referenced by cKbdRemote(), and ReadKeySequence().


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