From 034236bf690119b2a82be1133ff328bccbdc4411 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Mon, 29 Aug 2011 15:04:49 +0200 Subject: Squashed original peripherals PR #383 This is a PR for a new "peripherals manager", /xbmc/peripherals, that detects devices and automatically configures them for use with XBMC. The device mappings and configurations can be defined in system/peripherals.xml. Users can modify settings via system->system->input->peripherals. It works as follows: - CPeripherals contains one or more CPeripheralBus instances. - CPeripheralBus contains the device scanning implementations for the different platforms we support. - The implementations for the devices can be found in peripheral/devices and all devices inherit from CPeripheral. - The devices that are detected are looked up in peripherals.xml, starting at the top of the file and going down. If no mapping was found for the device, an instance of one of the default classes will be created: CPeripheralHID, CPeripheralDisk or CPeripheralNIC. - in peripherals.xml, devices can be matched by vendor id (vendor="xxxx"), product id (product="xxxx"), bus type (bus="xxxx"), device class (class="xxxx") or a combination of these values. The class that will be instantiated for that device is defined in mapTo="xxxx" - the configuration for the device can be defined in peripherals.xml as well. Have a look at system/peripherals.xml, where you can find the possible settings in the demo entry at the bottom. When a device is inserted and there are any settings with configurable="true" present for that device, these settings will be added to the settings dialog, under system->system->input->peripherals. - an example of how these settings can be used can be found in CPeripheralHID, which checks for a "keymap" setting and will automatically switch the keymap XBMC uses to the one that is defined in the setting. TODO: - keep separate configs when the same device is found more than once - general review of this code. --- project/VS2010Express/XBMC.vcxproj | 31 +++++++-- project/VS2010Express/XBMC.vcxproj.filters | 107 +++++++++++++++++++++++++---- 2 files changed, 121 insertions(+), 17 deletions(-) (limited to 'project') diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj index 51afad2f84..19b6aa2dcd 100644 --- a/project/VS2010Express/XBMC.vcxproj +++ b/project/VS2010Express/XBMC.vcxproj @@ -451,7 +451,6 @@ - @@ -676,6 +675,19 @@ + + + + + + + + + + + + + @@ -837,7 +849,6 @@ - @@ -1371,7 +1382,6 @@ - @@ -1518,6 +1528,20 @@ + + + + + + + + + + + + + + @@ -1687,7 +1711,6 @@ - update_git_rev.bat diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters index 69354d64f4..8b6e188acf 100644 --- a/project/VS2010Express/XBMC.vcxproj.filters +++ b/project/VS2010Express/XBMC.vcxproj.filters @@ -238,6 +238,18 @@ {cea579fc-bdd7-499e-a6a6-07d681d1ab24} + + {43fa1d09-88f3-4c03-92f4-27ce109a0b1f} + + + {387fb53b-4497-4e2b-a37d-2efa9db0fce8} + + + {a3fe63d5-92eb-47e6-90f6-40b6e25d11d2} + + + {9571e2bc-891d-4496-bcba-2ec3eed45704} + @@ -1811,12 +1823,6 @@ settings - - win32 - - - input - storage @@ -2505,6 +2511,45 @@ interfaces\info + + peripherals + + + peripherals\bus + + + peripherals\devices + + + peripherals\devices + + + peripherals\devices + + + peripherals\devices + + + peripherals\devices + + + peripherals\devices + + + peripherals\bus + + + peripherals\devices + + + peripherals\devices + + + peripherals\dialogs + + + peripherals\dialogs + @@ -4315,12 +4360,6 @@ settings - - win32 - - - input - storage @@ -5033,6 +5072,48 @@ interfaces\info + + peripherals + + + peripherals\bus + + + peripherals\devices + + + peripherals\devices + + + peripherals\devices + + + peripherals\devices + + + peripherals\devices + + + peripherals\devices + + + peripherals\bus + + + peripherals + + + peripherals\devices + + + peripherals\devices + + + peripherals\dialogs + + + peripherals\dialogs + @@ -5044,4 +5125,4 @@ win32 - \ No newline at end of file + -- cgit v1.2.3