SLPAttrCallback
Declaration
typedef SLPBoolean SLPAttrCallback(
SLPHandle
hslp,
const char* attrlist,
SLPError errcode,
void* cookie )
Description
The SLPAttrCallback type is the type of the callback function
passed as a parameter to the SLPFindAttrs()
function. The behavior of the library is differs depending on whether
the attribute request was by Service URL or by service type.
If the SLPFindAttrs() function
was called with a Service URL, then the callback is called once regardless
of whether the handle was opened asynchronously or synchronously.
The attrlist parameter will contain a comma separated list of
attributes.
If the SLPFindAttrs() function
was called with a service type, then the callback called is until no more
results are available. The attrlist parameter will contain
a comma separated list of attributes. Returns will be collated to remove
duplicates if SLPFindAttrs() was
called synchronously. If it was called asynchronously the attrlist
may return duplicates.
Parameters
hslp |
The language specific SLPHandle that was passed into
the SLPFindAttrs() function. |
attrlist |
Pointer to a buffer containing a comma separated null terminated
list of attribute id/value assignments in SLP wire format "(attr-id=attr-value-list)". |
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 SLPFindAttrs()
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..
Since discovery of attributes by service-type is not supported, there is
really no reason to return anything but SLP_FALSE from the
SLPAttrCallback().
Status
OpenSLP 1.0.0 |
SLPAttrCallback function is implemented as specified
by RFC 2614 |
See Also
Syntax,
Callbacks