Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4442dd9bdde98a1d9ca2177557e87d7d > files > 487

libqxt-devel-0.6.1-3.fc15.i686.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /builddir/build/BUILD/libqxt/src/zeroconf/qxtdiscoverableservice.cpp -->
<head>
  <title>QxtDiscoverableService Class Reference</title>
  <link href="stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://libqxt.org"><img src="images/qxt-logo.png" width="50" height="40" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">Classes</font></a>&nbsp;&middot; <a href="namespaces.html"><font color="#004faf">Namespaces</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QxtDiscoverableService Class Reference<br /><span class="small-subtitle">[<a href="qxtzeroconf.html">QxtZeroconf</a> module]</span>
</h1>
<p>The QxtDiscoverableService class registers a service that can be discovered with Zeroconf, or resolve such a service <a href="#details">More...</a></p>
<pre>    #include &lt;QxtDiscoverableService&gt;</pre><p>Inherits <a href="http://doc.qtsoftware.com/4.5/qobject.html">QObject</a>.</p>
<ul>
<li><a href="qxtdiscoverableservice-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h3>Public Types</h3>
<ul>
<li><div class="fn"></div>enum <b><a href="qxtdiscoverableservice.html#ErrorCode-enum">ErrorCode</a></b> { NoError }</li>
<li><div class="fn"></div>enum <b><a href="qxtdiscoverableservice.html#ServiceFlag-enum">ServiceFlag</a></b> { MoreComing, Add, Remove, AddDefault, ..., ShareConnection }</li>
<li><div class="fn"></div>flags <b><a href="qxtdiscoverableservice.html#ServiceFlag-enum">ServiceFlags</a></b></li>
<li><div class="fn"></div>enum <b><a href="qxtdiscoverableservice.html#State-enum">State</a></b> { Unknown, Registering, Registered, Found, Resolving, Resolved }</li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"></div><b><a href="qxtdiscoverableservice.html#QxtDiscoverableService">QxtDiscoverableService</a></b> ( const QString &amp; <i>serviceType</i>, QObject * <i>parent</i> = 0 )</li>
<li><div class="fn"></div><b><a href="qxtdiscoverableservice.html#QxtDiscoverableService-3">QxtDiscoverableService</a></b> ( const QString &amp; <i>serviceType</i>, const QString &amp; <i>serviceName</i>, QObject * <i>parent</i> = 0 )</li>
<li><div class="fn"></div>virtual <b><a href="qxtdiscoverableservice.html#dtor.QxtDiscoverableService">~QxtDiscoverableService</a></b> ()</li>
<li><div class="fn"></div>void <b><a href="qxtdiscoverableservice.html#addServiceSubType">addServiceSubType</a></b> ( const QString &amp; <i>subtype</i> )</li>
<li><div class="fn"></div>bool <b><a href="qxtdiscoverableservice.html#hasServiceSubType">hasServiceSubType</a></b> ( const QString &amp; <i>subtype</i> )</li>
<li><div class="fn"></div>quint16 <b><a href="qxtdiscoverableservice.html#port">port</a></b> () const</li>
<li><div class="fn"></div>void <b><a href="qxtdiscoverableservice.html#registerService">registerService</a></b> ( bool <i>noAutoRename</i> = false )</li>
<li><div class="fn"></div>void <b><a href="qxtdiscoverableservice.html#releaseService">releaseService</a></b> ()</li>
<li><div class="fn"></div>void <b><a href="qxtdiscoverableservice.html#removeServiceSubType">removeServiceSubType</a></b> ( const QString &amp; <i>subtype</i> )</li>
<li><div class="fn"></div>void <b><a href="qxtdiscoverableservice.html#resolve">resolve</a></b> ( bool <i>forceMulticast</i> = false )</li>
<li><div class="fn"></div>QStringList <b><a href="qxtdiscoverableservice.html#serviceSubTypes">serviceSubTypes</a></b> () const</li>
<li><div class="fn"></div>void <b><a href="qxtdiscoverableservice.html#setPort">setPort</a></b> ( quint16 <i>port</i> )</li>
<li><div class="fn"></div>void <b><a href="qxtdiscoverableservice.html#setServiceSubTypes">setServiceSubTypes</a></b> ( const QStringList &amp; <i>subtypes</i> )</li>
<li><div class="fn"></div>State <b><a href="qxtdiscoverableservice.html#state">state</a></b> () const</li>
</ul>
<ul>
<li><div class="fn"></div>29 public functions inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#public-functions">QObject</a></li>
</ul>
<a name="signals"></a>
<h3>Signals</h3>
<ul>
<li><div class="fn"></div>void <b><a href="qxtdiscoverableservice.html#registered">registered</a></b> ()</li>
<li><div class="fn"></div>void <b><a href="qxtdiscoverableservice.html#registrationError">registrationError</a></b> ( int <i>code</i> )</li>
<li><div class="fn"></div>void <b><a href="qxtdiscoverableservice.html#resolveError">resolveError</a></b> ( int <i>code</i> )</li>
<li><div class="fn"></div>void <b><a href="qxtdiscoverableservice.html#resolved">resolved</a></b> ( const QByteArray &amp; <i>domainName</i> )</li>
</ul>
<ul>
<li><div class="fn"></div>1 signal inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#signals">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>1 property inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#properties">QObject</a></li>
<li><div class="fn"></div>1 public slot inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#public-slots">QObject</a></li>
<li><div class="fn"></div>1 public type inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#public-variables">QObject</a></li>
<li><div class="fn"></div>4 static public members inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"></div>7 protected functions inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#protected-functions">QObject</a></li>
<li><div class="fn"></div>2 protected variables inherited from <a href="http://doc.qtsoftware.com/4.5/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QxtDiscoverableService class registers a service that can be discovered with Zeroconf, or resolve such a service</p>
<p>QxtDiscoverableService represents a service on the local network that can be discovered using Zeroconf. It can function to provide such a service so that other systems on the network can find it, or it can resolve the connection parameters for a service provided by another system on the network. Note that resolving a service requires that you already know the service name in addition to the service type for the remote service; to find all services on the network that offer a given service type, use <a href="qxtservicebrowser.html">QxtServiceBrowser</a>.</p>
<p>When registering a service, you may specify a set of service subtypes to indicate what kind of optional capabilities your service offers. Other applications browsing for discoverable services (for instance, using <a href="qxtservicebrowser.html">QxtServiceBrowser</a>) can limit their search to only those services that provide a given subtype. Use the properties inherited from QxtDiscoverableServiceName to configure the other service parameters.</p>
<p>For more information about Zeroconf, see the documentation available on www.zeroconf.org.</p>
<p>See also QxtDiscoverableServiceName and <a href="qxtservicebrowser.html">QxtServiceBrowser</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<h3 class="fn"><a name="ErrorCode-enum"></a>enum QxtDiscoverableService::ErrorCode</h3>
<h3 class="flags"><a name="ServiceFlag-enum"></a>enum QxtDiscoverableService::ServiceFlag<br />flags QxtDiscoverableService::ServiceFlags</h3>
<p>The ServiceFlags type is a typedef for <a href="qflags.html">QFlags</a>&lt;ServiceFlag&gt;. It stores an OR combination of ServiceFlag values.</p>
<h3 class="fn"><a name="State-enum"></a>enum QxtDiscoverableService::State</h3>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QxtDiscoverableService"></a>QxtDiscoverableService::QxtDiscoverableService ( const <a href="http://doc.qtsoftware.com/4.5/qstring.html">QString</a> &amp; <i>serviceType</i>, <a href="http://doc.qtsoftware.com/4.5/qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qxtdiscoverableservice.html">QxtDiscoverableService</a> object using the specified service type.</p>
<p>The service type may be a plain type name or it may be provided in the standard format specified by the Zeroconf specification.</p>
<p>The service name will be automatically generated based on the system's hostname.</p>
<h3 class="fn"><a name="QxtDiscoverableService-3"></a>QxtDiscoverableService::QxtDiscoverableService ( const <a href="http://doc.qtsoftware.com/4.5/qstring.html">QString</a> &amp; <i>serviceType</i>, const <a href="http://doc.qtsoftware.com/4.5/qstring.html">QString</a> &amp; <i>serviceName</i>, <a href="http://doc.qtsoftware.com/4.5/qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qxtdiscoverableservice.html">QxtDiscoverableService</a> object using the specified service type.</p>
<p>The service type may be a plain type name or it may be provided in the standard format specified by the Zeroconf specification.</p>
<p>If the specified service name is already in use, it will be updated with a number to make it unique.</p>
<h3 class="fn"><a name="dtor.QxtDiscoverableService"></a>QxtDiscoverableService::~QxtDiscoverableService ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Destroys the <a href="qxtdiscoverableservice.html">QxtDiscoverableService</a>.</p>
<p>TIf registered, the service will be unregistered.</p>
<h3 class="fn"><a name="addServiceSubType"></a>void QxtDiscoverableService::addServiceSubType ( const <a href="http://doc.qtsoftware.com/4.5/qstring.html">QString</a> &amp; <i>subtype</i> )</h3>
<p>Adds a subtype to the service.</p>
<p>See also serviceSubTypes, setServiceSubTypes, removeServiceSubType, and hasServiceSubType.</p>
<h3 class="fn"><a name="hasServiceSubType"></a>bool QxtDiscoverableService::hasServiceSubType ( const <a href="http://doc.qtsoftware.com/4.5/qstring.html">QString</a> &amp; <i>subtype</i> )</h3>
<p>Tests to see if the specified service is available and known for the service.</p>
<p>When discovering a service, only subtypes that were included in the service discovery request will be available.</p>
<p>See also serviceSubTypes, setServiceSubTypes, addServiceSubType, and removeServiceSubType.</p>
<h3 class="fn"><a name="port"></a><a href="http://doc.qtsoftware.com/4.5/qtglobal.html#quint16-typedef">quint16</a> QxtDiscoverableService::port () const</h3>
<p>Returns the port number used for connecting to the service.</p>
<p>See also setPort.</p>
<h3 class="fn"><a name="registerService"></a>void QxtDiscoverableService::registerService ( bool <i>noAutoRename</i> = false )</h3>
<p>Attempts to register the service on the local network.</p>
<p>If noAutoRename is set to true, registration will fail if another service of the same service type is already registered with the same service name. Otherwise, the service name will be updated with a number to make it unique.</p>
<p>See also registered and registrationError.</p>
<h3 class="fn"><a name="registered"></a>void QxtDiscoverableService::registered ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
<h3 class="fn"><a name="registrationError"></a>void QxtDiscoverableService::registrationError ( int <i>code</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<h3 class="fn"><a name="releaseService"></a>void QxtDiscoverableService::releaseService ()</h3>
<p>Releases the service.</p>
<p>If the service is registered, it will be unregistered. Any outstanding resolve attempt will be aborted.</p>
<h3 class="fn"><a name="removeServiceSubType"></a>void QxtDiscoverableService::removeServiceSubType ( const <a href="http://doc.qtsoftware.com/4.5/qstring.html">QString</a> &amp; <i>subtype</i> )</h3>
<p>Removes a subtype from the service.</p>
<p>See also serviceSubTypes, setServiceSubTypes, addServiceSubType, and hasServiceSubType.</p>
<h3 class="fn"><a name="resolve"></a>void QxtDiscoverableService::resolve ( bool <i>forceMulticast</i> = false )</h3>
<p>Attempts to resolve the service in order to determine the host and port necessary to establish a connection.</p>
<p>If forceMulticast is set to true, <a href="qxtdiscoverableservice.html">QxtDiscoverableService</a> will use a multicast request to resolve the service, even if the host name appears to be a unicast address (that is, outside the local network).</p>
<p>See also resolved and resolveError.</p>
<h3 class="fn"><a name="resolveError"></a>void QxtDiscoverableService::resolveError ( int <i>code</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<h3 class="fn"><a name="resolved"></a>void QxtDiscoverableService::resolved ( const <a href="http://doc.qtsoftware.com/4.5/qbytearray.html">QByteArray</a> &amp; <i>domainName</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<h3 class="fn"><a name="serviceSubTypes"></a><a href="http://doc.qtsoftware.com/4.5/qstringlist.html">QStringList</a> QxtDiscoverableService::serviceSubTypes () const</h3>
<p>Returns a list of all subtypes known for the service.</p>
<p>When discovering a service, only subtypes that were included in the service discovery request will be included in this list.</p>
<p>See also setServiceSubTypes, addServiceSubType, removeServiceSubType, and hasServiceSubType.</p>
<h3 class="fn"><a name="setPort"></a>void QxtDiscoverableService::setPort ( <a href="http://doc.qtsoftware.com/4.5/qtglobal.html#quint16-typedef">quint16</a> <i>port</i> )</h3>
<p>Sets the port number used for connecting to the service.</p>
<p>When registering a service with a port number of 0 (the default), the service will not be found when browsing, but the service name will be marked as reserved.</p>
<p>Setting the port is only meaningful when registering a service.</p>
<p>See also port.</p>
<h3 class="fn"><a name="setServiceSubTypes"></a>void QxtDiscoverableService::setServiceSubTypes ( const <a href="http://doc.qtsoftware.com/4.5/qstringlist.html">QStringList</a> &amp; <i>subtypes</i> )</h3>
<p>Sets the list of subtypes for this service.</p>
<p>See also serviceSubTypes, addServiceSubType, removeServiceSubType, and hasServiceSubType.</p>
<h3 class="fn"><a name="state"></a><a href="qxtdiscoverableservice.html#State-enum">State</a> QxtDiscoverableService::state () const</h3>
<p>Returns the current state of the service.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td align="left">Copyright &copy; 2007-2010
<a href="mailto:foundation@libqxt.org">Qxt Foundation</a></td>
<td align="right"><div align="right">
<a href="http://libqxt.org">Qxt</a> 0.6.1</div></td>
</tr></table></div></address></body>
</html>