OpenSLP Programmers Guide - SLPSrvURLCallback

About
what is openslp

Download
how to get openslp

Contribute
how to help out

Documentation
how to find out more

Credits
who to blame

## SLPSrvURLCallback
OpenSLP Programmer's Guide » Service Location Functions » SLPSrvURLCallback

### Declaration

    #include <slp.h>

    typedef SLPBoolean SLPSrvURLCallback(
        SLPHandle      hslp,
        const char*    srvurl,
        unsigned short lifetime,
        SLPError       errcode,
        void*          cookie);

### Description

The `SLPSrvURLCallback` type is the type of the callback function parameter to `SLPFindSrvs()` function. If the `hslp` handle parameter was opened asynchronously, the results returned through the callback MAY be uncollated.

### Parameters

`hslp` | The language specific `SLPHandle` on which to register the service.
`srvurl` | Pointer to the SLP Service URL of the requested service. See Syntax for more information about SLP Service URLs
`lifetime` | The lifetime of the service in seconds
`errcode` | An error code indicating if an error occurred during the operation. The callback should check this error code before processing the parameters.
`cookie` | The same cookie that was passed as a parameter to the `SLPFindSrvs()` call

### Returns

The callback should return `SLP_TRUE` if more data is desired. The callback may continue to return `SLP_TRUE` until it is called with an errcode of `SLP_LAST_CALL`. If no more data is requested the callback should return `SLP_FALSE`.

### Status

OpenSLP 0.6.0 | SLPSrvURLCallback functions are called as specified by RFC 2614

### See Also

Syntax, Callbacks, SLPFindSrvs()

Prepared by: Caldera Systems Inc
Maintained by: openslp.org