Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 5b6c31d6428e1f6ea754ea6f7b1aed6e > files > 86

soprano-apidocs-2.6.0-2.fc14.noarch.rpm

<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Soprano: Soprano::Client::TcpClient Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<script type="text/javascript">
function hasClass(ele,cls) {
  return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}

function addClass(ele,cls) {
  if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}

function removeClass(ele,cls) {
  if (hasClass(ele,cls)) {
    var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
    ele.className=ele.className.replace(reg,' ');
  }
}

function toggleVisibility(linkObj) {
 var base = linkObj.getAttribute('id');
 var summary = document.getElementById(base + '-summary');
 var content = document.getElementById(base + '-content');
 var trigger = document.getElementById(base + '-trigger');
 if ( hasClass(linkObj,'closed') ) {
   summary.style.display = 'none';
   content.style.display = 'block';
   trigger.src = 'open.png';
   removeClass(linkObj,'closed');
   addClass(linkObj,'opened');
 } else if ( hasClass(linkObj,'opened') ) {
   summary.style.display = 'block';
   content.style.display = 'none';
   trigger.src = 'closed.png';
   removeClass(linkObj,'opened');
   addClass(linkObj,'closed');
 }
 return false;
}
</script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Soprano&#160;<span id="projectnumber">2.6.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceSoprano.html">Soprano</a>      </li>
      <li class="navelem"><a class="el" href="namespaceSoprano_1_1Client.html">Client</a>      </li>
      <li class="navelem"><a class="el" href="classSoprano_1_1Client_1_1TcpClient.html">TcpClient</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a>  </div>
  <div class="headertitle">
<h1>Soprano::Client::TcpClient Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Soprano::Client::TcpClient" --><!-- doxytag: inherits="QObject,Soprano::Error::ErrorCache" -->
<p>Creates a connection to the Soprano server through a TCP connection.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="tcpclient_8h_source.html">Soprano/Client/TcpClient</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png"/> Inheritance diagram for Soprano::Client::TcpClient:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classSoprano_1_1Client_1_1TcpClient__inherit__graph.png" border="0" usemap="#Soprano_1_1Client_1_1TcpClient_inherit__map" alt="Inheritance graph"/></div>
<map name="Soprano_1_1Client_1_1TcpClient_inherit__map" id="Soprano_1_1Client_1_1TcpClient_inherit__map">
<area shape="rect" id="node2" href="qobject.html" title="QObject" alt="" coords="5,5,75,35"/><area shape="rect" id="node4" href="classSoprano_1_1Error_1_1ErrorCache.html" title="Core class of Soprano&#39;s exception system." alt="" coords="99,5,277,35"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classSoprano_1_1Client_1_1TcpClient-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Client_1_1TcpClient.html#ab9fd1b5e709224ac61da1ddcedf802b5">TcpClient</a> (<a class="elRef" href="qobject.html">QObject</a> *<a class="elRef" href="qobject.html#parent">parent</a>=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Client_1_1TcpClient.html#ab8e75187b5a075761d7c6a55b7d2fdcb">~TcpClient</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Client_1_1TcpClient.html#abb5ee4f5c96edf2b2c83170e837ebfb2">connect</a> (const <a class="elRef" href="qhostaddress.html">QHostAddress</a> &amp;address=QHostAddress::LocalHost, int port=<a class="el" href="classSoprano_1_1Client_1_1TcpClient.html#acfed0d5ca6b0eafa590d9caa83db0f18">DEFAULT_PORT</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Client_1_1TcpClient.html#aa3ac6a62eb84523cd28ff2b30eb569d7">isConnected</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Client_1_1TcpClient.html#aed70203b97f46015f5296221eaa8c9e5">disconnect</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1Model.html">Model</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Client_1_1TcpClient.html#a0498664dbf2cea552facebae9c6c0fb7">createModel</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;<a class="elRef" href="qobject.html#name">name</a>, const <a class="elRef" href="qlist.html">QList</a>&lt; <a class="el" href="classSoprano_1_1BackendSetting.html">BackendSetting</a> &gt; &amp;settings=<a class="elRef" href="qlist.html">QList</a>&lt; <a class="el" href="classSoprano_1_1BackendSetting.html">BackendSetting</a> &gt;())</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Client_1_1TcpClient.html#adda0281660f4e8ed03af8b4b9e47d02e">removeModel</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;<a class="elRef" href="qobject.html#name">name</a>)</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const quint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Client_1_1TcpClient.html#acfed0d5ca6b0eafa590d9caa83db0f18">DEFAULT_PORT</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Creates a connection to the Soprano server through a TCP connection. </p>
<p>The Soprano server supports more than one way of communication. Beside D-Bus (see <a class="el" href="classSoprano_1_1Client_1_1DBusClient.html" title="Core class to handle a connection to a Soprano server through the DBus interface.">DBusClient</a>) and local socket communication (<a class="el" href="classSoprano_1_1Client_1_1LocalSocketClient.html" title="Creates a connection to the Soprano server through a local socket interface.">LocalSocketClient</a>) it can be contacted via TCP. For that to work the server has to be listening on some port (<a class="el" href="classSoprano_1_1Server_1_1ServerCore.html#ac4f1d3911ee454430e754d1cda058fe5">Server::ServerCore::listen</a>).</p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>The <a class="el" href="classSoprano_1_1Client_1_1TcpClient.html" title="Creates a connection to the Soprano server through a TCP connection.">TcpClient</a> does not support signals. Thus, the models created by it will not emit signals such as <a class="el" href="classSoprano_1_1Model.html#a3e2595166caac3621fd4268e46049adf">Model::statementAdded</a>. Also no permission handling or any kind of security is implemented at the moment. Thus, if a server is running and is listening on a port, it is open to connections from any client on any computer in the network.</dd></dl>
<dl class="author"><dt><b>Author:</b></dt><dd>Sebastian Trueg &lt;<a href="mailto:trueg@kde.org">trueg@kde.org</a>&gt; </dd></dl>

<p>Definition at line <a class="el" href="tcpclient_8h_source.html#l00057">57</a> of file <a class="el" href="tcpclient_8h_source.html">tcpclient.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab9fd1b5e709224ac61da1ddcedf802b5"></a><!-- doxytag: member="Soprano::Client::TcpClient::TcpClient" ref="ab9fd1b5e709224ac61da1ddcedf802b5" args="(QObject *parent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Client::TcpClient::TcpClient </td>
          <td>(</td>
          <td class="paramtype"><a class="elRef" href="qobject.html">QObject</a> *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create a new <a class="el" href="namespaceSoprano_1_1Client.html">Client</a> instance. </p>

</div>
</div>
<a class="anchor" id="ab8e75187b5a075761d7c6a55b7d2fdcb"></a><!-- doxytag: member="Soprano::Client::TcpClient::~TcpClient" ref="ab8e75187b5a075761d7c6a55b7d2fdcb" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual Soprano::Client::TcpClient::~TcpClient </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destructor. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="abb5ee4f5c96edf2b2c83170e837ebfb2"></a><!-- doxytag: member="Soprano::Client::TcpClient::connect" ref="abb5ee4f5c96edf2b2c83170e837ebfb2" args="(const QHostAddress &amp;address=QHostAddress::LocalHost, int port=DEFAULT_PORT)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Client::TcpClient::connect </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qhostaddress.html">QHostAddress</a> &amp;&#160;</td>
          <td class="paramname"><em>address</em> = <code>QHostAddress::LocalHost</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>port</em> = <code><a class="el" href="classSoprano_1_1Client_1_1TcpClient.html#acfed0d5ca6b0eafa590d9caa83db0f18">DEFAULT_PORT</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Tries to connect to the Soprano server.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> on success, <code>false</code> if an error occured. Check <a class="el" href="classSoprano_1_1Error_1_1ErrorCache.html#a3251b8052cdf932d59a523ca215d21c9">lastError()</a> for details. </dd></dl>

</div>
</div>
<a class="anchor" id="aa3ac6a62eb84523cd28ff2b30eb569d7"></a><!-- doxytag: member="Soprano::Client::TcpClient::isConnected" ref="aa3ac6a62eb84523cd28ff2b30eb569d7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Client::TcpClient::isConnected </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if the client is connected to a server.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if this client is connected to a server, <code>false</code> otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="aed70203b97f46015f5296221eaa8c9e5"></a><!-- doxytag: member="Soprano::Client::TcpClient::disconnect" ref="aed70203b97f46015f5296221eaa8c9e5" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Soprano::Client::TcpClient::disconnect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Disconnect from the server. The created model instances are not deleted but remain useless; open iterators are closed. </p>

</div>
</div>
<a class="anchor" id="a0498664dbf2cea552facebae9c6c0fb7"></a><!-- doxytag: member="Soprano::Client::TcpClient::createModel" ref="a0498664dbf2cea552facebae9c6c0fb7" args="(const QString &amp;name, const QList&lt; BackendSetting &gt; &amp;settings=QList&lt; BackendSetting &gt;())" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classSoprano_1_1Model.html">Model</a>* Soprano::Client::TcpClient::createModel </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qlist.html">QList</a>&lt; <a class="el" href="classSoprano_1_1BackendSetting.html">BackendSetting</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>settings</em> = <code><a class="elRef" href="qlist.html">QList</a>&lt;&#160;<a class="el" href="classSoprano_1_1BackendSetting.html">BackendSetting</a>&#160;&gt;()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a new <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a> instance that wraps a server model. Client models are very light wrappers and creating them is very fast.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the model to access. </td></tr>
    <tr><td class="paramname">settings</td><td>The settings to send to the server for creating a new model. These settings may be ignored by the server if a model with that name has already been created.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A new <a class="el" href="classSoprano_1_1Model.html" title="A Model is the central class in Soprano. It is a queryable collection of RDF quadruples, i.e statements.">Model</a> instance wrapping the requested server model or 0 on error (check <a class="el" href="classSoprano_1_1Error_1_1ErrorCache.html#a3251b8052cdf932d59a523ca215d21c9">lastError()</a> for details.) </dd></dl>

</div>
</div>
<a class="anchor" id="adda0281660f4e8ed03af8b4b9e47d02e"></a><!-- doxytag: member="Soprano::Client::TcpClient::removeModel" ref="adda0281660f4e8ed03af8b4b9e47d02e" args="(const QString &amp;name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Soprano::Client::TcpClient::removeModel </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Deletes a model including all its data.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the model to remove.</td></tr>
  </table>
  </dd>
</dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd>Calling this method will remove all data physically. It can not be reverted. Use with care.</dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>2.1 </dd></dl>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="acfed0d5ca6b0eafa590d9caa83db0f18"></a><!-- doxytag: member="Soprano::Client::TcpClient::DEFAULT_PORT" ref="acfed0d5ca6b0eafa590d9caa83db0f18" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const quint16 <a class="el" href="classSoprano_1_1Client_1_1TcpClient.html#acfed0d5ca6b0eafa590d9caa83db0f18">Soprano::Client::TcpClient::DEFAULT_PORT</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The default Soprano server connection port. </p>

<p>Definition at line <a class="el" href="tcpclient_8h_source.html#l00075">75</a> of file <a class="el" href="tcpclient_8h_source.html">tcpclient.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/builddir/build/BUILD/soprano-2.6.0/client/<a class="el" href="tcpclient_8h_source.html">tcpclient.h</a></li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Fri Mar 11 2011 for Soprano by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>