Пример #1
0
 internal WirelessDevice(WirelessManager parent, RDD info)
 {
     this.parent = parent;
     this.type   = info.DeviceType;
     deviceName  = info.pszDeviceName;
     displayName = info.pszDisplayName;
     this.state  = info.dwState;
 }
Пример #2
0
        internal void SetAll(WirelessState state)
        {
            IntPtr devList;
            int    result = GetWirelessDevices(out devList, 0);
            IntPtr pThis  = devList;

            while (pThis != IntPtr.Zero)
            {
                RDD r = (RDD)Marshal.PtrToStructure(pThis, typeof(RDD));

                ChangeRadioState(pThis, state, SAVEACTION.RADIODEVICES_PRE_SAVE);

                pThis = r.pNext;
            }
            result = FreeDeviceList(devList);
        }
Пример #3
0
        internal int SetWirelessState(WirelessDeviceType type, WirelessState state)
        {
            int    stateResult = -1;
            IntPtr devList;
            int    result = GetWirelessDevices(out devList, 0);
            IntPtr pThis  = devList;

            while (pThis != IntPtr.Zero)
            {
                RDD r = (RDD)Marshal.PtrToStructure(pThis, typeof(RDD));

                if (r.DeviceType == type)
                {
                    stateResult = ChangeRadioState(pThis, state, SAVEACTION.RADIODEVICES_PRE_SAVE);
                }

                pThis = r.pNext;
            }

            result = FreeDeviceList(devList);
            return(stateResult);
        }
Пример #4
0
 internal static extern int ChangeRadioState(IntPtr pDev, WirelessState dwState, SAVEACTION sa);
Пример #5
0
 internal static extern bool QueryWirelessState(IntPtr pDevice, out WirelessState state);
Пример #6
0
 internal ConnectionEvent(ref SteamControllerLib.Event evt) : base(evt)
 {
     this.State = (WirelessState)evt.connection.details;
 }