Sophie

Sophie

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

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" />
<!-- qdbusconnectioninterface.cpp -->
  <title>Qt 4.8: QDBusConnectionInterface 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>QDBusConnectionInterface</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-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QDBusConnectionInterface Class Reference</h1>
<!-- $$$QDBusConnectionInterface-brief -->
<p>The QDBusConnectionInterface class provides access to the D-Bus bus daemon service. <a href="#details">More...</a></p>
<!-- @@@QDBusConnectionInterface -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QDBusConnectionInterface&gt;</span></pre><p><b>Inherits: </b><a href="qdbusabstractinterface.html">QDBusAbstractInterface</a>.</p>
<p>This class was introduced in Qt 4.2.</p>
<ul>
<li><a href="qdbusconnectioninterface-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#RegisterServiceReply-enum">RegisterServiceReply</a></b> { ServiceNotRegistered, ServiceRegistered, ServiceQueued }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#ServiceQueueOptions-enum">ServiceQueueOptions</a></b> { DontQueueService, QueueService, ReplaceExistingService }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#ServiceReplacementOptions-enum">ServiceReplacementOptions</a></b> { DontAllowReplacement, AllowReplacement }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="qdbusconnectioninterface.html#registeredServiceNames-prop">registeredServiceNames</a></b> : const QDBusReply&lt;QStringList&gt;</li>
</ul>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QDBusReply&lt;bool&gt; </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#isServiceRegistered">isServiceRegistered</a></b> ( const QString &amp; <i>serviceName</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusReply&lt;QDBusConnectionInterface::RegisterServiceReply&gt; </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#registerService">registerService</a></b> ( const QString &amp; <i>serviceName</i>, ServiceQueueOptions <i>qoption</i> = DontQueueService, ServiceReplacementOptions <i>roption</i> = DontAllowReplacement )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusReply&lt;QStringList&gt; </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#registeredServiceNames-prop">registeredServiceNames</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusReply&lt;QString&gt; </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#serviceOwner">serviceOwner</a></b> ( const QString &amp; <i>name</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusReply&lt;uint&gt; </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#servicePid">servicePid</a></b> ( const QString &amp; <i>serviceName</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusReply&lt;uint&gt; </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#serviceUid">serviceUid</a></b> ( const QString &amp; <i>serviceName</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusReply&lt;void&gt; </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#startService">startService</a></b> ( const QString &amp; <i>name</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusReply&lt;bool&gt; </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#unregisterService">unregisterService</a></b> ( const QString &amp; <i>serviceName</i> )</td></tr>
</table>
<ul>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#callWithCallbackFailed">callWithCallbackFailed</a></b> ( const QDBusError &amp; <i>error</i>, const QDBusMessage &amp; <i>call</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#serviceOwnerChanged">serviceOwnerChanged</a></b> ( const QString &amp; <i>name</i>, const QString &amp; <i>oldOwner</i>, const QString &amp; <i>newOwner</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#serviceRegistered">serviceRegistered</a></b> ( const QString &amp; <i>serviceName</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdbusconnectioninterface.html#serviceUnregistered">serviceUnregistered</a></b> ( const QString &amp; <i>serviceName</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">15 public functions inherited from <a href="qdbusabstractinterface.html#public-functions">QDBusAbstractInterface</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">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>
<!-- $$$QDBusConnectionInterface-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QDBusConnectionInterface class provides access to the D-Bus bus daemon service.</p>
<p>The D-Bus bus server daemon provides one special interface <tt>org.freedesktop.DBus</tt> that allows clients to access certain properties of the bus, such as the current list of clients connected. The QDBusConnectionInterface class provides access to that interface.</p>
<p>The most common uses of this class are to register and unregister service names on the bus using the <a href="qdbusconnectioninterface.html#registerService">registerService</a>() and <a href="qdbusconnectioninterface.html#unregisterService">unregisterService</a>() functions, query about existing names using the <a href="qdbusconnectioninterface.html#isServiceRegistered">isServiceRegistered</a>(), <a href="qdbusconnectioninterface.html#registeredServiceNames-prop">registeredServiceNames</a>() and <a href="qdbusconnectioninterface.html#serviceOwner">serviceOwner</a>() functions, and to receive notification that a client has registered or de-registered through the <a href="qdbusconnectioninterface.html#serviceRegistered">serviceRegistered</a>(), <a href="qdbusconnectioninterface.html#serviceUnregistered">serviceUnregistered</a>() and <a href="qdbusconnectioninterface.html#serviceOwnerChanged">serviceOwnerChanged</a>() signals.</p>
</div>
<!-- @@@QDBusConnectionInterface -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$RegisterServiceReply$$$ServiceNotRegistered$$$ServiceRegistered$$$ServiceQueued -->
<h3 class="fn"><a name="RegisterServiceReply-enum"></a>enum QDBusConnectionInterface::<span class="name">RegisterServiceReply</span></h3>
<p>The possible return values from <a href="qdbusconnectioninterface.html#registerService">registerService</a>():</p>
<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"><tt>QDBusConnectionInterface::ServiceNotRegistered</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The call failed and the service name was not registered.</td></tr>
<tr><td class="topAlign"><tt>QDBusConnectionInterface::ServiceRegistered</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The caller is now the owner of the service name.</td></tr>
<tr><td class="topAlign"><tt>QDBusConnectionInterface::ServiceQueued</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The caller specified the <a href="qdbusconnectioninterface.html#ServiceQueueOptions-enum">QueueService</a> flag and the service was already registered, so we are in queue.</td></tr>
</table>
<p>The <a href="qdbusconnectioninterface.html#serviceRegistered">serviceRegistered</a>() signal will be emitted when the service is acquired by this application.</p>
<!-- @@@RegisterServiceReply -->
<!-- $$$ServiceQueueOptions$$$DontQueueService$$$QueueService$$$ReplaceExistingService -->
<h3 class="fn"><a name="ServiceQueueOptions-enum"></a>enum QDBusConnectionInterface::<span class="name">ServiceQueueOptions</span></h3>
<p>Flags for determining how a service registration should behave, in case the service name is already registered.</p>
<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"><tt>QDBusConnectionInterface::DontQueueService</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">If an application requests a name that is already owned, no queueing will be performed. The registeredService() call will simply fail. This is the default.</td></tr>
<tr><td class="topAlign"><tt>QDBusConnectionInterface::QueueService</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Attempts to register the requested service, but do not try to replace it if another application already has it registered. Instead, simply put this application in queue, until it is given up. The <a href="qdbusconnectioninterface.html#serviceRegistered">serviceRegistered</a>() signal will be emitted when that happens.</td></tr>
<tr><td class="topAlign"><tt>QDBusConnectionInterface::ReplaceExistingService</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">If another application already has the service name registered, attempt to replace it.</td></tr>
</table>
<p><b>See also </b><a href="qdbusconnectioninterface.html#ServiceReplacementOptions-enum">ServiceReplacementOptions</a>.</p>
<!-- @@@ServiceQueueOptions -->
<!-- $$$ServiceReplacementOptions$$$DontAllowReplacement$$$AllowReplacement -->
<h3 class="fn"><a name="ServiceReplacementOptions-enum"></a>enum QDBusConnectionInterface::<span class="name">ServiceReplacementOptions</span></h3>
<p>Flags for determining if the D-Bus server should allow another application to replace a name that this application has registered with the <a href="qdbusconnectioninterface.html#ServiceQueueOptions-enum">ReplaceExistingService</a> option.</p>
<p>The possible values are:</p>
<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"><tt>QDBusConnectionInterface::DontAllowReplacement</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Do not allow another application to replace us. The service must be explicitly unregistered with <a href="qdbusconnectioninterface.html#unregisterService">unregisterService</a>() for another application to acquire it. This is the default.</td></tr>
<tr><td class="topAlign"><tt>QDBusConnectionInterface::AllowReplacement</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Allow other applications to replace us with the <a href="qdbusconnectioninterface.html#ServiceQueueOptions-enum">ReplaceExistingService</a> option to <a href="qdbusconnectioninterface.html#registerService">registerService</a>() without intervention. If that happens, the <a href="qdbusconnectioninterface.html#serviceUnregistered">serviceUnregistered</a>() signal will be emitted.</td></tr>
</table>
<p><b>See also </b><a href="qdbusconnectioninterface.html#ServiceQueueOptions-enum">ServiceQueueOptions</a>.</p>
<!-- @@@ServiceReplacementOptions -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$registeredServiceNames-prop$$$registeredServiceNames -->
<h3 class="fn"><a name="registeredServiceNames-prop"></a><span class="name">registeredServiceNames</span> : const <span class="type"><a href="qdbusreply.html">QDBusReply</a></span>&lt;<span class="type"><a href="qstringlist.html">QStringList</a></span>&gt;</h3>
<p>This property holds the registered service names.</p>
<p>Lists all names currently registered on the bus.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QDBusReply&lt;QStringList&gt; </td><td class="memItemRight bottomAlign"><span class="name"><b>registeredServiceNames</b></span> () const</td></tr>
</table>
<!-- @@@registeredServiceNames -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$callWithCallbackFailed[overload1]$$$callWithCallbackFailedconstQDBusError&constQDBusMessage& -->
<h3 class="fn"><a name="callWithCallbackFailed"></a><span class="type">void</span> QDBusConnectionInterface::<span class="name">callWithCallbackFailed</span> ( const <span class="type"><a href="qdbuserror.html">QDBusError</a></span> &amp; <i>error</i>, const <span class="type"><a href="qdbusmessage.html">QDBusMessage</a></span> &amp; <i>call</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when there is an error during a <a href="qdbusconnection.html#callWithCallback">QDBusConnection::callWithCallback</a>(). <i>error</i> specifies the error. <i>call</i> is the message that couldn't be delivered.</p>
<p><b>See also </b><a href="qdbusconnection.html#callWithCallback">QDBusConnection::callWithCallback</a>().</p>
<!-- @@@callWithCallbackFailed -->
<!-- $$$isServiceRegistered[overload1]$$$isServiceRegisteredconstQString& -->
<h3 class="fn"><a name="isServiceRegistered"></a><span class="type"><a href="qdbusreply.html">QDBusReply</a></span>&lt;<span class="type">bool</span>&gt; QDBusConnectionInterface::<span class="name">isServiceRegistered</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>serviceName</i> ) const<tt> [slot]</tt></h3>
<p>Returns true if the service name <i>serviceName</i> has is currently registered.</p>
<!-- @@@isServiceRegistered -->
<!-- $$$registerService[overload1]$$$registerServiceconstQString&ServiceQueueOptionsServiceReplacementOptions -->
<h3 class="fn"><a name="registerService"></a><span class="type"><a href="qdbusreply.html">QDBusReply</a></span>&lt;<span class="type"><a href="qdbusconnectioninterface.html#RegisterServiceReply-enum">QDBusConnectionInterface::RegisterServiceReply</a></span>&gt; QDBusConnectionInterface::<span class="name">registerService</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>serviceName</i>, <span class="type"><a href="qdbusconnectioninterface.html#ServiceQueueOptions-enum">ServiceQueueOptions</a></span> <i>qoption</i> = DontQueueService, <span class="type"><a href="qdbusconnectioninterface.html#ServiceReplacementOptions-enum">ServiceReplacementOptions</a></span> <i>roption</i> = DontAllowReplacement )<tt> [slot]</tt></h3>
<p>Requests to register the service name <i>serviceName</i> on the bus. The <i>qoption</i> flag specifies how the D-Bus server should behave if <i>serviceName</i> is already registered. The <i>roption</i> flag specifies if the server should allow another application to replace our registered name.</p>
<p>If the service registration succeeds, the <a href="qdbusconnectioninterface.html#serviceRegistered">serviceRegistered</a>() signal will be emitted. If we are placed in queue, the signal will be emitted when we obtain the name. If <i>roption</i> is <a href="qdbusconnectioninterface.html#ServiceReplacementOptions-enum">AllowReplacement</a>, the <a href="qdbusconnectioninterface.html#serviceUnregistered">serviceUnregistered</a>() signal will be emitted if another application replaces this one.</p>
<p><b>See also </b><a href="qdbusconnectioninterface.html#unregisterService">unregisterService</a>().</p>
<!-- @@@registerService -->
<!-- $$$serviceOwner[overload1]$$$serviceOwnerconstQString& -->
<h3 class="fn"><a name="serviceOwner"></a><span class="type"><a href="qdbusreply.html">QDBusReply</a></span>&lt;<span class="type"><a href="qstring.html">QString</a></span>&gt; QDBusConnectionInterface::<span class="name">serviceOwner</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>name</i> ) const<tt> [slot]</tt></h3>
<p>Returns the unique connection name of the primary owner of the name <i>name</i>. If the requested name doesn't have an owner, returns a <tt>org.freedesktop.DBus.Error.NameHasNoOwner</tt> error.</p>
<!-- @@@serviceOwner -->
<!-- $$$serviceOwnerChanged[overload1]$$$serviceOwnerChangedconstQString&constQString&constQString& -->
<h3 class="fn"><a name="serviceOwnerChanged"></a><span class="type">void</span> QDBusConnectionInterface::<span class="name">serviceOwnerChanged</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>name</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>oldOwner</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>newOwner</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted by the D-Bus server whenever a service ownership change happens in the bus, including apparition and disparition of names.</p>
<p>This signal means the application <i>oldOwner</i> lost ownership of bus name <i>name</i> to application <i>newOwner</i>. If <i>oldOwner</i> is an empty string, it means the name <i>name</i> has just been created; if <i>newOwner</i> is empty, the name <i>name</i> has no current owner and is no longer available.</p>
<p><b>Note:</b> connecting to this signal will make the application listen for and receive every single service ownership change on the bus. Depending on how many services are running, this make the application be activated to receive more signals than it needs. To avoid this problem, use the <a href="qdbusservicewatcher.html">QDBusServiceWatcher</a> class, which can listen for specific changes.</p>
<!-- @@@serviceOwnerChanged -->
<!-- $$$servicePid[overload1]$$$servicePidconstQString& -->
<h3 class="fn"><a name="servicePid"></a><span class="type"><a href="qdbusreply.html">QDBusReply</a></span>&lt;<span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span>&gt; QDBusConnectionInterface::<span class="name">servicePid</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>serviceName</i> ) const<tt> [slot]</tt></h3>
<p>Returns the Unix Process ID (PID) for the process currently holding the bus service <i>serviceName</i>.</p>
<!-- @@@servicePid -->
<!-- $$$serviceRegistered[overload1]$$$serviceRegisteredconstQString& -->
<h3 class="fn"><a name="serviceRegistered"></a><span class="type">void</span> QDBusConnectionInterface::<span class="name">serviceRegistered</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>serviceName</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted by the D-Bus server when the bus service name (unique connection name or well-known service name) given by <i>serviceName</i> is acquired by this application.</p>
<p>Acquisition happens after this application has requested a name using <a href="qdbusconnectioninterface.html#registerService">registerService</a>().</p>
<!-- @@@serviceRegistered -->
<!-- $$$serviceUid[overload1]$$$serviceUidconstQString& -->
<h3 class="fn"><a name="serviceUid"></a><span class="type"><a href="qdbusreply.html">QDBusReply</a></span>&lt;<span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span>&gt; QDBusConnectionInterface::<span class="name">serviceUid</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>serviceName</i> ) const<tt> [slot]</tt></h3>
<p>Returns the Unix User ID (UID) for the process currently holding the bus service <i>serviceName</i>.</p>
<!-- @@@serviceUid -->
<!-- $$$serviceUnregistered[overload1]$$$serviceUnregisteredconstQString& -->
<h3 class="fn"><a name="serviceUnregistered"></a><span class="type">void</span> QDBusConnectionInterface::<span class="name">serviceUnregistered</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>serviceName</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted by the D-Bus server when this application loses ownership of the bus service name given by <i>serviceName</i>.</p>
<!-- @@@serviceUnregistered -->
<!-- $$$startService[overload1]$$$startServiceconstQString& -->
<h3 class="fn"><a name="startService"></a><span class="type"><a href="qdbusreply.html">QDBusReply</a></span>&lt;<span class="type">void</span>&gt; QDBusConnectionInterface::<span class="name">startService</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>name</i> )<tt> [slot]</tt></h3>
<p>Requests that the bus start the service given by the name <i>name</i>.</p>
<!-- @@@startService -->
<!-- $$$unregisterService[overload1]$$$unregisterServiceconstQString& -->
<h3 class="fn"><a name="unregisterService"></a><span class="type"><a href="qdbusreply.html">QDBusReply</a></span>&lt;<span class="type">bool</span>&gt; QDBusConnectionInterface::<span class="name">unregisterService</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>serviceName</i> )<tt> [slot]</tt></h3>
<p>Releases the claim on the bus service name <i>serviceName</i>, that had been previously registered with <a href="qdbusconnectioninterface.html#registerService">registerService</a>(). If this application had ownership of the name, it will be released for other applications to claim. If it only had the name queued, it gives up its position in the queue.</p>
<!-- @@@unregisterService -->
</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>