Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 5027

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdbusabstractinterface.cpp -->
  <title>Qt 4.8: QDBusAbstractInterface Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtdbus.html">QtDBus</a></li>
<li>QDBusAbstractInterface</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QDBusAbstractInterface Class Reference</h1>
<!-- $$$QDBusAbstractInterface-brief -->
<p>The QDBusAbstractInterface class is the base class for all D-Bus interfaces in the <a href="qtdbus.html">QtDBus</a> binding, allowing access to remote interfaces <a href="#details">More...</a></p>
<!-- @@@QDBusAbstractInterface -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QDBusAbstractInterface&gt;</span></pre><p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<p><b>Inherited by: </b><a href="qdbusconnectioninterface.html">QDBusConnectionInterface</a> and <a href="qdbusinterface.html">QDBusInterface</a>.</p>
<p>This class was introduced in Qt 4.2.</p>
<ul>
<li><a href="qdbusabstractinterface-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#dtor.QDBusAbstractInterface">~QDBusAbstractInterface</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusPendingCall </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#asyncCall">asyncCall</a></b> ( const QString &amp; <i>method</i>, const QVariant &amp; <i>arg1</i> = QVariant(), const QVariant &amp; <i>arg2</i> = QVariant(), const QVariant &amp; <i>arg3</i> = QVariant(), const QVariant &amp; <i>arg4</i> = QVariant(), const QVariant &amp; <i>arg5</i> = QVariant(), const QVariant &amp; <i>arg6</i> = QVariant(), const QVariant &amp; <i>arg7</i> = QVariant(), const QVariant &amp; <i>arg8</i> = QVariant() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusPendingCall </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#asyncCallWithArgumentList">asyncCallWithArgumentList</a></b> ( const QString &amp; <i>method</i>, const QList&lt;QVariant&gt; &amp; <i>args</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusMessage </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#call">call</a></b> ( const QString &amp; <i>method</i>, const QVariant &amp; <i>arg1</i> = QVariant(), const QVariant &amp; <i>arg2</i> = QVariant(), const QVariant &amp; <i>arg3</i> = QVariant(), const QVariant &amp; <i>arg4</i> = QVariant(), const QVariant &amp; <i>arg5</i> = QVariant(), const QVariant &amp; <i>arg6</i> = QVariant(), const QVariant &amp; <i>arg7</i> = QVariant(), const QVariant &amp; <i>arg8</i> = QVariant() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusMessage </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#call-2">call</a></b> ( QDBus::CallMode <i>mode</i>, const QString &amp; <i>method</i>, const QVariant &amp; <i>arg1</i> = QVariant(), const QVariant &amp; <i>arg2</i> = QVariant(), const QVariant &amp; <i>arg3</i> = QVariant(), const QVariant &amp; <i>arg4</i> = QVariant(), const QVariant &amp; <i>arg5</i> = QVariant(), const QVariant &amp; <i>arg6</i> = QVariant(), const QVariant &amp; <i>arg7</i> = QVariant(), const QVariant &amp; <i>arg8</i> = QVariant() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusMessage </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#callWithArgumentList">callWithArgumentList</a></b> ( QDBus::CallMode <i>mode</i>, const QString &amp; <i>method</i>, const QList&lt;QVariant&gt; &amp; <i>args</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#callWithCallback">callWithCallback</a></b> ( const QString &amp; <i>method</i>, const QList&lt;QVariant&gt; &amp; <i>args</i>, QObject * <i>receiver</i>, const char * <i>returnMethod</i>, const char * <i>errorMethod</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#callWithCallback-2">callWithCallback</a></b> ( const QString &amp; <i>method</i>, const QList&lt;QVariant&gt; &amp; <i>args</i>, QObject * <i>receiver</i>, const char * <i>slot</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusConnection </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#connection">connection</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#interface">interface</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#isValid">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusError </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#lastError">lastError</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#pathx">path</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#service">service</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#setTimeout">setTimeout</a></b> ( int <i>timeout</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qdbusabstractinterface.html#timeout">timeout</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QDBusAbstractInterface-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QDBusAbstractInterface class is the base class for all D-Bus interfaces in the <a href="qtdbus.html">QtDBus</a> binding, allowing access to remote interfaces</p>
<p>Generated-code classes also derive from QDBusAbstractInterface, all methods described here are also valid for generated-code classes. In addition to those described here, generated-code classes provide member functions for the remote methods, which allow for compile-time checking of the correct parameters and return values, as well as property type-matching and signal parameter-matching.</p>
</div>
<p><b>See also </b><a href="qdbusxml2cpp.html">The QDBus compiler</a> and <a href="qdbusinterface.html">QDBusInterface</a>.</p>
<!-- @@@QDBusAbstractInterface -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$~QDBusAbstractInterface[overload1]$$$~QDBusAbstractInterface -->
<h3 class="fn"><a name="dtor.QDBusAbstractInterface"></a>QDBusAbstractInterface::<span class="name">~QDBusAbstractInterface</span> ()<tt> [virtual]</tt></h3>
<p>Releases this object's resources.</p>
<!-- @@@~QDBusAbstractInterface -->
<!-- $$$asyncCall[overload1]$$$asyncCallconstQString&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant& -->
<h3 class="fn"><a name="asyncCall"></a><span class="type"><a href="qdbuspendingcall.html">QDBusPendingCall</a></span> QDBusAbstractInterface::<span class="name">asyncCall</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>method</i>, const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg1</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg2</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg3</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg4</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg5</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg6</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg7</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg8</i> = QVariant() )</h3>
<p>Calls the method <i>method</i> on this interface and passes the parameters to this function to the method.</p>
<p>The parameters to <tt>call</tt> are passed on to the remote function via D-Bus as input arguments. The returned <a href="qdbuspendingcall.html">QDBusPendingCall</a> object can be used to find out information about the reply.</p>
<p>This function can be used with up to 8 parameters, passed in arguments <i>arg1</i>, <i>arg2</i>, <i>arg3</i>, <i>arg4</i>, <i>arg5</i>, <i>arg6</i>, <i>arg7</i> and <i>arg8</i>. If you need more than 8 parameters or if you have a variable number of parameters to be passed, use <a href="qdbusabstractinterface.html#asyncCallWithArgumentList">asyncCallWithArgumentList</a>().</p>
<p>It can be used the following way:</p>
<pre class="cpp"> <span class="type"><a href="qstring.html">QString</a></span> value <span class="operator">=</span> retrieveValue();
 <span class="type"><a href="qdbuspendingcall.html">QDBusPendingCall</a></span> pcall <span class="operator">=</span> interface<span class="operator">-</span><span class="operator">&gt;</span>asyncCall(QLatin1String(<span class="string">&quot;Process&quot;</span>)<span class="operator">,</span> value);

 <span class="type"><a href="qdbuspendingcallwatcher.html">QDBusPendingCallWatcher</a></span> <span class="operator">*</span>watcher <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qdbuspendingcallwatcher.html">QDBusPendingCallWatcher</a></span>(pcall<span class="operator">,</span> <span class="keyword">this</span>);

 <span class="type"><a href="qobject.html">QObject</a></span><span class="operator">::</span><a href="qobject.html#connect">connect</a>(watcher<span class="operator">,</span> SIGNAL(finished(<span class="type"><a href="qdbuspendingcallwatcher.html">QDBusPendingCallWatcher</a></span><span class="operator">*</span>))<span class="operator">,</span>
                  <span class="keyword">this</span><span class="operator">,</span> SLOT(callFinishedSlot(<span class="type"><a href="qdbuspendingcallwatcher.html">QDBusPendingCallWatcher</a></span><span class="operator">*</span>)));</pre>
<p>This example illustrates function calling with 0, 1 and 2 parameters and illustrates different parameter types passed in each (the first call to <tt>&quot;ProcessWorkUnicode&quot;</tt> will contain one Unicode string, the second call to <tt>&quot;ProcessWork&quot;</tt> will contain one string and one byte array).</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@asyncCall -->
<!-- $$$asyncCallWithArgumentList[overload1]$$$asyncCallWithArgumentListconstQString&constQList<QVariant>& -->
<h3 class="fn"><a name="asyncCallWithArgumentList"></a><span class="type"><a href="qdbuspendingcall.html">QDBusPendingCall</a></span> QDBusAbstractInterface::<span class="name">asyncCallWithArgumentList</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>method</i>, const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qvariant.html">QVariant</a></span>&gt; &amp; <i>args</i> )</h3>
<p>Places a call to the remote method specified by <i>method</i> on this interface, using <i>args</i> as arguments. This function returns a <a href="qdbuspendingcall.html">QDBusPendingCall</a> object that can be used to track the status of the reply and access its contents once it has arrived.</p>
<p>Normally, you should place calls using <a href="qdbusabstractinterface.html#asyncCall">asyncCall</a>().</p>
<p><b>Note:</b> This function is <a href="threads-reentrancy.html#thread-safe">thread-safe</a>.</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@asyncCallWithArgumentList -->
<!-- $$$call[overload1]$$$callconstQString&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant& -->
<h3 class="fn"><a name="call"></a><span class="type"><a href="qdbusmessage.html">QDBusMessage</a></span> QDBusAbstractInterface::<span class="name">call</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>method</i>, const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg1</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg2</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg3</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg4</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg5</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg6</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg7</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg8</i> = QVariant() )</h3>
<p>Calls the method <i>method</i> on this interface and passes the parameters to this function to the method.</p>
<p>The parameters to <tt>call</tt> are passed on to the remote function via D-Bus as input arguments. Output arguments are returned in the <a href="qdbusmessage.html">QDBusMessage</a> reply. If the reply is an error reply, <a href="qdbusabstractinterface.html#lastError">lastError</a>() will also be set to the contents of the error message.</p>
<p>This function can be used with up to 8 parameters, passed in arguments <i>arg1</i>, <i>arg2</i>, <i>arg3</i>, <i>arg4</i>, <i>arg5</i>, <i>arg6</i>, <i>arg7</i> and <i>arg8</i>. If you need more than 8 parameters or if you have a variable number of parameters to be passed, use <a href="qdbusabstractinterface.html#callWithArgumentList">callWithArgumentList</a>().</p>
<p>It can be used the following way:</p>
<pre class="cpp"> <span class="type"><a href="qstring.html">QString</a></span> value <span class="operator">=</span> retrieveValue();
 <span class="type"><a href="qdbusmessage.html">QDBusMessage</a></span> reply;

 <span class="type"><a href="qdbusreply.html">QDBusReply</a></span><span class="operator">&lt;</span><span class="type">int</span><span class="operator">&gt;</span> api <span class="operator">=</span> interface<span class="operator">-</span><span class="operator">&gt;</span>call(QLatin1String(<span class="string">&quot;GetAPIVersion&quot;</span>));
 <span class="keyword">if</span> (api <span class="operator">&gt;</span><span class="operator">=</span> <span class="number">14</span>)
   reply <span class="operator">=</span> interface<span class="operator">-</span><span class="operator">&gt;</span>call(QLatin1String(<span class="string">&quot;ProcessWorkUnicode&quot;</span>)<span class="operator">,</span> value);
 <span class="keyword">else</span>
   reply <span class="operator">=</span> interface<span class="operator">-</span><span class="operator">&gt;</span>call(QLatin1String(<span class="string">&quot;ProcessWork&quot;</span>)<span class="operator">,</span> QLatin1String(<span class="string">&quot;UTF-8&quot;</span>)<span class="operator">,</span> value<span class="operator">.</span>toUtf8());</pre>
<p>This example illustrates function calling with 0, 1 and 2 parameters and illustrates different parameter types passed in each (the first call to <tt>&quot;ProcessWorkUnicode&quot;</tt> will contain one Unicode string, the second call to <tt>&quot;ProcessWork&quot;</tt> will contain one string and one byte array).</p>
<!-- @@@call -->
<!-- $$$call$$$callQDBus::CallModeconstQString&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant& -->
<h3 class="fn"><a name="call-2"></a><span class="type"><a href="qdbusmessage.html">QDBusMessage</a></span> QDBusAbstractInterface::<span class="name">call</span> ( <span class="type"><a href="qdbus.html#CallMode-enum">QDBus::CallMode</a></span> <i>mode</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>method</i>, const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg1</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg2</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg3</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg4</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg5</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg6</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg7</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>arg8</i> = QVariant() )</h3>
<p>This is an overloaded function.</p>
<p>Calls the method <i>method</i> on this interface and passes the parameters to this function to the method. If <i>mode</i> is <tt>NoWaitForReply</tt>, then this function will return immediately after placing the call, without waiting for a reply from the remote method. Otherwise, <i>mode</i> indicates whether this function should activate the Qt Event Loop while waiting for the reply to arrive.</p>
<p>This function can be used with up to 8 parameters, passed in arguments <i>arg1</i>, <i>arg2</i>, <i>arg3</i>, <i>arg4</i>, <i>arg5</i>, <i>arg6</i>, <i>arg7</i> and <i>arg8</i>. If you need more than 8 parameters or if you have a variable number of parameters to be passed, use <a href="qdbusabstractinterface.html#callWithArgumentList">callWithArgumentList</a>().</p>
<p>If this function reenters the Qt event loop in order to wait for the reply, it will exclude user input. During the wait, it may deliver signals and other method calls to your application. Therefore, it must be prepared to handle a reentrancy whenever a call is placed with <a href="qdbusabstractinterface.html#call">call</a>().</p>
<!-- @@@call -->
<!-- $$$callWithArgumentList[overload1]$$$callWithArgumentListQDBus::CallModeconstQString&constQList<QVariant>& -->
<h3 class="fn"><a name="callWithArgumentList"></a><span class="type"><a href="qdbusmessage.html">QDBusMessage</a></span> QDBusAbstractInterface::<span class="name">callWithArgumentList</span> ( <span class="type"><a href="qdbus.html#CallMode-enum">QDBus::CallMode</a></span> <i>mode</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>method</i>, const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qvariant.html">QVariant</a></span>&gt; &amp; <i>args</i> )</h3>
<p>Places a call to the remote method specified by <i>method</i> on this interface, using <i>args</i> as arguments. This function returns the message that was received as a reply, which can be a normal <a href="qdbusmessage.html#MessageType-enum">QDBusMessage::ReplyMessage</a> (indicating success) or <a href="qdbusmessage.html#MessageType-enum">QDBusMessage::ErrorMessage</a> (if the call failed). The <i>mode</i> parameter specifies how this call should be placed.</p>
<p>If the call succeeds, <a href="qdbusabstractinterface.html#lastError">lastError</a>() will be cleared; otherwise, it will contain the error this call produced.</p>
<p>Normally, you should place calls using <a href="qdbusabstractinterface.html#call">call</a>().</p>
<p><b>Warning:</b> If you use <tt>UseEventLoop</tt>, your code must be prepared to deal with any reentrancy: other method calls and signals may be delivered before this function returns, as well as other Qt queued signals and events.</p>
<p><b>Note:</b> This function is <a href="threads-reentrancy.html#thread-safe">thread-safe</a>.</p>
<!-- @@@callWithArgumentList -->
<!-- $$$callWithCallback[overload1]$$$callWithCallbackconstQString&constQList<QVariant>&QObject*constchar*constchar* -->
<h3 class="fn"><a name="callWithCallback"></a><span class="type">bool</span> QDBusAbstractInterface::<span class="name">callWithCallback</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>method</i>, const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qvariant.html">QVariant</a></span>&gt; &amp; <i>args</i>, <span class="type"><a href="qobject.html">QObject</a></span> * <i>receiver</i>, const <span class="type">char</span> * <i>returnMethod</i>, const <span class="type">char</span> * <i>errorMethod</i> )</h3>
<p>Places a call to the remote method specified by <i>method</i> on this interface, using <i>args</i> as arguments. This function returns immediately after queueing the call. The reply from the remote function is delivered to the <i>returnMethod</i> on object <i>receiver</i>. If an error occurs, the <i>errorMethod</i> on object <i>receiver</i> is called instead.</p>
<p>This function returns true if the queueing succeeds. It does not indicate that the executed call succeeded. If it fails, the <i>errorMethod</i> is called. If the queueing failed, this function returns false and no slot will be called.</p>
<p>The <i>returnMethod</i> must have as its parameters the types returned by the function call. Optionally, it may have a <a href="qdbusmessage.html">QDBusMessage</a> parameter as its last or only parameter. The <i>errorMethod</i> must have a <a href="qdbuserror.html">QDBusError</a> as its only parameter.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also </b><a href="qdbuserror.html">QDBusError</a> and <a href="qdbusmessage.html">QDBusMessage</a>.</p>
<!-- @@@callWithCallback -->
<!-- $$$callWithCallback$$$callWithCallbackconstQString&constQList<QVariant>&QObject*constchar* -->
<h3 class="fn"><a name="callWithCallback-2"></a><span class="type">bool</span> QDBusAbstractInterface::<span class="name">callWithCallback</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>method</i>, const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qvariant.html">QVariant</a></span>&gt; &amp; <i>args</i>, <span class="type"><a href="qobject.html">QObject</a></span> * <i>receiver</i>, const <span class="type">char</span> * <i>slot</i> )</h3>
<p>This is an overloaded function.</p>
<p>This function is deprecated. Please use the overloaded version.</p>
<p>Places a call to the remote method specified by <i>method</i> on this interface, using <i>args</i> as arguments. This function returns immediately after queueing the call. The reply from the remote function or any errors emitted by it are delivered to the <i>slot</i> slot on object <i>receiver</i>.</p>
<p>This function returns true if the queueing succeeded: it does not indicate that the call succeeded. If it failed, the slot will be called with an error message. <a href="qdbusabstractinterface.html#lastError">lastError</a>() will not be set under those circumstances.</p>
<p><b>See also </b><a href="qdbuserror.html">QDBusError</a> and <a href="qdbusmessage.html">QDBusMessage</a>.</p>
<!-- @@@callWithCallback -->
<!-- $$$connection[overload1]$$$connection -->
<h3 class="fn"><a name="connection"></a><span class="type"><a href="qdbusconnection.html">QDBusConnection</a></span> QDBusAbstractInterface::<span class="name">connection</span> () const</h3>
<p>Returns the connection this interface is assocated with.</p>
<!-- @@@connection -->
<!-- $$$interface[overload1]$$$interface -->
<h3 class="fn"><a name="interface"></a><span class="type"><a href="qstring.html">QString</a></span> QDBusAbstractInterface::<span class="name">interface</span> () const</h3>
<p>Returns the name of this interface.</p>
<!-- @@@interface -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn"><a name="isValid"></a><span class="type">bool</span> QDBusAbstractInterface::<span class="name">isValid</span> () const</h3>
<p>Returns true if this is a valid reference to a remote object. It returns false if there was an error during the creation of this interface (for instance, if the remote application does not exist).</p>
<p>Note: when dealing with remote objects, it is not always possible to determine if it exists when creating a <a href="qdbusinterface.html">QDBusInterface</a>.</p>
<!-- @@@isValid -->
<!-- $$$lastError[overload1]$$$lastError -->
<h3 class="fn"><a name="lastError"></a><span class="type"><a href="qdbuserror.html">QDBusError</a></span> QDBusAbstractInterface::<span class="name">lastError</span> () const</h3>
<p>Returns the error the last operation produced, or an invalid error if the last operation did not produce an error.</p>
<!-- @@@lastError -->
<!-- $$$path[overload1]$$$path -->
<h3 class="fn"><a name="pathx"></a><span class="type"><a href="qstring.html">QString</a></span> QDBusAbstractInterface::<span class="name">path</span> () const</h3>
<p>Returns the object path that this interface is associated with.</p>
<!-- @@@path -->
<!-- $$$service[overload1]$$$service -->
<h3 class="fn"><a name="service"></a><span class="type"><a href="qstring.html">QString</a></span> QDBusAbstractInterface::<span class="name">service</span> () const</h3>
<p>Returns the name of the service this interface is associated with.</p>
<!-- @@@service -->
<!-- $$$setTimeout[overload1]$$$setTimeoutint -->
<h3 class="fn"><a name="setTimeout"></a><span class="type">void</span> QDBusAbstractInterface::<span class="name">setTimeout</span> ( <span class="type">int</span> <i>timeout</i> )</h3>
<p>Sets the timeout in milliseconds for all future DBus calls to <i>timeout</i>. -1 means the default DBus timeout (usually 25 seconds).</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="qdbusabstractinterface.html#timeout">timeout</a>().</p>
<!-- @@@setTimeout -->
<!-- $$$timeout[overload1]$$$timeout -->
<h3 class="fn"><a name="timeout"></a><span class="type">int</span> QDBusAbstractInterface::<span class="name">timeout</span> () const</h3>
<p>Returns the current value of the timeout in milliseconds. -1 means the default DBus timeout (usually 25 seconds).</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="qdbusabstractinterface.html#setTimeout">setTimeout</a>().</p>
<!-- @@@timeout -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>