Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 923

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdbusconnection.cpp -->
  <title>QDBusConnection Class | Qt D-Bus</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtdbus-index.html">Qt D-Bus</a></td><td ><a href="qtdbus-module.html">C++ Classes</a></td><td >QDBusConnection</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QDBusConnection Class</h1>
<!-- $$$QDBusConnection-brief -->
<p>The <a href="qdbusconnection.html">QDBusConnection</a> class represents a connection to the D-Bus bus daemon. <a href="#details">More...</a></p>
<!-- @@@QDBusConnection -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QDBusConnection&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += dbus</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 4.2</td></tr></table></div><ul>
<li><a href="qdbusconnection-members.html">List of all members, including inherited members</a></li>
<li><a href="qdbusconnection-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#BusType-enum">BusType</a></b> { SessionBus, SystemBus, ActivationBus }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#ConnectionCapability-enum">ConnectionCapabilities</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#ConnectionCapability-enum">ConnectionCapability</a></b> { UnixFileDescriptorPassing }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#RegisterOption-enum">RegisterOption</a></b> { ExportAdaptors, ExportScriptableSlots, ExportScriptableSignals, ExportScriptableProperties, ..., ExportChildObjects }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#RegisterOption-enum">RegisterOptions</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#UnregisterMode-enum">UnregisterMode</a></b> { UnregisterNode, UnregisterTree }</td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#QDBusConnection">QDBusConnection</a></b>(const QString &amp;<i>name</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#QDBusConnection-1">QDBusConnection</a></b>(const QDBusConnection &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#QDBusConnection-2">QDBusConnection</a></b>(QDBusConnection &amp;&amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#dtor.QDBusConnection">~QDBusConnection</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusPendingCall </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#asyncCall">asyncCall</a></b>(const QDBusMessage &amp;<i>message</i>, int <i>timeout</i> = -1) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#baseService">baseService</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusMessage </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#call">call</a></b>(const QDBusMessage &amp;<i>message</i>, QDBus::CallMode <i>mode</i> = QDBus::Block, int <i>timeout</i> = -1) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#callWithCallback">callWithCallback</a></b>(const QDBusMessage &amp;<i>message</i>, QObject *<i>receiver</i>, const char *<i>returnMethod</i>, const char *<i>errorMethod</i>, int <i>timeout</i> = -1) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#connect">connect</a></b>(const QString &amp;<i>service</i>, const QString &amp;<i>path</i>, const QString &amp;<i>interface</i>, const QString &amp;<i>name</i>, QObject *<i>receiver</i>, const char *<i>slot</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#connect-1">connect</a></b>(const QString &amp;<i>service</i>, const QString &amp;<i>path</i>, const QString &amp;<i>interface</i>, const QString &amp;<i>name</i>, const QString &amp;<i>signature</i>, QObject *<i>receiver</i>, const char *<i>slot</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#connect-2">connect</a></b>(const QString &amp;<i>service</i>, const QString &amp;<i>path</i>, const QString &amp;<i>interface</i>, const QString &amp;<i>name</i>, const QStringList &amp;<i>argumentMatch</i>, const QString &amp;<i>signature</i>, QObject *<i>receiver</i>, const char *<i>slot</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ConnectionCapabilities </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#connectionCapabilities">connectionCapabilities</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#disconnect">disconnect</a></b>(const QString &amp;<i>service</i>, const QString &amp;<i>path</i>, const QString &amp;<i>interface</i>, const QString &amp;<i>name</i>, QObject *<i>receiver</i>, const char *<i>slot</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#disconnect-1">disconnect</a></b>(const QString &amp;<i>service</i>, const QString &amp;<i>path</i>, const QString &amp;<i>interface</i>, const QString &amp;<i>name</i>, const QString &amp;<i>signature</i>, QObject *<i>receiver</i>, const char *<i>slot</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#disconnect-2">disconnect</a></b>(const QString &amp;<i>service</i>, const QString &amp;<i>path</i>, const QString &amp;<i>interface</i>, const QString &amp;<i>name</i>, const QStringList &amp;<i>argumentMatch</i>, const QString &amp;<i>signature</i>, QObject *<i>receiver</i>, const char *<i>slot</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusConnectionInterface *</td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#interface">interface</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#isConnected">isConnected</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusError </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#lastError">lastError</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#name">name</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QObject *</td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#objectRegisteredAt">objectRegisteredAt</a></b>(const QString &amp;<i>path</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#registerObject">registerObject</a></b>(const QString &amp;<i>path</i>, QObject *<i>object</i>, RegisterOptions <i>options</i> = ExportAdaptors)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#registerObject-1">registerObject</a></b>(const QString &amp;<i>path</i>, const QString &amp;<i>interface</i>, QObject *<i>object</i>, RegisterOptions <i>options</i> = ExportAdaptors)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#registerService">registerService</a></b>(const QString &amp;<i>serviceName</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#send">send</a></b>(const QDBusMessage &amp;<i>message</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#swap">swap</a></b>(QDBusConnection &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#unregisterObject">unregisterObject</a></b>(const QString &amp;<i>path</i>, UnregisterMode <i>mode</i> = UnregisterNode)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#unregisterService">unregisterService</a></b>(const QString &amp;<i>serviceName</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusConnection &amp;</td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#operator-eq">operator=</a></b>(QDBusConnection &amp;&amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusConnection &amp;</td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#operator-eq-1">operator=</a></b>(const QDBusConnection &amp;<i>other</i>)</td></tr>
</table></div>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QDBusConnection </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#connectToBus">connectToBus</a></b>(BusType <i>type</i>, const QString &amp;<i>name</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusConnection </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#connectToBus-1">connectToBus</a></b>(const QString &amp;<i>address</i>, const QString &amp;<i>name</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusConnection </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#connectToPeer">connectToPeer</a></b>(const QString &amp;<i>address</i>, const QString &amp;<i>name</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#disconnectFromBus">disconnectFromBus</a></b>(const QString &amp;<i>name</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#disconnectFromPeer">disconnectFromPeer</a></b>(const QString &amp;<i>name</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#localMachineId">localMachineId</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusConnection </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#sessionBus">sessionBus</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusConnection </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnection.html#systemBus">systemBus</a></b>()</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QDBusConnection-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qdbusconnection.html">QDBusConnection</a> class represents a connection to the D-Bus bus daemon.</p>
<p>This class is the initial point in a D-Bus session. Using it, you can get access to remote objects, interfaces; connect remote signals to your object's slots; register objects, etc.</p>
<p>D-Bus connections are created using the <a href="qdbusconnection.html#connectToBus">connectToBus</a>() function, which opens a connection to the server daemon and does the initial handshaking, associating that connection with a name. Further attempts to connect using the same name will return the same connection.</p>
<p>The connection is then torn down using the <a href="qdbusconnection.html#disconnectFromBus">disconnectFromBus</a>() function.</p>
<p>Once disconnected, calling <a href="qdbusconnection.html#connectToBus">connectToBus</a>() will not reestablish a connection, you must create a new <a href="qdbusconnection.html">QDBusConnection</a> instance.</p>
<p>As a convenience for the two most common connection types, the <a href="qdbusconnection.html#sessionBus">sessionBus</a>() and <a href="qdbusconnection.html#systemBus">systemBus</a>() functions return open connections to the session server daemon and the system server daemon, respectively. Those connections are opened when first used and are closed when the <a href="../qtcore/qcoreapplication.html">QCoreApplication</a> destructor is run.</p>
<p>D-Bus also supports peer-to-peer connections, without the need for a bus server daemon. Using this facility, two applications can talk to each other and exchange messages. This can be achieved by passing an address to <a href="qdbusconnection.html#connectToBus">connectToBus</a>() function, which was opened by another D-Bus application using <a href="qdbusserver.html">QDBusServer</a>.</p>
</div>
<!-- @@@QDBusConnection -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$BusType$$$SessionBus$$$SystemBus$$$ActivationBus -->
<h3 class="fn" id="BusType-enum"><a name="BusType-enum"></a>enum QDBusConnection::<span class="name">BusType</span></h3>
<p>Specifies the type of the bus connection. The valid bus types are:</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QDBusConnection::SessionBus</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">the session bus, associated with the running desktop session</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::SystemBus</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">the system bus, used to communicate with system-wide processes</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ActivationBus</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">the activation bus, the &quot;alias&quot; for the bus that started the service</td></tr>
</table></div>
<p>On the Session Bus, one can find other applications by the same user that are sharing the same desktop session (hence the name). On the System Bus, however, processes shared for the whole system are usually found.</p>
<!-- @@@BusType -->
<!-- $$$ConnectionCapability$$$UnixFileDescriptorPassing -->
<h3 class="flags" id="ConnectionCapability-enum"><a name="ConnectionCapability-enum"></a>enum QDBusConnection::<span class="name">ConnectionCapability</span><br/>flags QDBusConnection::<span class="name">ConnectionCapabilities</span></h3>
<p>This enum describes the available capabilities for a D-Bus connection.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QDBusConnection::UnixFileDescriptorPassing</code></td><td class="topAlign tblval"><code>0x0001</code></td><td class="topAlign">enables passing of Unix file descriptors to other processes (see <a href="qdbusunixfiledescriptor.html">QDBusUnixFileDescriptor</a>)</td></tr>
</table></div>
<p>This enum was introduced or modified in  Qt 4.8.</p>
<p>The ConnectionCapabilities type is a typedef for <a href="../qtcore/qflags.html">QFlags</a>&lt;ConnectionCapability&gt;. It stores an OR combination of ConnectionCapability values.</p>
<p><b>See also </b><a href="qdbusconnection.html#connectionCapabilities">connectionCapabilities</a>().</p>
<!-- @@@ConnectionCapability -->
<!-- $$$RegisterOption$$$ExportAdaptors$$$ExportScriptableSlots$$$ExportScriptableSignals$$$ExportScriptableProperties$$$ExportScriptableInvokables$$$ExportScriptableContents$$$ExportNonScriptableSlots$$$ExportNonScriptableSignals$$$ExportNonScriptableProperties$$$ExportNonScriptableInvokables$$$ExportNonScriptableContents$$$ExportAllSlots$$$ExportAllSignals$$$ExportAllProperties$$$ExportAllInvokables$$$ExportAllContents$$$ExportChildObjects -->
<h3 class="flags" id="RegisterOption-enum"><a name="RegisterOption-enum"></a>enum QDBusConnection::<span class="name">RegisterOption</span><br/>flags QDBusConnection::<span class="name">RegisterOptions</span></h3>
<p>Specifies the options for registering objects with the connection. The possible values are:</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportAdaptors</code></td><td class="topAlign tblval"><code>0x01</code></td><td class="topAlign">export the contents of adaptors found in this object</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportScriptableSlots</code></td><td class="topAlign tblval"><code>0x10</code></td><td class="topAlign">export this object's scriptable slots</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportScriptableSignals</code></td><td class="topAlign tblval"><code>0x20</code></td><td class="topAlign">export this object's scriptable signals</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportScriptableProperties</code></td><td class="topAlign tblval"><code>0x40</code></td><td class="topAlign">export this object's scriptable properties</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportScriptableInvokables</code></td><td class="topAlign tblval"><code>0x80</code></td><td class="topAlign">export this object's scriptable invokables</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportScriptableContents</code></td><td class="topAlign tblval"><code>0xf0</code></td><td class="topAlign">shorthand form for ExportScriptableSlots | ExportScriptableSignals | ExportScriptableProperties</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportNonScriptableSlots</code></td><td class="topAlign tblval"><code>0x100</code></td><td class="topAlign">export this object's non-scriptable slots</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportNonScriptableSignals</code></td><td class="topAlign tblval"><code>0x200</code></td><td class="topAlign">export this object's non-scriptable signals</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportNonScriptableProperties</code></td><td class="topAlign tblval"><code>0x400</code></td><td class="topAlign">export this object's non-scriptable properties</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportNonScriptableInvokables</code></td><td class="topAlign tblval"><code>0x800</code></td><td class="topAlign">export this object's non-scriptable invokables</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportNonScriptableContents</code></td><td class="topAlign tblval"><code>0xf00</code></td><td class="topAlign">shorthand form for ExportNonScriptableSlots | ExportNonScriptableSignals | ExportNonScriptableProperties</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportAllSlots</code></td><td class="topAlign tblval"><code>ExportScriptableSlots | ExportNonScriptableSlots</code></td><td class="topAlign">export all of this object's slots</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportAllSignals</code></td><td class="topAlign tblval"><code>ExportScriptableSignals | ExportNonScriptableSignals</code></td><td class="topAlign">export all of this object's signals</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportAllProperties</code></td><td class="topAlign tblval"><code>ExportScriptableProperties | ExportNonScriptableProperties</code></td><td class="topAlign">export all of this object's properties</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportAllInvokables</code></td><td class="topAlign tblval"><code>ExportScriptableInvokables | ExportNonScriptableInvokables</code></td><td class="topAlign">export all of this object's invokables</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportAllContents</code></td><td class="topAlign tblval"><code>ExportScriptableContents | ExportNonScriptableContents</code></td><td class="topAlign">export all of this object's contents</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::ExportChildObjects</code></td><td class="topAlign tblval"><code>0x1000</code></td><td class="topAlign">export this object's child objects</td></tr>
</table></div>
<p>The RegisterOptions type is a typedef for <a href="../qtcore/qflags.html">QFlags</a>&lt;RegisterOption&gt;. It stores an OR combination of RegisterOption values.</p>
<p><b>See also </b><a href="qdbusconnection.html#registerObject">registerObject</a>(), <a href="qdbusabstractadaptor.html">QDBusAbstractAdaptor</a>, and <a href="usingadaptors.html">Using adaptors</a>.</p>
<!-- @@@RegisterOption -->
<!-- $$$UnregisterMode$$$UnregisterNode$$$UnregisterTree -->
<h3 class="fn" id="UnregisterMode-enum"><a name="UnregisterMode-enum"></a>enum QDBusConnection::<span class="name">UnregisterMode</span></h3>
<p>The mode for unregistering an object path:</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QDBusConnection::UnregisterNode</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">unregister this node only: do not unregister child objects</td></tr>
<tr><td class="topAlign"><code>QDBusConnection::UnregisterTree</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">unregister this node and all its sub-tree</td></tr>
</table></div>
<p>Note, however, if this object was registered with the <a href="qdbusconnection.html#RegisterOption-enum">ExportChildObjects</a> option, UnregisterNode will unregister the child objects too.</p>
<!-- @@@UnregisterMode -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QDBusConnection[overload1]$$$QDBusConnectionconstQString& -->
<h3 class="fn" id="QDBusConnection"><a name="QDBusConnection"></a>QDBusConnection::<span class="name">QDBusConnection</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>)</h3>
<p>Creates a <a href="qdbusconnection.html">QDBusConnection</a> object attached to the connection with name <i>name</i>.</p>
<p>This does not open the connection. You have to call <a href="qdbusconnection.html#connectToBus">connectToBus</a>() to open it.</p>
<!-- @@@QDBusConnection -->
<!-- $$$QDBusConnection$$$QDBusConnectionconstQDBusConnection& -->
<h3 class="fn" id="QDBusConnection-1"><a name="QDBusConnection-1"></a>QDBusConnection::<span class="name">QDBusConnection</span>(const <span class="type"><a href="qdbusconnection.html#QDBusConnection">QDBusConnection</a></span> &amp;<i>other</i>)</h3>
<p>Creates a copy of the <i>other</i> connection.</p>
<!-- @@@QDBusConnection -->
<!-- $$$QDBusConnection$$$QDBusConnectionQDBusConnection&& -->
<h3 class="fn" id="QDBusConnection-2"><a name="QDBusConnection-2"></a>QDBusConnection::<span class="name">QDBusConnection</span>(<span class="type"><a href="qdbusconnection.html#QDBusConnection">QDBusConnection</a></span> &amp;&amp;<i>other</i>)</h3>
<p>Move-copy constructor.</p><!-- @@@QDBusConnection -->
<!-- $$$~QDBusConnection[overload1]$$$~QDBusConnection -->
<h3 class="fn" id="dtor.QDBusConnection"><a name="dtor.QDBusConnection"></a>QDBusConnection::<span class="name">~QDBusConnection</span>()</h3>
<p>Disposes of this object. This does not close the connection: you have to call <a href="qdbusconnection.html#disconnectFromBus">disconnectFromBus</a>() to do that.</p>
<!-- @@@~QDBusConnection -->
<!-- $$$asyncCall[overload1]$$$asyncCallconstQDBusMessage&int -->
<h3 class="fn" id="asyncCall"><a name="asyncCall"></a><span class="type"><a href="qdbuspendingcall.html">QDBusPendingCall</a></span> QDBusConnection::<span class="name">asyncCall</span>(const <span class="type"><a href="qdbusmessage.html">QDBusMessage</a></span> &amp;<i>message</i>, <span class="type">int</span> <i>timeout</i> = -1) const</h3>
<p>Sends the <i>message</i> over this connection and returns immediately. This function is suitable for method calls only. It returns an object of type <a href="qdbuspendingcall.html">QDBusPendingCall</a> which can be used to track the status of the reply.</p>
<p>If no reply is received within <i>timeout</i> milliseconds, an automatic error will be delivered indicating the expiration of the call. The default <i>timeout</i> is -1, which will be replaced with an implementation-defined value that is suitable for inter-process communications (generally, 25 seconds). This timeout is also the upper limit for waiting in QDBusPendingCall::waitForFinished().</p>
<p>See the <a href="qdbusabstractinterface.html#asyncCall">QDBusInterface::asyncCall</a>() function for a more friendly way of placing calls.</p>
<p>This function was introduced in  Qt 4.5.</p>
<!-- @@@asyncCall -->
<!-- $$$baseService[overload1]$$$baseService -->
<h3 class="fn" id="baseService"><a name="baseService"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QDBusConnection::<span class="name">baseService</span>() const</h3>
<p>Returns the unique connection name for this connection, if this <a href="qdbusconnection.html">QDBusConnection</a> object is connected, or an empty <a href="../qtcore/qstring.html">QString</a> otherwise.</p>
<p>A Unique Connection Name is a string in the form &quot;:x.xxx&quot; (where x are decimal digits) that is assigned by the D-Bus server daemon upon connection. It uniquely identifies this client in the bus.</p>
<p>This function returns an empty <a href="../qtcore/qstring.html">QString</a> for peer-to-peer connections.</p>
<!-- @@@baseService -->
<!-- $$$call[overload1]$$$callconstQDBusMessage&QDBus::CallModeint -->
<h3 class="fn" id="call"><a name="call"></a><span class="type"><a href="qdbusmessage.html">QDBusMessage</a></span> QDBusConnection::<span class="name">call</span>(const <span class="type"><a href="qdbusmessage.html">QDBusMessage</a></span> &amp;<i>message</i>, <span class="type"><a href="qdbus.html#CallMode-enum">QDBus::CallMode</a></span> <i>mode</i> = QDBus::Block, <span class="type">int</span> <i>timeout</i> = -1) const</h3>
<p>Sends the <i>message</i> over this connection and blocks, waiting for a reply, for at most <i>timeout</i> milliseconds. This function is suitable for method calls only. It returns the reply message as its return value, which will be either of type <a href="qdbusmessage.html#MessageType-enum">QDBusMessage::ReplyMessage</a> or <a href="qdbusmessage.html#MessageType-enum">QDBusMessage::ErrorMessage</a>.</p>
<p>If no reply is received within <i>timeout</i> milliseconds, an automatic error will be delivered indicating the expiration of the call. The default <i>timeout</i> is -1, which will be replaced with an implementation-defined value that is suitable for inter-process communications (generally, 25 seconds).</p>
<p>See the <a href="qdbusabstractinterface.html#call">QDBusInterface::call</a>() function for a more friendly way of placing calls.</p>
<p><b>Warning:</b> If <i>mode</i> is <a href="qdbus.html#CallMode-enum">QDBus::BlockWithGui</a>, this function will reenter the Qt event loop in order to wait for the reply. 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 call().</p>
<!-- @@@call -->
<!-- $$$callWithCallback[overload1]$$$callWithCallbackconstQDBusMessage&QObject*constchar*constchar*int -->
<h3 class="fn" id="callWithCallback"><a name="callWithCallback"></a><span class="type">bool</span> QDBusConnection::<span class="name">callWithCallback</span>(const <span class="type"><a href="qdbusmessage.html">QDBusMessage</a></span> &amp;<i>message</i>, <span class="type"><a href="../qtcore/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>, <span class="type">int</span> <i>timeout</i> = -1) const</h3>
<p>Sends the <i>message</i> over this connection and returns immediately. When the reply is received, the method <i>returnMethod</i> is called in the <i>receiver</i> object. If an error occurs, the method <i>errorMethod</i> will be called instead.</p>
<p>If no reply is received within <i>timeout</i> milliseconds, an automatic error will be delivered indicating the expiration of the call. The default <i>timeout</i> is -1, which will be replaced with an implementation-defined value that is suitable for inter-process communications (generally, 25 seconds).</p>
<p>This function is suitable for method calls only. It is guaranteed that the slot will be called exactly once with the reply, as long as the parameter types match and no error occurs.</p>
<p>Returns <code>true</code> if the message was sent, or false if the message could not be sent.</p>
<!-- @@@callWithCallback -->
<!-- $$$connect[overload1]$$$connectconstQString&constQString&constQString&constQString&QObject*constchar* -->
<h3 class="fn" id="connect"><a name="connect"></a><span class="type">bool</span> QDBusConnection::<span class="name">connect</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>service</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>path</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>interface</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>, <span class="type"><a href="../qtcore/qobject.html">QObject</a></span> *<i>receiver</i>, const <span class="type">char</span> *<i>slot</i>)</h3>
<p>Connects the signal specified by the <i>service</i>, <i>path</i>, <i>interface</i> and <i>name</i> parameters to the slot <i>slot</i> in object <i>receiver</i>. The arguments <i>service</i> and <i>path</i> can be empty, denoting a connection to any signal of the (<i>interface</i>, <i>name</i>) pair, from any remote application.</p>
<p>Returns <code>true</code> if the connection was successful.</p>
<p><b>Warning:</b> The signal will only be delivered to the slot if the parameters match. This verification can be done only when the signal is received, not at connection time.</p>
<!-- @@@connect -->
<!-- $$$connect$$$connectconstQString&constQString&constQString&constQString&constQString&QObject*constchar* -->
<h3 class="fn" id="connect-1"><a name="connect-1"></a><span class="type">bool</span> QDBusConnection::<span class="name">connect</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>service</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>path</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>interface</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>signature</i>, <span class="type"><a href="../qtcore/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>Connects the signal to the slot <i>slot</i> in object <i>receiver</i>. Unlike the previous <a href="qdbusconnection.html#connect">connect</a>() overload, this function allows one to specify the parameter signature to be connected using the <i>signature</i> variable. The function will then verify that this signature can be delivered to the slot specified by <i>slot</i> and return false otherwise.</p>
<p>Returns <code>true</code> if the connection was successful.</p>
<p><b>Note: </b>This function verifies that the signal signature matches the slot's parameters, but it does not verify that the actual signal exists with the given signature in the remote service.</p><!-- @@@connect -->
<!-- $$$connect$$$connectconstQString&constQString&constQString&constQString&constQStringList&constQString&QObject*constchar* -->
<h3 class="fn" id="connect-2"><a name="connect-2"></a><span class="type">bool</span> QDBusConnection::<span class="name">connect</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>service</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>path</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>interface</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>, const <span class="type"><a href="../qtcore/qstringlist.html">QStringList</a></span> &amp;<i>argumentMatch</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>signature</i>, <span class="type"><a href="../qtcore/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>Connects the signal to the slot <i>slot</i> in object <i>receiver</i>. Unlike the previous <a href="qdbusconnection.html#connect">connect</a>() overload, this function allows one to specify the parameter signature to be connected using the <i>signature</i> variable. The function will then verify that this signature can be delivered to the slot specified by <i>slot</i> and return false otherwise.</p>
<p>The <i>argumentMatch</i> parameter lists the string parameters to be matched, in sequential order. Note that, to match an empty string, you need to pass a <a href="../qtcore/qstring.html">QString</a> that is empty but not null (i.e&#x2e;, <a href="../qtcore/qstring.html">QString</a>(&quot;&quot;)). A null <a href="../qtcore/qstring.html">QString</a> skips matching at that position.</p>
<p>Returns <code>true</code> if the connection was successful.</p>
<p><b>Note: </b>This function verifies that the signal signature matches the slot's parameters, but it does not verify that the actual signal exists with the given signature in the remote service.</p><p>This function was introduced in  Qt 4.6.</p>
<!-- @@@connect -->
<!-- $$$connectToBus[overload1]$$$connectToBusBusTypeconstQString& -->
<h3 class="fn" id="connectToBus"><a name="connectToBus"></a><code>[static] </code><span class="type"><a href="qdbusconnection.html#QDBusConnection">QDBusConnection</a></span> QDBusConnection::<span class="name">connectToBus</span>(<span class="type"><a href="qdbusconnection.html#BusType-enum">BusType</a></span> <i>type</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>)</h3>
<p>Opens a connection of type <i>type</i> to one of the known busses and associate with it the connection name <i>name</i>. Returns a <a href="qdbusconnection.html">QDBusConnection</a> object associated with that connection.</p>
<!-- @@@connectToBus -->
<!-- $$$connectToBus$$$connectToBusconstQString&constQString& -->
<h3 class="fn" id="connectToBus-1"><a name="connectToBus-1"></a><code>[static] </code><span class="type"><a href="qdbusconnection.html#QDBusConnection">QDBusConnection</a></span> QDBusConnection::<span class="name">connectToBus</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>address</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>)</h3>
<p>Opens a connection to a private bus on address <i>address</i> and associate with it the connection name <i>name</i>. Returns a <a href="qdbusconnection.html">QDBusConnection</a> object associated with that connection.</p>
<!-- @@@connectToBus -->
<!-- $$$connectToPeer[overload1]$$$connectToPeerconstQString&constQString& -->
<h3 class="fn" id="connectToPeer"><a name="connectToPeer"></a><code>[static] </code><span class="type"><a href="qdbusconnection.html#QDBusConnection">QDBusConnection</a></span> QDBusConnection::<span class="name">connectToPeer</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>address</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>)</h3>
<p>Opens a peer-to-peer connection on address <i>address</i> and associate with it the connection name <i>name</i>. Returns a <a href="qdbusconnection.html">QDBusConnection</a> object associated with that connection.</p>
<p>This function was introduced in  Qt 4.8.</p>
<!-- @@@connectToPeer -->
<!-- $$$connectionCapabilities[overload1]$$$connectionCapabilities -->
<h3 class="fn" id="connectionCapabilities"><a name="connectionCapabilities"></a><span class="type"><a href="qdbusconnection.html#ConnectionCapability-enum">ConnectionCapabilities</a></span> QDBusConnection::<span class="name">connectionCapabilities</span>() const</h3>
<p>Returns the capabilities of this connection as negotiated with the bus server or peer. If this <a href="qdbusconnection.html">QDBusConnection</a> is not connected, this function returns no capabilities.</p>
<p>This function was introduced in  Qt 4.8.</p>
<!-- @@@connectionCapabilities -->
<!-- $$$disconnect[overload1]$$$disconnectconstQString&constQString&constQString&constQString&QObject*constchar* -->
<h3 class="fn" id="disconnect"><a name="disconnect"></a><span class="type">bool</span> QDBusConnection::<span class="name">disconnect</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>service</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>path</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>interface</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>, <span class="type"><a href="../qtcore/qobject.html">QObject</a></span> *<i>receiver</i>, const <span class="type">char</span> *<i>slot</i>)</h3>
<p>Disconnects the signal specified by the <i>service</i>, <i>path</i>, <i>interface</i> and <i>name</i> parameters from the slot <i>slot</i> in object <i>receiver</i>. The arguments must be the same as passed to the <a href="qdbusconnection.html#connect">connect</a>() function.</p>
<p>Returns <code>true</code> if the disconnection was successful.</p>
<!-- @@@disconnect -->
<!-- $$$disconnect$$$disconnectconstQString&constQString&constQString&constQString&constQString&QObject*constchar* -->
<h3 class="fn" id="disconnect-1"><a name="disconnect-1"></a><span class="type">bool</span> QDBusConnection::<span class="name">disconnect</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>service</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>path</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>interface</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>signature</i>, <span class="type"><a href="../qtcore/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>Disconnects the signal specified by the <i>service</i>, <i>path</i>, <i>interface</i>, <i>name</i>, and <i>signature</i> parameters from the slot <i>slot</i> in object <i>receiver</i>. The arguments must be the same as passed to the <a href="qdbusconnection.html#connect">connect</a>() function.</p>
<p>Returns <code>true</code> if the disconnection was successful.</p>
<!-- @@@disconnect -->
<!-- $$$disconnect$$$disconnectconstQString&constQString&constQString&constQString&constQStringList&constQString&QObject*constchar* -->
<h3 class="fn" id="disconnect-2"><a name="disconnect-2"></a><span class="type">bool</span> QDBusConnection::<span class="name">disconnect</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>service</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>path</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>interface</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>, const <span class="type"><a href="../qtcore/qstringlist.html">QStringList</a></span> &amp;<i>argumentMatch</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>signature</i>, <span class="type"><a href="../qtcore/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>Disconnects the signal specified by the <i>service</i>, <i>path</i>, <i>interface</i>, <i>name</i>, <i>argumentMatch</i>, and <i>signature</i> parameters from the slot <i>slot</i> in object <i>receiver</i>. The arguments must be the same as passed to the <a href="qdbusconnection.html#connect">connect</a>() function.</p>
<p>Returns <code>true</code> if the disconnection was successful.</p>
<p>This function was introduced in  Qt 4.6.</p>
<!-- @@@disconnect -->
<!-- $$$disconnectFromBus[overload1]$$$disconnectFromBusconstQString& -->
<h3 class="fn" id="disconnectFromBus"><a name="disconnectFromBus"></a><code>[static] </code><span class="type">void</span> QDBusConnection::<span class="name">disconnectFromBus</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>)</h3>
<p>Closes the bus connection of name <i>name</i>.</p>
<p>Note that if there are still <a href="qdbusconnection.html">QDBusConnection</a> objects associated with the same connection, the connection will not be closed until all references are dropped. However, no further references can be created using the <a href="qdbusconnection.html">QDBusConnection</a> constructor.</p>
<!-- @@@disconnectFromBus -->
<!-- $$$disconnectFromPeer[overload1]$$$disconnectFromPeerconstQString& -->
<h3 class="fn" id="disconnectFromPeer"><a name="disconnectFromPeer"></a><code>[static] </code><span class="type">void</span> QDBusConnection::<span class="name">disconnectFromPeer</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>)</h3>
<p>Closes the peer connection of name <i>name</i>.</p>
<p>Note that if there are still <a href="qdbusconnection.html">QDBusConnection</a> objects associated with the same connection, the connection will not be closed until all references are dropped. However, no further references can be created using the <a href="qdbusconnection.html">QDBusConnection</a> constructor.</p>
<p>This function was introduced in  Qt 4.8.</p>
<!-- @@@disconnectFromPeer -->
<!-- $$$interface[overload1]$$$interface -->
<h3 class="fn" id="interface"><a name="interface"></a><span class="type"><a href="qdbusconnectioninterface.html">QDBusConnectionInterface</a></span> *QDBusConnection::<span class="name">interface</span>() const</h3>
<p>Returns a <a href="qdbusconnectioninterface.html">QDBusConnectionInterface</a> object that represents the D-Bus server interface on this connection.</p>
<!-- @@@interface -->
<!-- $$$isConnected[overload1]$$$isConnected -->
<h3 class="fn" id="isConnected"><a name="isConnected"></a><span class="type">bool</span> QDBusConnection::<span class="name">isConnected</span>() const</h3>
<p>Returns <code>true</code> if this <a href="qdbusconnection.html">QDBusConnection</a> object is connected.</p>
<!-- @@@isConnected -->
<!-- $$$lastError[overload1]$$$lastError -->
<h3 class="fn" id="lastError"><a name="lastError"></a><span class="type"><a href="qdbuserror.html">QDBusError</a></span> QDBusConnection::<span class="name">lastError</span>() const</h3>
<p>Returns the last error that happened in this connection.</p>
<p>This function is provided for low-level code. If you're using <a href="qdbusabstractinterface.html#call">QDBusInterface::call</a>(), error codes are reported by its return value.</p>
<p><b>See also </b><a href="qdbusinterface.html">QDBusInterface</a> and <a href="qdbusmessage.html">QDBusMessage</a>.</p>
<!-- @@@lastError -->
<!-- $$$localMachineId[overload1]$$$localMachineId -->
<h3 class="fn" id="localMachineId"><a name="localMachineId"></a><code>[static] </code><span class="type"><a href="../qtcore/qbytearray.html">QByteArray</a></span> QDBusConnection::<span class="name">localMachineId</span>()</h3>
<p>Returns the local machine ID as known to the D-Bus system. Each node or host that runs D-Bus has a unique identifier that can be used to distinguish it from other hosts if they are sharing resources like the filesystem.</p>
<p>Note that the local machine ID is not guaranteed to be persistent across boots of the system, so this identifier should not be stored in persistent storage (like the filesystem). It is guaranteed to remain constant only during the lifetime of this boot session.</p>
<p>This function was introduced in  Qt 4.8.</p>
<!-- @@@localMachineId -->
<!-- $$$name[overload1]$$$name -->
<h3 class="fn" id="name"><a name="name"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QDBusConnection::<span class="name">name</span>() const</h3>
<p>Returns the connection name for this connection, as given as the name parameter to <a href="qdbusconnection.html#connectToBus">connectToBus</a>().</p>
<p>The connection name can be used to uniquely identify actual underlying connections to buses. Copies made from a single connection will always implicitly share the underlying connection, and hence will have the same connection name.</p>
<p>Inversely, two connections having different connection names will always either be connected to different buses, or have a different unique name (as returned by <a href="qdbusconnection.html#baseService">baseService</a>()) on that bus.</p>
<p>This function was introduced in  Qt 4.5.</p>
<p><b>See also </b><a href="qdbusconnection.html#connectToBus">connectToBus</a>() and <a href="qdbusconnection.html#disconnectFromBus">disconnectFromBus</a>().</p>
<!-- @@@name -->
<!-- $$$objectRegisteredAt[overload1]$$$objectRegisteredAtconstQString& -->
<h3 class="fn" id="objectRegisteredAt"><a name="objectRegisteredAt"></a><span class="type"><a href="../qtcore/qobject.html">QObject</a></span> *QDBusConnection::<span class="name">objectRegisteredAt</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>path</i>) const</h3>
<p>Return the object that was registered with the <a href="qdbusconnection.html#registerObject">registerObject</a>() at the object path given by <i>path</i>.</p>
<!-- @@@objectRegisteredAt -->
<!-- $$$registerObject[overload1]$$$registerObjectconstQString&QObject*RegisterOptions -->
<h3 class="fn" id="registerObject"><a name="registerObject"></a><span class="type">bool</span> QDBusConnection::<span class="name">registerObject</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>path</i>, <span class="type"><a href="../qtcore/qobject.html">QObject</a></span> *<i>object</i>, <span class="type"><a href="qdbusconnection.html#RegisterOption-enum">RegisterOptions</a></span> <i>options</i> = ExportAdaptors)</h3>
<p>Registers the object <i>object</i> at path <i>path</i> and returns <code>true</code> if the registration was successful. The <i>options</i> parameter specifies how much of the object <i>object</i> will be exposed through D-Bus.</p>
<p>This function does not replace existing objects: if there is already an object registered at path <i>path</i>, this function will return false. Use <a href="qdbusconnection.html#unregisterObject">unregisterObject</a>() to unregister it first.</p>
<p>You cannot register an object as a child object of an object that was registered with <a href="qdbusconnection.html#RegisterOption-enum">QDBusConnection::ExportChildObjects</a>.</p>
<!-- @@@registerObject -->
<!-- $$$registerObject$$$registerObjectconstQString&constQString&QObject*RegisterOptions -->
<h3 class="fn" id="registerObject-1"><a name="registerObject-1"></a><span class="type">bool</span> QDBusConnection::<span class="name">registerObject</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>path</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>interface</i>, <span class="type"><a href="../qtcore/qobject.html">QObject</a></span> *<i>object</i>, <span class="type"><a href="qdbusconnection.html#RegisterOption-enum">RegisterOptions</a></span> <i>options</i> = ExportAdaptors)</h3>
<p>This is an overloaded function.</p>
<p>Registers the object <i>object</i> at path <i>path</i> with interface name <i>interface</i> and returns <code>true</code> if the registration was successful. The <i>options</i> parameter specifies how much of the object <i>object</i> will be exposed through D-Bus.</p>
<p>This function does not replace existing objects: if there is already an object registered at path <i>path</i>, this function will return false. Use <a href="qdbusconnection.html#unregisterObject">unregisterObject</a>() to unregister it first.</p>
<p>You cannot register an object as a child object of an object that was registered with <a href="qdbusconnection.html#RegisterOption-enum">QDBusConnection::ExportChildObjects</a>.</p>
<p>This function was introduced in  Qt 5.5.</p>
<!-- @@@registerObject -->
<!-- $$$registerService[overload1]$$$registerServiceconstQString& -->
<h3 class="fn" id="registerService"><a name="registerService"></a><span class="type">bool</span> QDBusConnection::<span class="name">registerService</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>serviceName</i>)</h3>
<p>Attempts to register the <i>serviceName</i> on the D-Bus server and returns <code>true</code> if the registration succeeded. The registration will fail if the name is already registered by another application.</p>
<p><b>See also </b><a href="qdbusconnection.html#unregisterService">unregisterService</a>() and <a href="qdbusconnectioninterface.html#registerService">QDBusConnectionInterface::registerService</a>().</p>
<!-- @@@registerService -->
<!-- $$$send[overload1]$$$sendconstQDBusMessage& -->
<h3 class="fn" id="send"><a name="send"></a><span class="type">bool</span> QDBusConnection::<span class="name">send</span>(const <span class="type"><a href="qdbusmessage.html">QDBusMessage</a></span> &amp;<i>message</i>) const</h3>
<p>Sends the <i>message</i> over this connection, without waiting for a reply. This is suitable for errors, signals, and return values as well as calls whose return values are not necessary.</p>
<p>Returns <code>true</code> if the message was queued successfully, false otherwise.</p>
<!-- @@@send -->
<!-- $$$sessionBus[overload1]$$$sessionBus -->
<h3 class="fn" id="sessionBus"><a name="sessionBus"></a><code>[static] </code><span class="type"><a href="qdbusconnection.html#QDBusConnection">QDBusConnection</a></span> QDBusConnection::<span class="name">sessionBus</span>()</h3>
<p>Returns a <a href="qdbusconnection.html">QDBusConnection</a> object opened with the session bus. The object reference returned by this function is valid until the application terminates, at which point the connection will be closed and the object deleted.</p>
<!-- @@@sessionBus -->
<!-- $$$swap[overload1]$$$swapQDBusConnection& -->
<h3 class="fn" id="swap"><a name="swap"></a><span class="type">void</span> QDBusConnection::<span class="name">swap</span>(<span class="type"><a href="qdbusconnection.html#QDBusConnection">QDBusConnection</a></span> &amp;<i>other</i>)</h3>
<!-- @@@swap -->
<!-- $$$systemBus[overload1]$$$systemBus -->
<h3 class="fn" id="systemBus"><a name="systemBus"></a><code>[static] </code><span class="type"><a href="qdbusconnection.html#QDBusConnection">QDBusConnection</a></span> QDBusConnection::<span class="name">systemBus</span>()</h3>
<p>Returns a <a href="qdbusconnection.html">QDBusConnection</a> object opened with the system bus. The object reference returned by this function is valid until the <a href="../qtcore/qcoreapplication.html">QCoreApplication</a>'s destructor is run, when the connection will be closed and the object, deleted.</p>
<!-- @@@systemBus -->
<!-- $$$unregisterObject[overload1]$$$unregisterObjectconstQString&UnregisterMode -->
<h3 class="fn" id="unregisterObject"><a name="unregisterObject"></a><span class="type">void</span> QDBusConnection::<span class="name">unregisterObject</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>path</i>, <span class="type"><a href="qdbusconnection.html#UnregisterMode-enum">UnregisterMode</a></span> <i>mode</i> = UnregisterNode)</h3>
<p>Unregisters an object that was registered with the <a href="qdbusconnection.html#registerObject">registerObject</a>() at the object path given by <i>path</i> and, if <i>mode</i> is <a href="qdbusconnection.html#UnregisterMode-enum">QDBusConnection::UnregisterTree</a>, all of its sub-objects too.</p>
<p>Note that you cannot unregister objects that were not registered with <a href="qdbusconnection.html#registerObject">registerObject</a>().</p>
<!-- @@@unregisterObject -->
<!-- $$$unregisterService[overload1]$$$unregisterServiceconstQString& -->
<h3 class="fn" id="unregisterService"><a name="unregisterService"></a><span class="type">bool</span> QDBusConnection::<span class="name">unregisterService</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>serviceName</i>)</h3>
<p>Unregisters the service <i>serviceName</i> that was previously registered with <a href="qdbusconnection.html#registerService">registerService</a>() and returns <code>true</code> if it succeeded.</p>
<p><b>See also </b><a href="qdbusconnection.html#registerService">registerService</a>() and <a href="qdbusconnectioninterface.html#unregisterService">QDBusConnectionInterface::unregisterService</a>().</p>
<!-- @@@unregisterService -->
<!-- $$$operator=[overload1]$$$operator=QDBusConnection&& -->
<h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type"><a href="qdbusconnection.html#QDBusConnection">QDBusConnection</a></span> &amp;QDBusConnection::<span class="name">operator=</span>(<span class="type"><a href="qdbusconnection.html#QDBusConnection">QDBusConnection</a></span> &amp;&amp;<i>other</i>)</h3>
<p>Move-assignment operator.</p><!-- @@@operator= -->
<!-- $$$operator=$$$operator=constQDBusConnection& -->
<h3 class="fn" id="operator-eq-1"><a name="operator-eq-1"></a><span class="type"><a href="qdbusconnection.html#QDBusConnection">QDBusConnection</a></span> &amp;QDBusConnection::<span class="name">operator=</span>(const <span class="type"><a href="qdbusconnection.html#QDBusConnection">QDBusConnection</a></span> &amp;<i>other</i>)</h3>
<p>Creates a copy of the connection <i>other</i> in this object. Note that the connection this object referenced before the copy, is not spontaneously disconnected.</p>
<p><b>See also </b><a href="qdbusconnection.html#disconnectFromBus">disconnectFromBus</a>().</p>
<!-- @@@operator= -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    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.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>