<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>DNSSD.RemoteService</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <link rel="stylesheet" type="text/css" href="../common/doxygen.css" /> <link rel="stylesheet" media="screen" type="text/css" title="KDE Colors" href="../common/kde.css" /> </head> <body> <div id="container"> <div id="header"> <div id="header_top"> <div> <div> <img alt ="" src="../common/top-kde.jpg"/> KDE 4.4 PyKDE API Reference </div> </div> </div> <div id="header_bottom"> <div id="location"> <ul> <li>KDE's Python API</li> </ul> </div> <div id="menu"> <ul> <li><a href="../modules.html">Overview</a></li> <li><a href="http://techbase.kde.org/Development/Languages/Python">PyKDE Home</a></li> <li><a href="http://kde.org/family/">Sitemap</a></li> <li><a href="http://kde.org/contact/">Contact Us</a></li> </ul> </div> </div> </div> <div id="body_wrapper"> <div id="body"> <div id="right"> <div class="content"> <div id="main"> <div class="clearer"> </div> <h1>RemoteService Class Reference</h1> <code>from PyKDE4.dnssd import *</code> <p> Inherits: <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a>,<br /> Namespace: DNSSD.RemoteService<br /> <h2>Detailed Description</h2> <p>RemoteService remoteservice.h DNSSD/RemoteService Describes a service published over DNS-SD, typically on a remote machine </p> <p> This class allows delayed or asynchronous resolution of services. As the name suggests, the service is normally on a remote machine, but the service could just as easily be published on the local machine. </p> <p> RemoteService instances are normally provided by ServiceBrowser, but can be used to resolve any service if you know the name, type and domain for it. </p> <p> <dl class="author" compact><dt><b>Author:</b></dt><dd> Jakub Stachowski </dd></dl> </p> <p> <dl class="see" compact><dt><b>See also:</b></dt><dd> ServiceBrowser </dd></dl> </p> <table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><br><h2>Signals</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#resolved">resolved</a> (, bool successful)</td></tr> <tr><td colspan="2"><br><h2>Methods</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#RemoteService">__init__</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> name, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> type, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> domain)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#isResolved">isResolved</a> (self)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#resolve">resolve</a> (self)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#resolveAsync">resolveAsync</a> (self)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#resolved">resolved</a> (self, bool successful)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#virtual_hook">virtual_hook</a> (self, int id, void data)</td></tr> </table> <hr><h2>Method Documentation</h2><a class="anchor" name="RemoteService"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname">__init__</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> </td> <td class="paramname"><em>name</em>, </td> </tr> <tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> </td> <td class="paramname"><em>type</em>, </td> </tr> <tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> </td> <td class="paramname"><em>domain</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Creates an unresolved RemoteService representing the service with the given name, type and domain </p> <p> </p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign="top"><em>name</em> </td><td> the name of the service <tr><td></td><td valign="top"><em>type</em> </td><td> the type of the service (see ServiceBrowser.ServiceBrowser()) <tr><td></td><td valign="top"><em>domain</em> </td><td> the domain of the service </td></tr> </table></dl> <p> <dl class="see" compact><dt><b>See also:</b></dt><dd> ServiceBrowser.isAvailable() </dd></dl> </p></div></div><a class="anchor" name="isResolved"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname">bool isResolved</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>self</em> )</td> <td width="100%"> </td> </tr> </table> </div> <div class="memdoc"><p>Whether the service has been successfully resolved </p> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> true if hostName() and port() will return valid values, false otherwise </dd></dl> </p></div></div><a class="anchor" name="resolve"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname">bool resolve</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>self</em> )</td> <td width="100%"> </td> </tr> </table> </div> <div class="memdoc"><p>Resolves the host name and port of service synchronously </p> <p> The host name is not resolved into an IP address - use KResolver for that. </p> <p> resolved(bool) is emitted before this function is returned. </p> <p> resolve() will not cause RemoteService to monitor for changes in the hostname or port of the service. </p> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> true if successful, false on failure </dd></dl> </p> <p> <dl class="see" compact><dt><b>See also:</b></dt><dd> resolveAsync(), hostName(), port() </dd></dl> </p></div></div><a class="anchor" name="resolveAsync"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> resolveAsync</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>self</em> )</td> <td width="100%"> </td> </tr> </table> </div> <div class="memdoc"><p>Resolves the host name and port of service asynchronously </p> <p> The host name is not resolved into an IP address - use KResolver for that. </p> <p> The resolved(bool) signal will be emitted when the resolution is complete, or when it fails. </p> <p> Note that resolved(bool) may be emitted before this function returns in case of immediate failure. </p> <p> RemoteService will keep monitoring the service for changes in hostname and port, and re-emit resolved(bool) when either changes. </p> <p> <dl class="see" compact><dt><b>See also:</b></dt><dd> resolve(), hostName(), port() </dd></dl> </p></div></div><a class="anchor" name="resolved"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> resolved</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"><em>successful</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Emitted when resolving is complete </p> <p> If operating in asynchronous mode this signal can be emitted several times (when the hostName or port of the service changes). </p> <p> </p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign="top"><em>successful</em> </td><td> true if the hostName and port were successfully resolved, false otherwise </td></tr> </table></dl> <p> </p><dl compact><dt><b>Signal syntax:</b></dt><dd><code>QObject.connect(source, SIGNAL("resolved(bool)"), target_slot)</code></dd></dl></div></div><a class="anchor" name="virtual_hook"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> virtual_hook</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>id</em>, </td> </tr> <tr> <td class="memname"></td> <td></td> <td class="paramtype">void </td> <td class="paramname"><em>data</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"></div></div> </div> </div> </div> <div id="left"> <div class="menu_box"> <div class="nav_list"> <ul> <li><a href="../allclasses.html">Full Index</a></li> </ul> </div> <a name="cp-menu" /><div class="menutitle"><div> <h2 id="cp-menu-project">Modules</h2> </div></div> <div class="nav_list"> <ul><li><a href="../akonadi/index.html">akonadi</a></li> <li><a href="../dnssd/index.html">dnssd</a></li> <li><a href="../kdecore/index.html">kdecore</a></li> <li><a href="../kdeui/index.html">kdeui</a></li> <li><a href="../khtml/index.html">khtml</a></li> <li><a href="../kio/index.html">kio</a></li> <li><a href="../knewstuff/index.html">knewstuff</a></li> <li><a href="../kparts/index.html">kparts</a></li> <li><a href="../kutils/index.html">kutils</a></li> <li><a href="../nepomuk/index.html">nepomuk</a></li> <li><a href="../phonon/index.html">phonon</a></li> <li><a href="../plasma/index.html">plasma</a></li> <li><a href="../polkitqt/index.html">polkitqt</a></li> <li><a href="../solid/index.html">solid</a></li> <li><a href="../soprano/index.html">soprano</a></li> </ul></div></div> </div> </div> <div class="clearer"/> </div> <div id="end_body"></div> </div> <div id="footer"><div id="footer_text"> This documentation is maintained by <a href="mailto:simon@simonzone.com">Simon Edwards</a>.<br /> KDE<sup>®</sup> and <a href="../images/kde_gear_black.png">the K Desktop Environment<sup>®</sup> logo</a> are registered trademarks of <a href="http://ev.kde.org/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> | <a href="http://www.kde.org/contact/impressum.php">Legal</a> </div></div> </body> </html>