HidUtils.cs
changeset 79 cdc5f8f1b79e
parent 78 72885c950813
child 80 e2acfa51664f
     1.1 --- a/HidUtils.cs	Sun Mar 15 16:56:31 2015 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,84 +0,0 @@
     1.4 -//
     1.5 -// Copyright (C) 2014-2015 Stéphane Lenclud.
     1.6 -//
     1.7 -// This file is part of SharpLibHid.
     1.8 -//
     1.9 -// SharpDisplayManager is free software: you can redistribute it and/or modify
    1.10 -// it under the terms of the GNU General Public License as published by
    1.11 -// the Free Software Foundation, either version 3 of the License, or
    1.12 -// (at your option) any later version.
    1.13 -//
    1.14 -// SharpDisplayManager is distributed in the hope that it will be useful,
    1.15 -// but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.16 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.17 -// GNU General Public License for more details.
    1.18 -//
    1.19 -// You should have received a copy of the GNU General Public License
    1.20 -// along with SharpDisplayManager.  If not, see <http://www.gnu.org/licenses/>.
    1.21 -//
    1.22 -
    1.23 -using System;
    1.24 -using System.Collections.Generic;
    1.25 -using System.Text;
    1.26 -
    1.27 -namespace SharpLib.Hid
    1.28 -{
    1.29 -    static class Utils
    1.30 -    {
    1.31 -        /// <summary>
    1.32 -        /// Provide the type for the usage collection corresponding to the given usage page.
    1.33 -        /// </summary>
    1.34 -        /// <param name="aUsagePage"></param>
    1.35 -        /// <returns></returns>
    1.36 -        public static Type UsageCollectionType(UsagePage aUsagePage)
    1.37 -        {
    1.38 -            switch (aUsagePage)
    1.39 -            {
    1.40 -                case UsagePage.GenericDesktopControls:
    1.41 -                    return typeof(UsageCollection.GenericDesktop);
    1.42 -
    1.43 -                case UsagePage.Consumer:
    1.44 -                    return typeof(UsageCollection.Consumer);
    1.45 -
    1.46 -                case UsagePage.WindowsMediaCenterRemoteControl:
    1.47 -                    return typeof(UsageCollection.WindowsMediaCenter);
    1.48 -
    1.49 -                default:
    1.50 -                    return null;
    1.51 -            }
    1.52 -        }
    1.53 -
    1.54 -        /// <summary>
    1.55 -        /// Provide the type for the usage corresponding to the given usage page.
    1.56 -        /// </summary>
    1.57 -        /// <param name="aUsagePage"></param>
    1.58 -        /// <returns></returns>
    1.59 -        public static Type UsageType(UsagePage aUsagePage)
    1.60 -        {
    1.61 -            switch (aUsagePage)
    1.62 -            {
    1.63 -                case UsagePage.GenericDesktopControls:
    1.64 -                    return typeof(Usage.GenericDesktop);
    1.65 -
    1.66 -                case UsagePage.Consumer:
    1.67 -                    return typeof(Usage.ConsumerControl);
    1.68 -
    1.69 -                case UsagePage.WindowsMediaCenterRemoteControl:
    1.70 -                    return typeof(Usage.WindowsMediaCenterRemoteControl);
    1.71 -
    1.72 -                case UsagePage.Telephony:
    1.73 -                    return typeof(Usage.TelephonyDevice);
    1.74 -
    1.75 -                case UsagePage.SimulationControls:
    1.76 -                    return typeof(Usage.SimulationControl);
    1.77 -
    1.78 -                case UsagePage.GameControls:
    1.79 -                    return typeof(Usage.GameControl);
    1.80 -
    1.81 -                default:
    1.82 -                    return null;
    1.83 -            }
    1.84 -        }
    1.85 -
    1.86 -    }
    1.87 -}