Logo Search packages:      
Sourcecode: libupnp4 version File versions  Download package

EXPORT_SPEC int UpnpSearchAsync ( UpnpClient_Handle  Hnd,
int  Mx,
const char *  TTarget_constarget_const,
const void *  Cookie_const 

Searches for devices matching the given search target.

The function returns immediately and the SDK calls the default callback function, registered during the UpnpRegisterClient call, for each matching root device, device, or service. The application specifies the search type by the Target parameter.

This function searches for the devices for the provided maximum time. It is an asynchronous function. It schedules a search job and returns. The client is notified about the search results after search timer.

Note that there is no way for the SDK to distinguish which client instance issued a particular search. Therefore, the client can get search callbacks that do not match the original criteria of the search. Also, the application will receive multiple callbacks for each search.

An integer representing one of the following:
  • UPNP_E_SUCCESS: The operation completed successfully.
  • UPNP_E_INVALID_HANDLE: The handle is not a valid control point handle.
Hnd  The handle of the client performing the search.
Mx  The time, in seconds, to wait for responses. If the time is greater than MAX_SEARCH_TIME then the time is set to MAX_SEARCH_TIME. If the time is less than MIN_SEARCH_TIME then the time is set to MIN_SEARCH_TIME.
TTarget_constarget_const  The search target as defined in the UPnP Device Architecture v1.0 specification.
Cookie_const  The user data to pass when the callback function is invoked.

Generated by  Doxygen 1.6.0   Back to index