Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > main-release > by-pkgid > d170b16ca1d16cd0efb2b0045d30d6af > files > 19

openslp-1.2.1-10mdv2010.1.x86_64.rpm

<!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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
const char* attrlist,</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

 <a href="SLPTypes.html#SLPError">SLPError</a> <a href="#errcode">errcode</a>,</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
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.&nbsp; 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.&nbsp;
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.&nbsp; 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.&nbsp; 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)".&nbsp;</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.&nbsp;
The callback should check this error code before processing the parameters.&nbsp;</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>&nbsp;</caption>
</table>

<h3>
Returns</h3>
The callback should return <tt>SLP_TRUE</tt> if more data is desired.&nbsp;
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>.&nbsp;
If no more data is requested the callback should return <tt>SLP_FALSE</tt>..&nbsp;
Since discovery of attributes by service-type is not supported, there is
really no reason to return anything but <tt>SLP_FALSE</tt>&nbsp;from the
SLPAttrCallback().
<br>&nbsp;
<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>