/**
  *
  */
 public async Task RegisterHubDiscoveryCallback(YAPI.HubDiscoveryHandler hubDiscoveryCallback)
 {
     _HubDiscoveryCallback = hubDiscoveryCallback;
     try {
         await TriggerHubDiscovery();
     } catch (YAPI_Exception) { }
 }
Ejemplo n.º 2
0
 /**
  * <summary>
  *   Register a callback function, to be called each time an Network Hub send
  *   an SSDP message.
  * <para>
  *   The callback has two string parameter, the first one
  *   contain the serial number of the hub and the second contain the URL of the
  *   network hub (this URL can be passed to RegisterHub). This callback will be invoked
  *   while yUpdateDeviceList is running. You will have to call this function on a regular basis.
  * </para>
  * <para>
  * </para>
  * </summary>
  * <param name="hubDiscoveryCallback">
  *   a procedure taking two string parameter, the serial
  *   number and the hub URL. Use <c>null</c> to unregister a previously registered  callback.
  * </param>
  */
 public static async Task RegisterHubDiscoveryCallback(YAPI.HubDiscoveryHandler hubDiscoveryCallback)
 {
     await imm_GetYCtx().RegisterHubDiscoveryCallback(hubDiscoveryCallback);
 }