# HG changeset patch # User sl # Date 1408997180 -7200 # Node ID a4f39c390e9a2e513b788b6b96e1e3cd17ea5518 # Parent 86aad774b532337f58039e2d36b5b26501a10d7d MiniDisplay API update. diff -r 86aad774b532 -r a4f39c390e9a Server/Display.cs --- a/Server/Display.cs Fri Aug 22 22:48:30 2014 +0200 +++ b/Server/Display.cs Mon Aug 25 22:06:20 2014 +0200 @@ -8,6 +8,9 @@ namespace SharpDisplayManager { + /// + /// Provide access to our display hardware through MiniDisplay API. + /// class Display { @@ -87,17 +90,17 @@ public void RequestPowerSupplyStatus() { - MiniDisplayRequestPowerSupplyStatus(iDevice); + MiniDisplayRequest(iDevice, TMiniDisplayRequest.EMiniDisplayRequestPowerSupplyStatus); } public void RequestDeviceId() { - MiniDisplayRequestDeviceId(iDevice); + MiniDisplayRequest(iDevice, TMiniDisplayRequest.EMiniDisplayRequestDeviceId); } public void RequestFirmwareRevision() { - MiniDisplayRequestFirmwareRevision(iDevice); + MiniDisplayRequest(iDevice, TMiniDisplayRequest.EMiniDisplayRequestFirmwareRevision); } public bool PowerSupplyStatus() @@ -229,13 +232,7 @@ public static extern bool MiniDisplayPowerSupplyStatus(IntPtr aDevice); [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] - public static extern void MiniDisplayRequestDeviceId(IntPtr aDevice); - - [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] - public static extern void MiniDisplayRequestFirmwareRevision(IntPtr aDevice); - - [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] - public static extern void MiniDisplayRequestPowerSupplyStatus(IntPtr aDevice); + public static extern void MiniDisplayRequest(IntPtr aDevice, TMiniDisplayRequest aRequest); [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] public static extern TMiniDisplayRequest MiniDisplayAttemptRequestCompletion(IntPtr aDevice);