public static IL2CapClient Create() { WidcommBluetoothFactoryBase wf = WidcommBluetoothFactory.GetWidcommIfExists(); var cli = new WidcommL2CapClient(wf); return(cli); }
public static CommonBluetoothListener Create() { WidcommBluetoothFactoryBase wf = WidcommBluetoothFactory.GetWidcommIfExists(); var lsnr = new WidcommL2CapListener(wf); return(lsnr); }
private static WidcommSerialPort CreateClient2(BluetoothAddress device) { var fcty = WidcommBluetoothFactory.GetWidcommIfExists(); var sppCli = new WidcommSppClient(fcty); sppCli.CreatePort(device); return(sppCli); }
internal WidcommBtIf(WidcommBluetoothFactory fcty) { if (s_alreadyExists) { throw new InvalidOperationException("May only be one instance of WidcommBtIf."); } s_alreadyExists = true; _factory = fcty; }
public WidcommPlaying() { var f2 = BluetoothFactory.GetTheFactoryOfTypeOrDefault <WidcommBluetoothFactory>(); // TODO (Remove this manual way after some time) foreach (BluetoothFactory f in BluetoothFactory.Factories) { WidcommBluetoothFactory wf = f as WidcommBluetoothFactory; if (wf != null) { m_factory = wf; break; } } Trace.Assert(f2 == m_factory); Trace.Assert(object.ReferenceEquals(f2, m_factory)); if (m_factory == null) { throw new InvalidOperationException("Widcomm stack not present."); } }
internal WidcommPlaying(WidcommBluetoothFactory factory) { m_factory = factory; }