public bool StartInquiry()
 {
     WidcommPortSingleThreader.MiscReturnCommand <bool> cmd = _st.AddCommand(
         new WidcommPortSingleThreader.MiscReturnCommand <bool>(delegate {
         return(_child.StartInquiry());
     }));
     return(cmd.WaitCompletion());
 }
 public SDK_RETURN_CODE IsRemoteDevicePresent(byte[] bd_addr)
 {
     WidcommPortSingleThreader.MiscReturnCommand <SDK_RETURN_CODE> cmd = _st.AddCommand(
         new WidcommPortSingleThreader.MiscReturnCommand <SDK_RETURN_CODE>(delegate {
         return(_child.IsRemoteDevicePresent(bd_addr));
     }));
     return(cmd.WaitCompletion());
 }
 public bool IsRemoteDeviceConnected(byte[] bd_addr)
 {
     WidcommPortSingleThreader.MiscReturnCommand <bool> cmd = _st.AddCommand(
         new WidcommPortSingleThreader.MiscReturnCommand <bool>(delegate {
         return(_child.IsRemoteDeviceConnected(bd_addr));
     }));
     return(cmd.WaitCompletion());
 }
 public bool UnBond(BluetoothAddress address)
 {
     WidcommPortSingleThreader.MiscReturnCommand <bool> cmd = _st.AddCommand(
         new WidcommPortSingleThreader.MiscReturnCommand <bool>(delegate {
         return(_child.UnBond(address));
     }));
     return(cmd.WaitCompletion());
 }
 public WBtRc GetExtendedError()
 {
     WidcommPortSingleThreader.MiscReturnCommand <WBtRc> cmd = _st.AddCommand(
         new WidcommPortSingleThreader.MiscReturnCommand <WBtRc>(delegate {
         return(_child.GetExtendedError());
     }));
     return(cmd.WaitCompletion());
 }
 public bool BondQuery(byte[] bd_addr)
 {
     WidcommPortSingleThreader.MiscReturnCommand <bool> cmd = _st.AddCommand(
         new WidcommPortSingleThreader.MiscReturnCommand <bool>(delegate {
         return(_child.BondQuery(bd_addr));
     }));
     return(cmd.WaitCompletion());
 }
 public BOND_RETURN_CODE Bond(BluetoothAddress address, string passphrase)
 {
     WidcommPortSingleThreader.MiscReturnCommand <BOND_RETURN_CODE> cmd = _st.AddCommand(
         new WidcommPortSingleThreader.MiscReturnCommand <BOND_RETURN_CODE>(delegate {
         return(_child.Bond(address, passphrase));
     }));
     return(cmd.WaitCompletion());
 }
 public int GetRssi(byte[] bd_addr)
 {
     WidcommPortSingleThreader.MiscReturnCommand <int> cmd = _st.AddCommand(
         new WidcommPortSingleThreader.MiscReturnCommand <int>(delegate {
         return(_child.GetRssi(bd_addr));
     }));
     return(cmd.WaitCompletion());
 }
 public bool GetLocalDeviceName(byte[] bdName)
 {
     WidcommPortSingleThreader.MiscReturnCommand <bool> cmd = _st.AddCommand(
         new WidcommPortSingleThreader.MiscReturnCommand <bool>(delegate {
         return(_child.GetLocalDeviceName(bdName));
     }));
     return(cmd.WaitCompletion());
 }
Ejemplo n.º 10
0
 public bool SetSecurityLevel(byte[] p_service_name, BTM_SEC securityLevel, bool isServer)
 {
     WidcommPortSingleThreader.MiscReturnCommand <bool> cmd = _st.AddCommand(
         new WidcommPortSingleThreader.MiscReturnCommand <bool>(delegate {
         return(_child.SetSecurityLevel(p_service_name, securityLevel, isServer));
     }));
     return(cmd.WaitCompletion());
 }
Ejemplo n.º 11
0
 public bool ClientAssignScnValue(Guid serviceGuid, int scn)
 {
     WidcommPortSingleThreader.MiscReturnCommand <bool> cmd = _st.AddCommand(
         new WidcommPortSingleThreader.MiscReturnCommand <bool>(delegate {
         return(_child.ClientAssignScnValue(serviceGuid, scn));
     }));
     return(cmd.WaitCompletion());
 }
Ejemplo n.º 12
0
 public bool StartDiscovery(BluetoothAddress address, Guid serviceGuid)
 {
     //return _child.StartDiscovery(address, serviceGuid);
     WidcommPortSingleThreader.MiscReturnCommand <bool> cmd = _st.AddCommand(
         new WidcommPortSingleThreader.MiscReturnCommand <bool>(delegate {
         return(_child.StartDiscovery(address, serviceGuid));
     }));
     return(cmd.WaitCompletion());
 }
Ejemplo n.º 13
0
        public void IsDeviceConnectableDiscoverable(out bool conno, out bool disco)
        {
            WidcommPortSingleThreader.MiscReturnCommand <HoldConnoDisco> cmd = _st.AddCommand(
                new WidcommPortSingleThreader.MiscReturnCommand <HoldConnoDisco>(delegate {
                HoldConnoDisco resultI = new HoldConnoDisco();
                _child.IsDeviceConnectableDiscoverable(out resultI.conno, out resultI.disco);
                return(resultI);
            }));
            HoldConnoDisco resultO = cmd.WaitCompletion();

            conno = resultO.conno;
            disco = resultO.disco;
        }
Ejemplo n.º 14
0
        protected override bool DoIsConnected(out BluetoothAddress p_remote_bdaddr)
        {
            bool connected;

            if (_singleThreader != null)
            {
                Func <IsConnectedResult> dlgt = delegate {
                    IsConnectedResult rslt = new IsConnectedResult();
                    rslt._connected = m_port.IsConnected(out rslt._p_remote_bdaddr);
                    return(rslt);
                };
                WidcommPortSingleThreader.MiscReturnCommand <IsConnectedResult> cmd = AddCommand(
                    new WidcommPortSingleThreader.MiscReturnCommand <IsConnectedResult>(dlgt));
                IsConnectedResult ret = cmd.WaitCompletion();
                connected       = ret._connected;
                p_remote_bdaddr = ret._p_remote_bdaddr;
            }
            else
            {
                connected = m_port.IsConnected(out p_remote_bdaddr);
            }
            return(connected);
        }