public override monotooth.Connections.RFCommConnection CreateRFCommConnection(monotooth.BluetoothAddress from, monotooth.BluetoothAddress to)
 {
     LinuxRFCommConnection conn = new LinuxRFCommConnection();
     conn.from = from;
     conn.to = to;
     return conn;
 }
Ejemplo n.º 2
0
 /// <summary>Returns an address as string. </summary>
 /// <returns>A string from the address.</returns>
 public static string AddressAsString(monotooth.BluetoothAddress ba)
 {
     if(ba == null) throw new ArgumentException("ba","May not be null!");
     if(ba.Array.Length == 0) throw new ArgumentException("ba","May not be empty!");
     if(ba.Array.Length != 6) throw new ArgumentException("ba","Too short for address format!");
     string ret = "";
     foreach (byte b in ba.b)
     {
         if (b < 16)
         {
             ret+="0"+Convert.ToString(b,16)+":";
         } else {
             ret+=Convert.ToString(b,16)+":";
         }
     }
     ret = ret.Remove(ret.Length-1,1);
     ret = ret.ToUpper();
     return ret;
 }
Ejemplo n.º 3
0
 private static extern int ba2str(monotooth.BluetoothAddress ba, System.Text.StringBuilder bld);
Ejemplo n.º 4
0
 /// <summary>Removes a service from the pool. </summary>
 /// <param name="ser">A service to be removed from the pool. </param>
 public virtual void Remove(monotooth.Service.Service ser)
 {
     this.List.Remove(ser);
 }
Ejemplo n.º 5
0
 /// <summary>Add a service to this pool.</summary>
 /// <param name="ser">A service to be added to the pool. </param>
 public virtual void Add(monotooth.Service.Service ser)
 {
     this.List.Add(ser);
 }
Ejemplo n.º 6
0
 public WindowsRemoteDevice(monotooth.BluetoothAddress ba, String name)
 {
     this.address = ba;
     this.name = name;
 }
 public override monotooth.Connections.ServiceConnection CreateServiceConnection(monotooth.Connections.RFCommConnection conn)
 {
     return new LinuxServiceConnection(conn);
 }
Ejemplo n.º 8
0
 /// <summary>The default constructor.</summary>
 /// <param name="conn">The used connection that this stream will use. </param>
 public BluetoothStream(monotooth.Connections.RFCommConnection conn)
 {
     this.sock = conn;
 }
Ejemplo n.º 9
0
 public LinuxServiceConnection(monotooth.Connections.RFCommConnection conn)
 {
     this.usedconn = conn;
 }
Ejemplo n.º 10
0
 /// An abstract method to create service connections
 /// <returns>OS-specific service connection</returns>
 public abstract monotooth.Connections.ServiceConnection CreateServiceConnection(monotooth.Connections.RFCommConnection conn);
Ejemplo n.º 11
0
 /// An abstract method that is used to create RFCOMM connections
 public abstract monotooth.Connections.RFCommConnection CreateRFCommConnection(monotooth.BluetoothAddress from, monotooth.BluetoothAddress to);
Ejemplo n.º 12
0
 private static extern int rfcomm_listen(monotooth.BluetoothAddress from, int channel, int backlog);
Ejemplo n.º 13
0
 private static extern int rfcomm_connect(monotooth.BluetoothAddress from, monotooth.BluetoothAddress to, int channel);
Ejemplo n.º 14
0
 private static extern void baswap(monotooth.BluetoothAddress ba, monotooth.BluetoothAddress ba2);
Ejemplo n.º 15
0
 private static extern IntPtr search_services_from_with_uuid(monotooth.BluetoothAddress ba, uint uuid);
Ejemplo n.º 16
0
 private static extern int hci_read_remote_name(int dd, monotooth.BluetoothAddress ba, int len, System.Text.StringBuilder b, int timeout);
Ejemplo n.º 17
0
 public LinuxRemoteDevice(monotooth.BluetoothAddress ba, string name)
 {
     this.address = ba;
     this.name = name;
 }
 public override monotooth.Connections.RFCommConnection CreateRFCommConnection(monotooth.BluetoothAddress from, monotooth.BluetoothAddress to)
 {
     return new WindowsRFCommConnection();
 }
Ejemplo n.º 19
0
 private static extern int l2cap_connect(monotooth.BluetoothAddress to, ushort psm);