11 #include "bus/PeripheralBus.h" 12 #include "devices/Peripheral.h" 13 #include "interfaces/IAnnouncer.h" 14 #include "messaging/IMessageTarget.h" 15 #include "peripherals/events/interfaces/IEventScannerCallback.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;
84 PeripheralPtr GetPeripheralAtLocation(
const std::string& strLocation,
85 PeripheralBusType busType = PERIPHERAL_BUS_UNKNOWN)
const;
93 bool HasPeripheralAtLocation(
const std::string& strLocation,
94 PeripheralBusType busType = PERIPHERAL_BUS_UNKNOWN)
const;
101 PeripheralBusPtr GetBusWithDevice(
const std::string& strLocation)
const;
108 bool SupportsFeature(PeripheralFeature feature)
const;
117 int GetPeripheralsWithFeature(PeripheralVector& results,
118 const PeripheralFeature feature,
119 PeripheralBusType busType = PERIPHERAL_BUS_UNKNOWN)
const;
121 size_t GetNumberOfPeripherals()
const;
129 bool HasPeripheralWithFeature(
const PeripheralFeature feature,
130 PeripheralBusType busType = PERIPHERAL_BUS_UNKNOWN)
const;
159 void GetSettingsFromMapping(
CPeripheral& peripheral)
const;
164 void TriggerDeviceScan(
const PeripheralBusType type = PERIPHERAL_BUS_UNKNOWN);
171 PeripheralBusPtr GetBusByType(
const PeripheralBusType type)
const;
178 void GetDirectory(
const std::string& strPath,
CFileItemList& items)
const;
185 PeripheralPtr GetByPath(
const std::string& strPath)
const;
193 bool OnAction(
const CAction& action);
213 bool ToggleDeviceState(
const CecStateChange mode = STATE_SWITCH_TOGGLE);
241 bool GetNextKeypress(
float frameTime,
CKey& key);
247 EventPollHandlePtr RegisterEventPoller();
253 EventLockHandlePtr RegisterEventLock();
258 void OnUserNotification();
264 void TestFeature(PeripheralFeature feature);
269 void PowerOffDevices();
271 bool SupportsCEC()
const 273 #if defined(HAVE_LIBCEC) 281 void ProcessEvents(
void)
override;
292 void EnableButtonMapping();
298 PeripheralAddonPtr GetAddonWithButtonMap(
const CPeripheral* device);
305 void ResetButtonMaps(
const std::string& controllerId);
328 void OnSettingChanged(
const std::shared_ptr<const CSetting>& setting)
override;
329 void OnSettingAction(
const std::shared_ptr<const CSetting>& setting)
override;
333 int GetMessageMask()
override;
336 void Announce(ANNOUNCEMENT::AnnouncementFlag flag,
337 const std::string& sender,
338 const std::string& message,
346 return m_inputManager;
354 return m_controllerProfiles;
362 return m_addonInstallMutex;
368 static void GetSettingsFromMappingsFile(
369 tinyxml2::XMLElement* xmlNode, std::map<std::string, PeripheralDeviceSetting>& m_settings);
371 void OnDeviceChanged();
377 #if !defined(HAVE_LIBCEC) 378 bool m_bMissingLibCecWarningDisplayed =
false;
380 std::vector<PeripheralBusPtr> m_busses;
381 std::vector<PeripheralDeviceMapping> m_mappings;
382 std::unique_ptr<CEventScanner> m_eventScanner;
383 mutable CCriticalSection m_critSectionBusses;
384 mutable CCriticalSection m_critSectionMappings;
385 CCriticalSection m_addonInstallMutex;
Definition: PeripheralTypes.h:326
KODI::GAME::CControllerManager & GetControllerProfiles()
Access controller profiles through the construction parameter.
Definition: Peripherals.h:352
bool UnMute()
Try to unmute the audio via a peripheral.
Definition: Peripherals.h:230
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:344
Definition: RetroPlayerInput.h:15
Represents a list of files.
Definition: FileItem.h:702
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:360
Class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:21
Definition: ControllerManager.h:31
Definition: AudioDecoder.h:18
Definition: PeripheralBus.h:36
bool Mute()
Try to mute the audio via a peripheral.
Definition: Peripherals.h:220
Definition: IEventScannerCallback.h:16
Definition: Peripheral.h:71
Definition: Observer.h:44
Definition: Peripherals.h:56