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;
36 class CControllerManager;
77 PeripheralPtr GetPeripheralAtLocation(
const std::string& strLocation,
78 PeripheralBusType busType = PERIPHERAL_BUS_UNKNOWN)
const;
86 bool HasPeripheralAtLocation(
const std::string& strLocation,
87 PeripheralBusType busType = PERIPHERAL_BUS_UNKNOWN)
const;
94 PeripheralBusPtr GetBusWithDevice(
const std::string& strLocation)
const;
101 bool SupportsFeature(PeripheralFeature feature)
const;
110 int GetPeripheralsWithFeature(PeripheralVector& results,
111 const PeripheralFeature feature,
112 PeripheralBusType busType = PERIPHERAL_BUS_UNKNOWN)
const;
114 size_t GetNumberOfPeripherals()
const;
122 bool HasPeripheralWithFeature(
const PeripheralFeature feature,
123 PeripheralBusType busType = PERIPHERAL_BUS_UNKNOWN)
const;
152 void GetSettingsFromMapping(
CPeripheral& peripheral)
const;
157 void TriggerDeviceScan(
const PeripheralBusType type = PERIPHERAL_BUS_UNKNOWN);
164 PeripheralBusPtr GetBusByType(
const PeripheralBusType type)
const;
171 void GetDirectory(
const std::string& strPath,
CFileItemList& items)
const;
178 PeripheralPtr GetByPath(
const std::string& strPath)
const;
186 bool OnAction(
const CAction& action);
206 bool ToggleDeviceState(
const CecStateChange mode = STATE_SWITCH_TOGGLE);
234 bool GetNextKeypress(
float frameTime,
CKey& key);
240 EventPollHandlePtr RegisterEventPoller();
246 EventLockHandlePtr RegisterEventLock();
251 void OnUserNotification();
257 void TestFeature(PeripheralFeature feature);
262 void PowerOffDevices();
264 bool SupportsCEC()
const 266 #if defined(HAVE_LIBCEC) 274 void ProcessEvents(
void)
override;
285 void EnableButtonMapping();
291 PeripheralAddonPtr GetAddonWithButtonMap(
const CPeripheral* device);
298 void ResetButtonMaps(
const std::string& controllerId);
321 void OnSettingChanged(
const std::shared_ptr<const CSetting>& setting)
override;
322 void OnSettingAction(
const std::shared_ptr<const CSetting>& setting)
override;
326 int GetMessageMask()
override;
329 void Announce(ANNOUNCEMENT::AnnouncementFlag flag,
330 const std::string& sender,
331 const std::string& message,
347 static void GetSettingsFromMappingsFile(
348 TiXmlElement* xmlNode, std::map<std::string, PeripheralDeviceSetting>& m_settings);
350 void OnDeviceChanged();
356 #if !defined(HAVE_LIBCEC) 357 bool m_bMissingLibCecWarningDisplayed =
false;
359 std::vector<PeripheralBusPtr> m_busses;
360 std::vector<PeripheralDeviceMapping> m_mappings;
361 std::unique_ptr<CEventScanner> m_eventScanner;
362 mutable CCriticalSection m_critSectionBusses;
363 mutable CCriticalSection m_critSectionMappings;
Definition: PeripheralTypes.h:318
KODI::GAME::CControllerManager & GetControllerProfiles()
Access controller profiles through the construction parameter.
Definition: Peripherals.h:342
bool UnMute()
Try to unmute the audio via a peripheral.
Definition: Peripherals.h:223
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:337
Definition: RetroPlayerInput.h:15
Represents a list of files.
Definition: FileItem.h:713
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
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
Definition: ControllerManager.h:22
Controller configuration window.
Definition: AudioDecoder.h:18
Definition: PeripheralBus.h:34
bool Mute()
Try to mute the audio via a peripheral.
Definition: Peripherals.h:213
Definition: IEventScannerCallback.h:13
Definition: Peripheral.h:62
Definition: Observer.h:44
Definition: Peripherals.h:49