xbmc
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
EVENTCLIENT::CEventClient Class Reference
Collaboration diagram for EVENTCLIENT::CEventClient:
Collaboration graph
[legend]

Public Member Functions

 CEventClient (SOCKETS::CAddress &addr)
 
void Initialize ()
 
const std::string & Name () const
 
void RefreshSettings ()
 
SOCKETS::CAddressAddress ()
 
bool AddPacket (std::unique_ptr< EVENTPACKET::CEventPacket > packet)
 
bool Alive () const
 
bool ProcessQueue ()
 
void ProcessEvents ()
 
bool GetNextAction (CEventAction &action)
 
void FreePacketQueues ()
 
unsigned int GetButtonCode (std::string &strMapName, bool &isAxis, float &amount, bool &isJoystick)
 
bool GetMousePos (float &x, float &y)
 

Protected Member Functions

bool ProcessPacket (EVENTPACKET::CEventPacket *packet)
 
virtual bool OnPacketHELO (EVENTPACKET::CEventPacket *packet)
 
virtual bool OnPacketBYE (EVENTPACKET::CEventPacket *packet)
 
virtual bool OnPacketBUTTON (EVENTPACKET::CEventPacket *packet)
 
virtual bool OnPacketMOUSE (EVENTPACKET::CEventPacket *packet)
 
virtual bool OnPacketNOTIFICATION (EVENTPACKET::CEventPacket *packet)
 
virtual bool OnPacketLOG (EVENTPACKET::CEventPacket *packet)
 
virtual bool OnPacketACTION (EVENTPACKET::CEventPacket *packet)
 
bool CheckButtonRepeat (std::chrono::time_point< std::chrono::steady_clock > &next)
 
bool Greeted ()
 
void ResetTimeout ()
 
bool ParseString (unsigned char *&payload, int &psize, std::string &parsedVal)
 
bool ParseByte (unsigned char *&payload, int &psize, unsigned char &parsedVal)
 
bool ParseUInt32 (unsigned char *&payload, int &psize, unsigned int &parsedVal)
 
bool ParseUInt16 (unsigned char *&payload, int &psize, unsigned short &parsedVal)
 

Protected Attributes

std::string m_deviceName
 
int m_iCurrentSeqLen
 
time_t m_lastPing
 
time_t m_lastSeq
 
int m_iRemotePort
 
bool m_bGreeted
 
std::chrono::milliseconds m_iRepeatDelay
 
std::chrono::milliseconds m_iRepeatSpeed
 
unsigned int m_iMouseX
 
unsigned int m_iMouseY
 
bool m_bMouseMoved
 
bool m_bSequenceError
 
SOCKETS::CAddress m_remoteAddr
 
EVENTPACKET::LogoType m_eLogoType
 
CCriticalSection m_critSection
 
std::map< unsigned int, std::unique_ptr< EVENTPACKET::CEventPacket > > m_seqPackets
 
std::queue< std::unique_ptr< EVENTPACKET::CEventPacket > > m_readyPackets
 
std::list< CEventButtonStatem_buttonQueue
 
std::queue< CEventActionm_actionQueue
 
CEventButtonState m_currentButton
 

Member Function Documentation

◆ AddPacket()

bool CEventClient::AddPacket ( std::unique_ptr< EVENTPACKET::CEventPacket packet)
Todo:
limit payload size

◆ OnPacketHELO()

bool CEventClient::OnPacketHELO ( EVENTPACKET::CEventPacket packet)
protectedvirtual
Todo:
check it last HELO packet was received less than 5 minutes back if so, do not show notification of connection.

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