11 #include "EventPacket.h"    12 #include "ServiceBroker.h"    14 #include "settings/Settings.h"    15 #include "settings/SettingsComponent.h"    16 #include "threads/CriticalSection.h"    17 #include "threads/Thread.h"    28   #define ES_FLAG_UNICODE    0x80000000 // new 16bit key flag to support real unicode over EventServer    43     std::string    actionName;
    44     unsigned char  actionType;
    58       m_iControllerNumber = 0;
    63                       std::string buttonName,
    68       : m_buttonName(std::move(buttonName)), m_mapName(std::move(mapName)), m_iNextRepeat{}
    70       m_iKeyCode   = iKeyCode;
    72       m_bUseAmount = bUseAmount;
    76       m_iControllerNumber = 0;
    80     void Reset()     { m_bActive = 
false; }
    81     void SetActive() { m_bActive = 
true; }
    82     bool Active()
 const { 
return m_bActive; }
    83     bool Repeat()
 const { 
return m_bRepeat; }
    84     int  ControllerNumber()
 const { 
return m_iControllerNumber; }
    85     bool Axis()
 const { 
return m_bAxis; }
    86     unsigned int KeyCode()
 const { 
return m_iKeyCode; }
    87     float Amount()
 const  { 
return m_fAmount; }
    89     const std::string& JoystickName()
 const { 
return m_joystickName; }
    90     const std::string& CustomControllerName()
 const { 
return m_customControllerName; }
    93     unsigned int      m_iKeyCode;
    94     unsigned short    m_iControllerNumber;
    95     std::string       m_buttonName;
    96     std::string       m_mapName;
    97     std::string       m_joystickName;
    98     std::string       m_customControllerName;
   104     std::chrono::time_point<std::chrono::steady_clock> m_iNextRepeat;
   132       m_iCurrentSeqLen = 0;
   136       m_bMouseMoved = 
false;
   137       m_bSequenceError = 
false;
   141     const std::string& Name()
 const   146     void RefreshSettings()
   148       const std::shared_ptr<CSettings> 
settings = CServiceBroker::GetSettingsComponent()->GetSettings();
   150           std::chrono::milliseconds(settings->GetInt(CSettings::SETTING_SERVICES_ESINITIALDELAY));
   151       m_iRepeatSpeed = std::chrono::milliseconds(
   152           settings->GetInt(CSettings::SETTING_SERVICES_ESCONTINUOUSDELAY));
   166     bool AddPacket(std::unique_ptr<EVENTPACKET::CEventPacket> packet);
   175     void ProcessEvents();
   181     void FreePacketQueues();
   184     unsigned int GetButtonCode(std::string& strMapName, 
bool& isAxis, 
float& amount, 
bool &isJoystick);
   187     bool GetMousePos(
float& x, 
float& y);
   200     bool CheckButtonRepeat(std::chrono::time_point<std::chrono::steady_clock>& next);
   203     bool Greeted() { 
return m_bGreeted; }
   208       m_lastPing = time(NULL);
   219     bool ParseString(
unsigned char* &payload, 
int &psize, std::string& parsedVal);
   222     bool ParseByte(
unsigned char* &payload, 
int &psize, 
unsigned char& parsedVal);
   225     bool ParseUInt32(
unsigned char* &payload, 
int &psize, 
unsigned int& parsedVal);
   228     bool ParseUInt16(
unsigned char* &payload, 
int &psize, 
unsigned short& parsedVal);
   230     std::string       m_deviceName;
   231     int               m_iCurrentSeqLen;
   236     std::chrono::milliseconds m_iRepeatDelay;
   237     std::chrono::milliseconds m_iRepeatSpeed;
   238     unsigned int      m_iMouseX;
   239     unsigned int      m_iMouseY;
   241     bool              m_bSequenceError;
   245     EVENTPACKET::LogoType m_eLogoType;
   246     CCriticalSection  m_critSection;
   248     std::map<unsigned int, std::unique_ptr<EVENTPACKET::CEventPacket>> m_seqPackets;
   249     std::queue<std::unique_ptr<EVENTPACKET::CEventPacket>> m_readyPackets;
   252     std::list<CEventButtonState>  m_buttonQueue;
   253     std::queue<CEventAction>      m_actionQueue;
 Definition: EventPacket.h:196
Definition: EventClient.h:113
Definition: EventClient.h:25
Definition: EventClient.h:30
Definition: settings.py:1