11 #include "IEventScannerCallback.h" 12 #include "bus/PeripheralBus.h" 13 #include "devices/Peripheral.h" 14 #include "interfaces/IAnnouncer.h" 15 #include "messaging/IMessageTarget.h" 16 #include "settings/lib/ISettingCallback.h" 17 #include "threads/CriticalSection.h" 18 #include "threads/Thread.h" 19 #include "utils/Observer.h" 27 class CSettingsCategory;
40 class CControllerManager;
81 PeripheralPtr GetPeripheralAtLocation(
const std::string& strLocation,
82 PeripheralBusType busType = PERIPHERAL_BUS_UNKNOWN)
const;
90 bool HasPeripheralAtLocation(
const std::string& strLocation,
91 PeripheralBusType busType = PERIPHERAL_BUS_UNKNOWN)
const;
98 PeripheralBusPtr GetBusWithDevice(
const std::string& strLocation)
const;
105 bool SupportsFeature(PeripheralFeature feature)
const;
114 int GetPeripheralsWithFeature(PeripheralVector& results,
115 const PeripheralFeature feature,
116 PeripheralBusType busType = PERIPHERAL_BUS_UNKNOWN)
const;
118 size_t GetNumberOfPeripherals()
const;
126 bool HasPeripheralWithFeature(
const PeripheralFeature feature,
127 PeripheralBusType busType = PERIPHERAL_BUS_UNKNOWN)
const;
156 void GetSettingsFromMapping(
CPeripheral& peripheral)
const;
161 void TriggerDeviceScan(
const PeripheralBusType type = PERIPHERAL_BUS_UNKNOWN);
168 PeripheralBusPtr GetBusByType(
const PeripheralBusType type)
const;
175 void GetDirectory(
const std::string& strPath,
CFileItemList& items)
const;
182 PeripheralPtr GetByPath(
const std::string& strPath)
const;
190 bool OnAction(
const CAction& action);
210 bool ToggleDeviceState(
const CecStateChange mode = STATE_SWITCH_TOGGLE);
238 bool GetNextKeypress(
float frameTime,
CKey& key);
244 EventPollHandlePtr RegisterEventPoller();
250 EventLockHandlePtr RegisterEventLock();
255 void OnUserNotification();
261 void TestFeature(PeripheralFeature feature);
266 void PowerOffDevices();
268 bool SupportsCEC()
const 270 #if defined(HAVE_LIBCEC) 278 void ProcessEvents(
void)
override;
289 void EnableButtonMapping();
295 PeripheralAddonPtr GetAddonWithButtonMap(
const CPeripheral* device);
302 void ResetButtonMaps(
const std::string& controllerId);
325 void OnSettingChanged(
const std::shared_ptr<const CSetting>& setting)
override;
326 void OnSettingAction(
const std::shared_ptr<const CSetting>& setting)
override;
330 int GetMessageMask()
override;
333 void Announce(ANNOUNCEMENT::AnnouncementFlag flag,
334 const std::string& sender,
335 const std::string& message,
356 static void GetSettingsFromMappingsFile(
357 tinyxml2::XMLElement* xmlNode, std::map<std::string, PeripheralDeviceSetting>& m_settings);
359 void OnDeviceChanged();
365 #if !defined(HAVE_LIBCEC) 366 bool m_bMissingLibCecWarningDisplayed =
false;
368 std::vector<PeripheralBusPtr> m_busses;
369 std::vector<PeripheralDeviceMapping> m_mappings;
370 std::unique_ptr<CEventScanner> m_eventScanner;
371 mutable CCriticalSection m_critSectionBusses;
372 mutable CCriticalSection m_critSectionMappings;
373 CCriticalSection m_addonInstallMutex;
Definition: PeripheralTypes.h:318
KODI::GAME::CControllerManager & GetControllerProfiles()
Access controller profiles through the construction parameter.
Definition: Peripherals.h:346
bool UnMute()
Try to unmute the audio via a peripheral.
Definition: Peripherals.h:227
A class wishing to receive messages should implement this and call.
Definition: IMessageTarget.h:23
CInputManager & GetInputManager()
Access the input manager passed to the constructor.
Definition: Peripherals.h:341
Definition: RetroPlayerInput.h:15
Represents a list of files.
Definition: FileItem.h:721
Definition: IAnnouncer.h:70
Definition: ISettingCallback.h:16
Setting base class containing all the properties which are common to all settings independent of the ...
Definition: Setting.h:46
Definition: ThreadMessage.h:25
Definition: SkinTimerManager.h:18
CCriticalSection & GetAddonInstallMutex()
Get a mutex that allows for add-on install tasks to block on each other.
Definition: Peripherals.h:351
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
Definition: ControllerManager.h:31
Definition: AudioDecoder.h:18
Definition: PeripheralBus.h:34
bool Mute()
Try to mute the audio via a peripheral.
Definition: Peripherals.h:217
Definition: IEventScannerCallback.h:13
Definition: Peripheral.h:61
Definition: Observer.h:44
Definition: Peripherals.h:53