Publishing on NuGet.
2 // Copyright (C) 2014-2015 Stéphane Lenclud.
4 // This file is part of SharpLibHid.
6 // SharpDisplayManager is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
11 // SharpDisplayManager is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
21 using System.Collections.Generic;
24 namespace SharpLib.Hid
29 /// Provide the type for the usage collection corresponding to the given usage page.
31 /// <param name="aUsagePage"></param>
32 /// <returns></returns>
33 public static Type UsageCollectionType(UsagePage aUsagePage)
37 case UsagePage.GenericDesktopControls:
38 return typeof(UsageCollection.GenericDesktop);
40 case UsagePage.Consumer:
41 return typeof(UsageCollection.Consumer);
43 case UsagePage.WindowsMediaCenterRemoteControl:
44 return typeof(UsageCollection.WindowsMediaCenter);
52 /// Provide the type for the usage corresponding to the given usage page.
54 /// <param name="aUsagePage"></param>
55 /// <returns></returns>
56 public static Type UsageType(UsagePage aUsagePage)
60 case UsagePage.GenericDesktopControls:
61 return typeof(Usage.GenericDesktop);
63 case UsagePage.Consumer:
64 return typeof(Usage.ConsumerControl);
66 case UsagePage.WindowsMediaCenterRemoteControl:
67 return typeof(Usage.WindowsMediaCenterRemoteControl);
69 case UsagePage.Telephony:
70 return typeof(Usage.TelephonyDevice);
72 case UsagePage.SimulationControls:
73 return typeof(Usage.SimulationControl);
75 case UsagePage.GameControls:
76 return typeof(Usage.GameControl);