internal static IBluetoothClient CreateFromListener(AndroidBthFactoryBase fcty, BluetoothSocket sock) { var cli = new AndroidBthClient(fcty); cli.SetupConnection(sock); return(cli); }
internal static AndroidBthDeviceInfo CreateFromBondedList(AndroidBthFactoryBase fcty, BluetoothDevice dev) { var bdi = new AndroidBthDeviceInfo(fcty, dev); bdi._rmbd = bdi._authd = true; return(bdi); }
internal AndroidBthInquiry(AndroidBthFactoryBase fcty) { _fcty = fcty; //_acty = new Activity(); var context = GetContext(); StartReceiver(context); }
internal static AndroidBthDeviceInfo CreateFromInquiry( AndroidBthFactoryBase fcty, BluetoothDevice dev, BluetoothClass cod, string nameOpt, short rssiOpt) { var bdi = new AndroidBthDeviceInfo(fcty, dev); bdi._discoTime = DateTime.UtcNow; bdi._cod = AndroidBthUtils.ConvertCoDs(cod); bdi._rssiAtDisco = rssiOpt; Debug.Assert(bdi._dev.Name == nameOpt); return(bdi); }
internal static AndroidBthDeviceInfo CreateFromGivenAddress( AndroidBthFactoryBase fcty, BluetoothAddress address, bool queryOrInternalOnly) { BluetoothAdapter a = fcty.GetAdapter(); var dev = a.GetRemoteDevice(AndroidBthUtils.FromBluetoothAddress(address)); var bdi = new AndroidBthDeviceInfo(fcty, dev); // if (queryOrInternalOnly) { bdi._rmbd = bdi._authd = (dev.BondState == Bond.Bonded); var cod = dev.BluetoothClass; if (cod != null) { bdi._cod = AndroidBthUtils.ConvertCoDs(cod); } } return(bdi); }
// Use factory methods!! private AndroidBthDeviceInfo(AndroidBthFactoryBase fcty, BluetoothDevice dev) { _fcty = fcty; _dev = dev; _addr = BluetoothAddress.Parse(dev.Address); }
internal AndroidBthListener(AndroidBthFactoryBase fcty) { _fcty = fcty; }
internal AndroidBthClient(AndroidBthFactoryBase fcty) { _fcty = fcty; }