# HG changeset patch
# User sl
# Date 1418577460 -3600
# Node ID 8ce9bdc9c5b54b80efbc964b9da972b54e0bac2a
# Parent  7679a5ab194bdc579341298b043af05d68bdf8b4
Renaming some of our usage tables.

diff -r 7679a5ab194b -r 8ce9bdc9c5b5 Form1.cs
--- a/Form1.cs	Sat Dec 06 23:34:02 2014 +0100
+++ b/Form1.cs	Sun Dec 14 18:17:40 2014 +0100
@@ -131,7 +131,7 @@
                 label1.Text = e.Button.ToString();
                 processed = true;
             }
-            else if (e.MceButton != Hid.UsageTables.MceButton.Null)
+            else if (e.MceButton != Hid.UsageTables.WindowsMediaCenterRemoteControl.Null)
             {
                 //Display MCE button name
                 label1.Text = e.MceButton.ToString();
diff -r 7679a5ab194b -r 8ce9bdc9c5b5 HidUsageTables.cs
--- a/HidUsageTables.cs	Sat Dec 06 23:34:02 2014 +0100
+++ b/HidUsageTables.cs	Sun Dec 14 18:17:40 2014 +0100
@@ -44,7 +44,7 @@
         CameraControl,
         Arcade,
         // http://msdn.microsoft.com/en-us/library/windows/desktop/bb417079.aspx
-        MceRemote = 0xffbc,
+        WindowsMediaCenterRemoteControl = 0xffbc,
         TerraTecRemote = 0xffcc
     }
 
@@ -91,9 +91,9 @@
     }
 
     
-    public enum UsageIdMce: ushort
+    public enum UsageCollectionWindowsMediaCenter: ushort
     {
-        MceRemote = 0x88        
+        WindowsMediaCenterRemoteControl = 0x88        
     }
 
 
@@ -103,7 +103,7 @@
         /// <summary>
         ///
         /// </summary>
-        public enum MceButton: ushort
+        public enum WindowsMediaCenterRemoteControl: ushort
         {
             /// <summary>
             /// Not defined by the Microsoft specs.
@@ -243,7 +243,7 @@
             /// <para />
             /// According to HP specs it displays visual imagery that is synchronized to the sound of your music tracks.
             /// </summary>
-            Visualization = MceButton.Ext0,
+            Visualization = WindowsMediaCenterRemoteControl.Ext0,
             /// <summary>
             /// Plays a slide show of all the pictures on your hard disk drive.
             /// <para />
@@ -255,7 +255,7 @@
             /// <para />
             /// According to HP specs it plays a slide show of all the pictures on your hard disk drive.
             /// </summary>
-            SlideShow = MceButton.Ext1,
+            SlideShow = WindowsMediaCenterRemoteControl.Ext1,
             /// <summary>
             /// Eject optical drive.
             /// <para />
@@ -266,7 +266,7 @@
             /// Notably sent by the 'Eject' button of HP Windows Media Center Remote (TSGH-IR08).
             /// Also interpreted as 'Eject' action by SoundGraph iMON Manager in MCE mode (OrigenAE VF310).
             /// </summary>
-            Eject = MceButton.Ext2,
+            Eject = WindowsMediaCenterRemoteControl.Ext2,
             /// <summary>
             /// Not sure what this should do.
             /// <para />
@@ -276,7 +276,7 @@
             /// <para />
             /// Notably sent by the 'Input selection' button of HP Windows Media Center Remote (TSGH-IR08).
             /// </summary>
-            InputSelection = MceButton.Ext3,
+            InputSelection = WindowsMediaCenterRemoteControl.Ext3,
         }
 
         /// <summary>
diff -r 7679a5ab194b -r 8ce9bdc9c5b5 RemoteControlDevice.cs
--- a/RemoteControlDevice.cs	Sat Dec 06 23:34:02 2014 +0100
+++ b/RemoteControlDevice.cs	Sun Dec 14 18:17:40 2014 +0100
@@ -84,7 +84,7 @@
     {
         RemoteControlButton _rcb;
         InputDevice _device;
-        MceButton iMceButton;
+        WindowsMediaCenterRemoteControl iMceButton;
         ConsumerControl iConsumerControl;
 
         public RemoteControlEventArgs(RemoteControlButton rcb, InputDevice device)
@@ -104,7 +104,7 @@
         }
 
 
-        public RemoteControlEventArgs(MceButton mce, InputDevice device)
+        public RemoteControlEventArgs(WindowsMediaCenterRemoteControl mce, InputDevice device)
         {
             SetNullButtons();
             //
@@ -115,13 +115,13 @@
         private void SetNullButtons()
         {
             iConsumerControl = ConsumerControl.Null;
-            iMceButton = MceButton.Null;
+            iMceButton = WindowsMediaCenterRemoteControl.Null;
             _rcb = RemoteControlButton.Unknown;
         }
 
         public RemoteControlEventArgs()
         {
-            iMceButton = MceButton.Null;
+            iMceButton = WindowsMediaCenterRemoteControl.Null;
             _rcb = RemoteControlButton.Unknown;
             _device = InputDevice.Key;
         }
@@ -132,7 +132,7 @@
             set { _rcb = value; }
         }
 
-        public MceButton MceButton
+        public WindowsMediaCenterRemoteControl MceButton
         {
             get { return iMceButton; }
             set { iMceButton = value; }
@@ -182,8 +182,8 @@
             RAWINPUTDEVICE[] rid = new RAWINPUTDEVICE[4];
 
             int i = 0;
-            rid[i].usUsagePage = (ushort)Hid.UsagePage.MceRemote;
-            rid[i].usUsage = (ushort)Hid.UsageIdMce.MceRemote;
+            rid[i].usUsagePage = (ushort)Hid.UsagePage.WindowsMediaCenterRemoteControl;
+            rid[i].usUsage = (ushort)Hid.UsageCollectionWindowsMediaCenter.WindowsMediaCenterRemoteControl;
             rid[i].dwFlags = Const.RIDEV_EXINPUTSINK;
             rid[i].hwndTarget = aHWND;
 
@@ -356,11 +356,11 @@
             }
 
 
-            if (Enum.IsDefined(typeof(MceButton), aUsage) && aUsage != 0) //Our button is a known MCE button
+            if (Enum.IsDefined(typeof(WindowsMediaCenterRemoteControl), aUsage) && aUsage != 0) //Our button is a known MCE button
             {
                 if (this.ButtonPressed != null)
                 {
-                    return this.ButtonPressed(this, new RemoteControlEventArgs((MceButton)aUsage, InputDevice.OEM));
+                    return this.ButtonPressed(this, new RemoteControlEventArgs((WindowsMediaCenterRemoteControl)aUsage, InputDevice.OEM));
                 }
                 return false;
             }
@@ -394,7 +394,7 @@
             HidUsageHandler usagePageHandler = null;
 
             //Check if this an MCE remote HID message
-            if (aHidEvent.UsagePage == (ushort)Hid.UsagePage.MceRemote && aHidEvent.UsageCollection == (ushort)Hid.UsageIdMce.MceRemote)
+            if (aHidEvent.UsagePage == (ushort)Hid.UsagePage.WindowsMediaCenterRemoteControl && aHidEvent.UsageCollection == (ushort)Hid.UsageCollectionWindowsMediaCenter.WindowsMediaCenterRemoteControl)
             {
                 usagePageHandler = HidMceRemoteHandler;
             }