SLPSrvURLCallback Subroutine

Purpose

Returns the same callback type as the SLPFindSrvs() function.

Syntax

typedef SLPBoolean SLPSrvURLCallback(SLPHandle hSLP,
                                        const char* pcSrvURL,
                                        unsigned short sLifetime,
                                        SLPError errCode,
                                        void *pvCookie);

Description

The SLPSrvURLCallback type is the type of the callback function parameter to the SLPFindSrvs() function.

Parameters

Item Description
hSLP The SLPHandle used to initiate the operation.
pcSrvURL A character buffer containing the returned service URL.
sLifetime An unsigned short giving the lifetime of the service advertisement, in seconds. The value must be an unsigned integer less than or equal to SLP_LIFETIME_MAXIMUM.
errCode An error code indicating if an error occurred during the operation. The callback should check this error code before processing the parameters. If the error code is other than SLP_OK, then the API library can choose to terminate the outstanding operation.
pvCookie Memory passed down from the client code that called the original API function, starting the operation. Can be NULL.

Return Values

The client code should return SLP_TRUE if more data is desired; otherwise SLP_FALSE is returned.