Ejemplo n.º 1
0
            private void _LostAdvertisedName(IntPtr context, IntPtr name, ushort transport, IntPtr namePrefix)
            {
                String        _name       = Marshal.PtrToStringAnsi(name);
                TransportMask _transport  = (TransportMask)transport;
                String        _namePrefix = Marshal.PtrToStringAnsi(namePrefix);

                System.Threading.Thread callIt = new System.Threading.Thread((object o) =>
                {
                    LostAdvertisedName(_name, _transport, _namePrefix);
                });
                callIt.Start();
            }
Ejemplo n.º 2
0
 protected virtual void LostAdvertisedName(string name, TransportMask transport, string namePrefix)
 {
 }
Ejemplo n.º 3
0
 /**
  * Called by the bus when an advertisement previously reported through FoundName has become unavailable.
  *
  * @param name         A well known name that the remote bus is advertising that is of interest to this attachment.
  * @param transport    Transport that stopped receiving the given advertised name.
  * @param namePrefix   The well-known name prefix that was used in a call to FindAdvertisedName that triggered this callback.
  */
 protected virtual void LostAdvertisedName(string name, TransportMask transport, string namePrefix)
 {
 }
Ejemplo n.º 4
0
 /**
  * Construct a SessionOpts with specific parameters.
  *
  * @param trafficType       Type of traffic.
  * @param isMultipoint  true iff session supports multipoint (greater than two endpoints).
  * @param proximity     Proximity constraint bitmask.
  * @param transports    Allowed transport types bitmask.
  */
 public SessionOpts(TrafficType trafficType, bool isMultipoint, ProximityType proximity, TransportMask transports)
 {
     _sessionOpts = alljoyn_sessionopts_create((byte)trafficType, isMultipoint ? 1 : 0, (byte)proximity, (ushort)transports);
 }
Ejemplo n.º 5
0
 public QStatus CancelAdvertisedName(string name, TransportMask transports)
 {
     return alljoyn_busattachment_canceladvertisename(_busAttachment, name, (ushort)transports);
 }
Ejemplo n.º 6
0
 /**
  * Register interest in a well-known name prefix for the purpose of discovery over specified transports.
  * This method is a shortcut/helper that issues an org.alljoyn.Bus.FindAdvertisedNameByTransport
  * method call to the local daemon and interprets the response.
  *
  * @param[in]  namePrefix    Well-known name prefix that application is interested in receiving
  *                           BusListener.FoundAdvertisedName notifications about.
  * @param[in]  transports    Set of transports to use for discovery.
  *
  * @return
  *      - QStatus.OK iff daemon response was received and discovery was successfully started.
  *      - QStatus.BUS_NOT_CONNECTED if a connection has not been made with a local bus.
  *      - Other error status codes indicating a failure.
  */
 public QStatus FindAdvertisedNameByTransport(string namePrefix, TransportMask transports)
 {
     return alljoyn_busattachment_findadvertisednamebytransport(_busAttachment, namePrefix, (ushort)transports);
 }
Ejemplo n.º 7
0
 /**
  * Construct a SessionOpts with specific parameters.
  *
  * @param trafficType       Type of traffic.
  * @param isMultipoint  true iff session supports multipoint (greater than two endpoints).
  * @param proximity     Proximity constraint bitmask.
  * @param transports    Allowed transport types bitmask.
  */
 public SessionOpts(TrafficType trafficType, bool isMultipoint, ProximityType proximity, TransportMask transports)
 {
     _sessionOpts = alljoyn_sessionopts_create((byte)trafficType, isMultipoint ? 1 : 0, (byte)proximity, (ushort)transports);
 }
Ejemplo n.º 8
0
 public QStatus AdvertiseName(string name, TransportMask transports)
 {
     return(alljoyn_busattachment_advertisename(_busAttachment, name, (ushort)transports));
 }