You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
4.3 KiB
107 lines
4.3 KiB
4 years ago
|
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||
|
<meta name="GENERATOR" content="Mozilla/4.77C-CCK-MCD Caldera Systems OpenLinux [en] (X11; U; Linux 2.4.2 i686) [Netscape]">
|
||
|
<title>OpenSLP Programmers Guide - SLPAttrCallback</title>
|
||
|
</head>
|
||
|
<body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E" alink="#FF0000">
|
||
|
|
||
|
<h2>
|
||
|
SLPAttrCallback</h2>
|
||
|
|
||
|
<hr WIDTH="100%">
|
||
|
<h3>
|
||
|
Declaration</h3>
|
||
|
<tt>typedef <a href="SLPTypes.html#SLPBoolean">SLPBoolean</a> SLPAttrCallback(
|
||
|
<a href="SLPTypes.html#SLPHandle">SLPHandle</a>
|
||
|
<a href="#hslp">hslp</a>,</tt>
|
||
|
<br><tt>
|
||
|
const char* attrlist,</tt>
|
||
|
<br><tt>
|
||
|
|
||
|
<a href="SLPTypes.html#SLPError">SLPError</a> <a href="#errcode">errcode</a>,</tt>
|
||
|
<br><tt>
|
||
|
void* <a href="#cookie">cookie</a> )</tt>
|
||
|
<h3>
|
||
|
Description</h3>
|
||
|
The <tt>SLPAttrCallback</tt> type is the type of the callback function
|
||
|
passed as a parameter to the <tt><a href="SLPFindAttrs.html">SLPFindAttrs()</a></tt>
|
||
|
function. The behavior of the library is differs depending on whether
|
||
|
the attribute request was by Service URL or by service type.
|
||
|
<p>If the <tt><a href="SLPFindAttrs.html">SLPFindAttrs()</a></tt> function
|
||
|
was called with a Service URL, then the callback is called once regardless
|
||
|
of whether the handle was opened asynchronously or synchronously.
|
||
|
The <tt>attrlist</tt> parameter will contain a comma separated list of
|
||
|
attributes.
|
||
|
<p>If the <tt><a href="SLPFindAttrs.html">SLPFindAttrs()</a></tt> function
|
||
|
was called with a service type, then the callback called is until no more
|
||
|
results are available. The <tt>attrlist</tt> parameter will contain
|
||
|
a comma separated list of attributes. Returns will be collated to remove
|
||
|
duplicates if <tt><a href="SLPFindAttrs.html">SLPFindAttrs()</a></tt> was
|
||
|
called synchronously. If it was called asynchronously the <tt>attrlist</tt>
|
||
|
may return duplicates.
|
||
|
<h3>
|
||
|
Parameters</h3>
|
||
|
|
||
|
<table BORDER CELLPADDING=5 NOSAVE >
|
||
|
<tr VALIGN=TOP NOSAVE>
|
||
|
<td NOSAVE><a NAME="hslp"></a><tt>hslp</tt></td>
|
||
|
|
||
|
<td NOSAVE>The language specific <tt>SLPHandle</tt> that was passed into
|
||
|
the <tt>SLPFindAttrs()</tt> function.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr VALIGN=TOP NOSAVE>
|
||
|
<td><a NAME="attrlist"></a><tt>attrlist</tt></td>
|
||
|
|
||
|
<td NOSAVE>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)". </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr VALIGN=TOP NOSAVE>
|
||
|
<td><a NAME="errcode"></a><tt>errcode</tt></td>
|
||
|
|
||
|
<td NOSAVE>An error code indicating if an error occurred during the operation.
|
||
|
The callback should check this error code before processing the parameters. </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr VALIGN=TOP NOSAVE>
|
||
|
<td NOSAVE><a NAME="cookie"></a><tt>cookie</tt></td>
|
||
|
|
||
|
<td NOSAVE>The same cookie that was passed as a parameter to the <tt>SLPFindAttrs()</tt>
|
||
|
call</td>
|
||
|
</tr>
|
||
|
|
||
|
<caption ALIGN=BOTTOM> </caption>
|
||
|
</table>
|
||
|
|
||
|
<h3>
|
||
|
Returns</h3>
|
||
|
The callback should return <tt>SLP_TRUE</tt> if more data is desired.
|
||
|
The callback may continue to return <tt>SLP_TRUE</tt> until it is called
|
||
|
with an <tt>errcode</tt> of <tt><a href="SLPError.html#SLP_LAST_CALL">SLP_LAST_CALL</a></tt>.
|
||
|
If no more data is requested the callback should return <tt>SLP_FALSE</tt>..
|
||
|
Since discovery of attributes by service-type is not supported, there is
|
||
|
really no reason to return anything but <tt>SLP_FALSE</tt> from the
|
||
|
SLPAttrCallback().
|
||
|
<br>
|
||
|
<h3>
|
||
|
Status</h3>
|
||
|
|
||
|
<table CELLPADDING=5 NOSAVE >
|
||
|
<tr VALIGN=TOP NOSAVE>
|
||
|
<td NOSAVE>OpenSLP 1.0.0</td>
|
||
|
|
||
|
<td NOSAVE><tt>SLPAttrCallback</tt> function is implemented as specified
|
||
|
by RFC 2614</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<h3>
|
||
|
See Also</h3>
|
||
|
<a href="/Syntax.html">Syntax</a>,
|
||
|
<a href="/Callbacks.html">Callbacks</a>
|
||
|
</body>
|
||
|
</html>
|