⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 slpattrcallback.html

📁 SLP协议在linux下的实现。此版本为1.2.1版。官方网站为www.openslp.org
💻 HTML
字号:
<!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 functionpassed as a parameter to the <tt><a href="SLPFindAttrs.html">SLPFindAttrs()</a></tt>function.&nbsp; The behavior of the library is differs depending on whetherthe attribute request was by Service URL or by service type.<p>If the <tt><a href="SLPFindAttrs.html">SLPFindAttrs()</a></tt> functionwas called with a Service URL, then the callback is called once regardlessof whether the handle was opened asynchronously or synchronously.&nbsp;The <tt>attrlist</tt> parameter will contain a comma separated list ofattributes.<p>If the <tt><a href="SLPFindAttrs.html">SLPFindAttrs()</a></tt> functionwas called with a service type, then the callback called is until no moreresults are available.&nbsp; The <tt>attrlist</tt> parameter will containa comma separated list of attributes. Returns will be collated to removeduplicates if <tt><a href="SLPFindAttrs.html">SLPFindAttrs()</a></tt> wascalled 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 intothe <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 terminatedlist 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 calledwith 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 isreally no reason to return anything but <tt>SLP_FALSE</tt>&nbsp;from theSLPAttrCallback().<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 specifiedby RFC 2614</td></tr></table><h3>See Also</h3><a href="/Syntax.html">Syntax</a>,<a href="/Callbacks.html">Callbacks</a></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -