/// <summary>
 /// Used by WidcommBluetoothListener to return the newly accepted connection.
 /// </summary>
 /// -
 /// <param name="strm">The WidcommRfcommStream containing the newly connected
 /// RfCommPort.
 /// </param>
 /// <param name="factory">Factory to use in GetRemoteMachineName etc.
 /// </param>
 internal WidcommBluetoothClient(WidcommRfcommStreamBase strm, WidcommBluetoothFactoryBase factory)
     : base(factory, strm)
 {
     Debug.Assert(factory != null, "factory must not be null; is used by GetRemoteMachineName etc.");
     m_factory = factory;
     //m_conn = strm;
 }
Exemple #2
0
 //----
 public void SetParentStream(WidcommRfcommStreamBase parent)
 {
     if (m_parent != null)
     {
         throw new InvalidOperationException("Can only have one parent.");
     }
     m_parent = parent;
 }
 // This pair of constructors are required to allow us to keep a
 // reference to the conn (WidcommRfcommStream).
 internal WidcommBluetoothClient(WidcommBluetoothFactoryBase factory, WidcommRfcommStreamBase conn)
     : base(factory, conn)
 {
     Debug.Assert(factory != null, "factory must not be null; is used by GetRemoteMachineName etc.");
     m_factory = factory;
     m_connRef = conn;
     //TEST_EARLY: m_btIf___HACK = m_btIf;
 }
Exemple #4
0
        internal void RemovePort(WidcommRfcommStreamBase port)
        {
            bool found;

            lock (_livePorts) {
                found = _livePorts.Remove(port);
            }
            Debug.WriteLine(WidcommUtils.GetTime4Log()
                            + ": RemovePort found it: " + found);
        }
Exemple #5
0
 internal void AddPort(WidcommRfcommStreamBase port)
 {
     lock (_livePorts) {
         _livePorts.Add(port);
     }
 }
Exemple #6
0
 //--------
 public void SetParentStream(InTheHand.Net.Bluetooth.Widcomm.WidcommRfcommStreamBase parent)
 {
     this.parent = parent;
 }