aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorLars Op den Kamp <lars@opdenkamp.eu>2011-08-29 15:04:49 +0200
committerLars Op den Kamp <lars@opdenkamp.eu>2011-09-30 00:37:53 +0200
commit034236bf690119b2a82be1133ff328bccbdc4411 (patch)
tree73591daaadc6539cee5c71bab0325485096e79ec /project
parent714ad40da8b2ead338aa8e57ef6a5b6802d8a2df (diff)
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.
Diffstat (limited to 'project')
-rw-r--r--project/VS2010Express/XBMC.vcxproj31
-rw-r--r--project/VS2010Express/XBMC.vcxproj.filters107
2 files changed, 121 insertions, 17 deletions
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 @@
<ClCompile Include="..\..\xbmc\input\InertialScrollingHandler.cpp" />
<ClCompile Include="..\..\xbmc\input\KeyboardLayoutConfiguration.cpp" />
<ClCompile Include="..\..\xbmc\input\KeyboardStat.cpp" />
- <ClCompile Include="..\..\xbmc\input\KeymapLoader.cpp" />
<ClCompile Include="..\..\xbmc\input\MouseStat.cpp" />
<ClCompile Include="..\..\xbmc\input\SDLJoystick.cpp" />
<ClCompile Include="..\..\xbmc\input\windows\IRServerSuite.cpp" />
@@ -676,6 +675,19 @@
<ClCompile Include="..\..\xbmc\NfoFile.cpp" />
<ClCompile Include="..\..\xbmc\PartyModeManager.cpp" />
<ClCompile Include="..\..\xbmc\PasswordManager.cpp" />
+ <ClCompile Include="..\..\xbmc\peripherals\bus\PeripheralBus.cpp" />
+ <ClCompile Include="..\..\xbmc\peripherals\bus\win32\PeripheralBusUSB.cpp" />
+ <ClCompile Include="..\..\xbmc\peripherals\devices\Peripheral.cpp" />
+ <ClCompile Include="..\..\xbmc\peripherals\devices\PeripheralBluetooth.cpp" />
+ <ClCompile Include="..\..\xbmc\peripherals\devices\PeripheralCecAdapter.cpp" />
+ <ClCompile Include="..\..\xbmc\peripherals\devices\PeripheralDisk.cpp" />
+ <ClCompile Include="..\..\xbmc\peripherals\devices\PeripheralHID.cpp" />
+ <ClCompile Include="..\..\xbmc\peripherals\devices\PeripheralNIC.cpp" />
+ <ClCompile Include="..\..\xbmc\peripherals\devices\PeripheralNyxboard.cpp" />
+ <ClCompile Include="..\..\xbmc\peripherals\devices\PeripheralTuner.cpp" />
+ <ClCompile Include="..\..\xbmc\peripherals\dialogs\GUIDialogPeripheralManager.cpp" />
+ <ClCompile Include="..\..\xbmc\peripherals\dialogs\GUIDialogPeripheralSettings.cpp" />
+ <ClCompile Include="..\..\xbmc\peripherals\Peripherals.cpp" />
<ClCompile Include="..\..\xbmc\pictures\GUIDialogPictureInfo.cpp" />
<ClCompile Include="..\..\xbmc\pictures\GUIViewStatePictures.cpp" />
<ClCompile Include="..\..\xbmc\pictures\GUIWindowPictures.cpp" />
@@ -837,7 +849,6 @@
<ClCompile Include="..\..\xbmc\win32\strverscmp.cpp" />
<ClCompile Include="..\..\xbmc\win32\Win32DelayedDllLoad.cpp" />
<ClCompile Include="..\..\xbmc\win32\win32env.cpp" />
- <ClCompile Include="..\..\xbmc\win32\WIN32USBScan.cpp" />
<ClCompile Include="..\..\xbmc\win32\WIN32Util.cpp" />
<ClCompile Include="..\..\xbmc\win32\WINDirectSound.cpp" />
<ClCompile Include="..\..\xbmc\win32\WindowHelper.cpp" />
@@ -1371,7 +1382,6 @@
<ClInclude Include="..\..\xbmc\input\InertialScrollingHandler.h" />
<ClInclude Include="..\..\xbmc\input\KeyboardLayoutConfiguration.h" />
<ClInclude Include="..\..\xbmc\input\KeyboardStat.h" />
- <ClInclude Include="..\..\xbmc\input\KeymapLoader.h" />
<ClInclude Include="..\..\xbmc\input\MouseStat.h" />
<ClInclude Include="..\..\xbmc\input\SDLJoystick.h" />
<ClInclude Include="..\..\xbmc\input\windows\IRServerSuite.h" />
@@ -1518,6 +1528,20 @@
<ClInclude Include="..\..\xbmc\NfoFile.h" />
<ClInclude Include="..\..\xbmc\PartyModeManager.h" />
<ClInclude Include="..\..\xbmc\PasswordManager.h" />
+ <ClInclude Include="..\..\xbmc\peripherals\bus\PeripheralBus.h" />
+ <ClInclude Include="..\..\xbmc\peripherals\bus\win32\PeripheralBusUSB.h" />
+ <ClInclude Include="..\..\xbmc\peripherals\devices\Peripheral.h" />
+ <ClInclude Include="..\..\xbmc\peripherals\devices\PeripheralBluetooth.h" />
+ <ClInclude Include="..\..\xbmc\peripherals\devices\PeripheralCecAdapter.h" />
+ <ClInclude Include="..\..\xbmc\peripherals\devices\PeripheralDisk.h" />
+ <ClInclude Include="..\..\xbmc\peripherals\devices\PeripheralHID.h" />
+ <ClInclude Include="..\..\xbmc\peripherals\devices\PeripheralNIC.h" />
+ <ClInclude Include="..\..\xbmc\peripherals\devices\PeripheralNyxboard.h" />
+ <ClInclude Include="..\..\xbmc\peripherals\devices\PeripheralTuner.h" />
+ <ClInclude Include="..\..\xbmc\peripherals\dialogs\GUIDialogPeripheralManager.h" />
+ <ClInclude Include="..\..\xbmc\peripherals\dialogs\GUIDialogPeripheralSettings.h" />
+ <ClInclude Include="..\..\xbmc\peripherals\Peripherals.h" />
+ <ClInclude Include="..\..\xbmc\peripherals\PeripheralTypes.h" />
<ClInclude Include="..\..\xbmc\pictures\DllImageLib.h" />
<ClInclude Include="..\..\xbmc\pictures\DllLibExif.h" />
<ClInclude Include="..\..\xbmc\pictures\GUIDialogPictureInfo.h" />
@@ -1687,7 +1711,6 @@
<ClInclude Include="..\..\xbmc\ViewState.h" />
<ClInclude Include="..\..\xbmc\win32\pch.h" />
<ClInclude Include="..\..\xbmc\win32\PlatformDefs.h" />
- <ClInclude Include="..\..\xbmc\win32\WIN32USBScan.h" />
<ClInclude Include="..\..\xbmc\XBDateTime.h" />
<CustomBuild Include="..\..\xbmc\win32\PlatformInclude.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Release (DirectX)|Win32'">update_git_rev.bat</Command>
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 @@
<Filter Include="interfaces\info">
<UniqueIdentifier>{cea579fc-bdd7-499e-a6a6-07d681d1ab24}</UniqueIdentifier>
</Filter>
+ <Filter Include="peripherals">
+ <UniqueIdentifier>{43fa1d09-88f3-4c03-92f4-27ce109a0b1f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="peripherals\bus">
+ <UniqueIdentifier>{387fb53b-4497-4e2b-a37d-2efa9db0fce8}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="peripherals\devices">
+ <UniqueIdentifier>{a3fe63d5-92eb-47e6-90f6-40b6e25d11d2}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="peripherals\dialogs">
+ <UniqueIdentifier>{9571e2bc-891d-4496-bcba-2ec3eed45704}</UniqueIdentifier>
+ </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\xbmc\win32\pch.cpp">
@@ -1811,12 +1823,6 @@
<ClCompile Include="..\..\xbmc\settings\VideoSettings.cpp">
<Filter>settings</Filter>
</ClCompile>
- <ClCompile Include="..\..\xbmc\win32\WIN32USBScan.cpp">
- <Filter>win32</Filter>
- </ClCompile>
- <ClCompile Include="..\..\xbmc\input\KeymapLoader.cpp">
- <Filter>input</Filter>
- </ClCompile>
<ClCompile Include="..\..\xbmc\storage\AutorunMediaJob.cpp">
<Filter>storage</Filter>
</ClCompile>
@@ -2505,6 +2511,45 @@
<ClCompile Include="..\..\xbmc\interfaces\info\SkinVariable.cpp">
<Filter>interfaces\info</Filter>
</ClCompile>
+ <ClCompile Include="..\..\xbmc\peripherals\Peripherals.cpp">
+ <Filter>peripherals</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\peripherals\bus\PeripheralBus.cpp">
+ <Filter>peripherals\bus</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\peripherals\devices\Peripheral.cpp">
+ <Filter>peripherals\devices</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\peripherals\devices\PeripheralCecAdapter.cpp">
+ <Filter>peripherals\devices</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\peripherals\devices\PeripheralDisk.cpp">
+ <Filter>peripherals\devices</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\peripherals\devices\PeripheralHID.cpp">
+ <Filter>peripherals\devices</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\peripherals\devices\PeripheralNIC.cpp">
+ <Filter>peripherals\devices</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\peripherals\devices\PeripheralNyxboard.cpp">
+ <Filter>peripherals\devices</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\peripherals\bus\win32\PeripheralBusUSB.cpp">
+ <Filter>peripherals\bus</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\peripherals\devices\PeripheralBluetooth.cpp">
+ <Filter>peripherals\devices</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\peripherals\devices\PeripheralTuner.cpp">
+ <Filter>peripherals\devices</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\peripherals\dialogs\GUIDialogPeripheralManager.cpp">
+ <Filter>peripherals\dialogs</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xbmc\peripherals\dialogs\GUIDialogPeripheralSettings.cpp">
+ <Filter>peripherals\dialogs</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\xbmc\win32\pch.h">
@@ -4315,12 +4360,6 @@
<ClInclude Include="..\..\xbmc\settings\VideoSettings.h">
<Filter>settings</Filter>
</ClInclude>
- <ClInclude Include="..\..\xbmc\win32\WIN32USBScan.h">
- <Filter>win32</Filter>
- </ClInclude>
- <ClInclude Include="..\..\xbmc\input\KeymapLoader.h">
- <Filter>input</Filter>
- </ClInclude>
<ClInclude Include="..\..\xbmc\storage\AutorunMediaJob.h">
<Filter>storage</Filter>
</ClInclude>
@@ -5033,6 +5072,48 @@
<ClInclude Include="..\..\xbmc\interfaces\info\SkinVariable.h">
<Filter>interfaces\info</Filter>
</ClInclude>
+ <ClInclude Include="..\..\xbmc\peripherals\Peripherals.h">
+ <Filter>peripherals</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\peripherals\bus\PeripheralBus.h">
+ <Filter>peripherals\bus</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\peripherals\devices\Peripheral.h">
+ <Filter>peripherals\devices</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\peripherals\devices\PeripheralCecAdapter.h">
+ <Filter>peripherals\devices</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\peripherals\devices\PeripheralDisk.h">
+ <Filter>peripherals\devices</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\peripherals\devices\PeripheralHID.h">
+ <Filter>peripherals\devices</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\peripherals\devices\PeripheralNIC.h">
+ <Filter>peripherals\devices</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\peripherals\devices\PeripheralNyxboard.h">
+ <Filter>peripherals\devices</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\peripherals\bus\win32\PeripheralBusUSB.h">
+ <Filter>peripherals\bus</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\peripherals\PeripheralTypes.h">
+ <Filter>peripherals</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\peripherals\devices\PeripheralBluetooth.h">
+ <Filter>peripherals\devices</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\peripherals\devices\PeripheralTuner.h">
+ <Filter>peripherals\devices</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\peripherals\dialogs\GUIDialogPeripheralManager.h">
+ <Filter>peripherals\dialogs</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\xbmc\peripherals\dialogs\GUIDialogPeripheralSettings.h">
+ <Filter>peripherals\dialogs</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\xbmc\win32\XBMC_PC.rc">
@@ -5044,4 +5125,4 @@
<Filter>win32</Filter>
</CustomBuild>
</ItemGroup>
-</Project> \ No newline at end of file
+</Project>