aboutsummaryrefslogtreecommitdiff
path: root/libcontextprovider/doc/html/class_context_provider_1_1_service.html
diff options
context:
space:
mode:
Diffstat (limited to 'libcontextprovider/doc/html/class_context_provider_1_1_service.html')
-rw-r--r--libcontextprovider/doc/html/class_context_provider_1_1_service.html429
1 files changed, 429 insertions, 0 deletions
diff --git a/libcontextprovider/doc/html/class_context_provider_1_1_service.html b/libcontextprovider/doc/html/class_context_provider_1_1_service.html
new file mode 100644
index 00000000..94d717ad
--- /dev/null
+++ b/libcontextprovider/doc/html/class_context_provider_1_1_service.html
@@ -0,0 +1,429 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>libcontextprovider: ContextProvider::Service Class Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css">
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.8 -->
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+ <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+ <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+ <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
+ <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+ <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+ </ul>
+ </div>
+ <div class="navpath"><a class="el" href="namespace_context_provider.html">ContextProvider</a>::<a class="el" href="class_context_provider_1_1_service.html">Service</a>
+ </div>
+</div>
+<div class="contents">
+<h1>ContextProvider::Service Class Reference</h1><!-- doxytag: class="ContextProvider::Service" -->A <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> object is a proxy representing a service on D-Bus that implements the ContextKit interface. The lifespan of the <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> object is not tied to the real service lifespan. This way a service can be accessed and controlled from different parts of the code.
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="service_8h-source.html">service.h</a>&gt;</code>
+<p>
+
+<p>
+<a href="class_context_provider_1_1_service-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_service.html#d9cac0378bb6bc25b65526576a609c6d">Service</a> (QDBusConnection connection, QObject *parent=0)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> proxy object which shares the <em>connection</em> with the provider program. <a href="#d9cac0378bb6bc25b65526576a609c6d"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_service.html#2a7310e48f9592828aea6b3f5fda181e">Service</a> (QDBusConnection::BusType busType, const QString &amp;busName, QObject *parent=0)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A convenient constructor, where autoStart is always true. <a href="#2a7310e48f9592828aea6b3f5fda181e"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_service.html#8013904e0bb41e4b8ff0b68d4214b853">Service</a> (QDBusConnection::BusType busType, const QString &amp;busName, bool autoStart, QObject *parent=0)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> proxy object for <em>busName</em> on the bus indicated by <em>busType</em>. <a href="#8013904e0bb41e4b8ff0b68d4214b853"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_service.html#365b50365fd98d8ee7a1b7dd10dd84d2">~Service</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroys this <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> instance. <a href="#365b50365fd98d8ee7a1b7dd10dd84d2"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_service.html#6434d467cd84a6295bd24572671b5479">start</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start the <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> again after it has been stopped. <a href="#6434d467cd84a6295bd24572671b5479"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_service.html#25cc85c61a07afe679266fc287da0677">stop</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop the service. <a href="#25cc85c61a07afe679266fc287da0677"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_service.html#471dbe35bbd9583f9404b15158f367dd">restart</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop and start the service. <a href="#471dbe35bbd9583f9404b15158f367dd"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_service.html#385b58aef7878b6e33a3989d139f9a4a">setAsDefault</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> object as the default one to use when constructing <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> objects. <a href="#385b58aef7878b6e33a3989d139f9a4a"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_service.html#ee524632842792e9ad80b122eb8600a1">setValue</a> (const QString &amp;key, const QVariant &amp;val)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the value of <em>key</em> to <em>val</em>. <a href="#ee524632842792e9ad80b122eb8600a1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_service.html#d6bf1d2d8f8c580d4d77e9c4e72fd226">setConnection</a> (const QDBusConnection &amp;connection)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set (override) the QDBusConnection used by the <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a>. <a href="#d6bf1d2d8f8c580d4d77e9c4e72fd226"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_service.html#386f5a9cf65610cb62143865e5637272">Property</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_service.html#c3553c08a0c7b57a4c15794caebf1936">::ServiceUnitTest</a></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+A <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> object is a proxy representing a service on D-Bus that implements the ContextKit interface. The lifespan of the <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> object is not tied to the real service lifespan. This way a service can be accessed and controlled from different parts of the code.
+<p>
+When you first create a <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> object with given bus type / bus name parameters the real D-Bus service instance is actually created and started. Future references to this bus type / bus name will give you a <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> instance that points to the very same service as the first <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> initialization that started it. In other words, we can say that the <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> class represents a proxy interface to the real D-Bus service.<p>
+When the last instance of <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> is destroyed, the real service is automatically terminated and destroyed (there is a simple ref counting mechanism involved to guarantee that).<p>
+Consider the following examples:<p>
+<div class="fragment"><pre class="fragment"> <a class="code" href="class_context_provider_1_1_service.html#d9cac0378bb6bc25b65526576a609c6d" title="Creates a Service proxy object which shares the connection with the provider program...">Service</a> *s1 = <span class="keyword">new</span> <a class="code" href="class_context_provider_1_1_service.html#d9cac0378bb6bc25b65526576a609c6d" title="Creates a Service proxy object which shares the connection with the provider program...">Service</a>(QDBusConnection::SessionBus, <span class="stringliteral">"com.example.simple"</span>);
+ <a class="code" href="class_context_provider_1_1_service.html#d9cac0378bb6bc25b65526576a609c6d" title="Creates a Service proxy object which shares the connection with the provider program...">Service</a> *s2 = <span class="keyword">new</span> <a class="code" href="class_context_provider_1_1_service.html#d9cac0378bb6bc25b65526576a609c6d" title="Creates a Service proxy object which shares the connection with the provider program...">Service</a>(QDBusConnection::SessionBus, <span class="stringliteral">"com.example.simple"</span>);
+ <span class="comment">// s1 and s2 represent the same service</span>
+
+ s2-&gt;stop();
+ <span class="comment">// Both s1 and s2 are now stopped</span>
+
+ s1-&gt;start();
+ <span class="comment">// Both s1 and s2 are now started</span>
+
+ <span class="keyword">delete</span> s1; <span class="comment">// s2 is still valid, service is present</span>
+ <span class="keyword">delete</span> s2; <span class="comment">// the "com.example.simple" just disappeared from D-Bus</span>
+</pre></div><p>
+Every <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> object must be associated with a <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> object.<p>
+A <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> can be running or stopped. When it is running, it is visible via D-Bus and clients can subscribe to its properties.<p>
+It is undefined what happens when you add a <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> object to a running service. Likewise, it is undefined what happens when you add a <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> to a <a class="el" href="class_context_provider_1_1_group.html" title="Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple Property...">Group</a> while the <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> of that <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> object is running.<p>
+Thus, it is best to create a <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> object, add all <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> objects to it immediately, create the <a class="el" href="class_context_provider_1_1_group.html" title="Groups the firstSubscriberAppeared and lastSubscriberDisappeared from multiple Property...">Group</a> objects for them, and then enter the main loop.<p>
+Libcontextprovider can share the same QDBusConnection that is used in the provider program. In that case, the <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> must be created by passing the QDBusConnection. The <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> will not register any service name on the connection. It is advisable to register the service name as late as possible, after initializing all Services and Properties and after registering other objects the provider declares on D-Bus.<p>
+<div class="fragment"><pre class="fragment"> <span class="keywordtype">int</span> main(<span class="keywordtype">int</span> <a class="code" href="contextc_8cpp.html#d1447518f4372828b8435ae82e48499e">argc</a>, <span class="keywordtype">char</span>** <a class="code" href="contextc_8cpp.html#34d7542664850bdf79197020d3e9532f">argv</a>) {
+ QCoreApplication <a class="code" href="contextc_8cpp.html#b751c4ea835b01f1db167e4fbc8f042d">app</a>(argc, argv);
+ QDBusConnection systemBus = QDBusConnection::SystemBus();
+
+ <span class="comment">// D-Bus registrations can happen before or after initializing</span>
+ <span class="comment">// the Services and Properties</span>
+ connection.registerObject(...);
+
+ <span class="comment">// Now myService will share the connection and won't register</span>
+ <span class="comment">// any service name</span>
+ <a class="code" href="class_context_provider_1_1_service.html#d9cac0378bb6bc25b65526576a609c6d" title="Creates a Service proxy object which shares the connection with the provider program...">Service</a> *myService = <span class="keyword">new</span> <a class="code" href="class_context_provider_1_1_service.html#d9cac0378bb6bc25b65526576a609c6d" title="Creates a Service proxy object which shares the connection with the provider program...">Service</a>(systemBus);
+ <a class="code" href="class_context_provider_1_1_service.html#386f5a9cf65610cb62143865e5637272">Property</a>* <span class="keyword">property</span> = <span class="keyword">new</span> <a class="code" href="class_context_provider_1_1_service.html#386f5a9cf65610cb62143865e5637272">Property</a>(myService, <span class="stringliteral">"My.Property"</span>);
+
+ <span class="comment">// Important: registering the service name should be done as</span>
+ <span class="comment">// late as possible, to prevent clients from connecting to us</span>
+ <span class="comment">// before all objects have been registered.</span>
+ connection.registerService(<span class="stringliteral">"my.service.name"</span>);
+
+ <span class="keywordflow">return</span> <a class="code" href="contextc_8cpp.html#b751c4ea835b01f1db167e4fbc8f042d">app</a>.exec();
+ }
+</pre></div> <hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="d9cac0378bb6bc25b65526576a609c6d"></a><!-- doxytag: member="ContextProvider::Service::Service" ref="d9cac0378bb6bc25b65526576a609c6d" args="(QDBusConnection connection, QObject *parent=0)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">ContextProvider::Service::Service </td>
+ <td>(</td>
+ <td class="paramtype">QDBusConnection&nbsp;</td>
+ <td class="paramname"> <em>connection</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">QObject *&nbsp;</td>
+ <td class="paramname"> <em>parent</em> = <code>0</code></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td><code> [explicit]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Creates a <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> proxy object which shares the <em>connection</em> with the provider program.
+<p>
+The <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> will not register any service name on the conneciton. If the service is accessed for the first time it'll be created and set up. If the service with the given parameters already exists the created object represents a controller to a previously-created service. A new <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> will be started when it is constructed.
+</div>
+</div><p>
+<a class="anchor" name="2a7310e48f9592828aea6b3f5fda181e"></a><!-- doxytag: member="ContextProvider::Service::Service" ref="2a7310e48f9592828aea6b3f5fda181e" args="(QDBusConnection::BusType busType, const QString &amp;busName, QObject *parent=0)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">ContextProvider::Service::Service </td>
+ <td>(</td>
+ <td class="paramtype">QDBusConnection::BusType&nbsp;</td>
+ <td class="paramname"> <em>busType</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const QString &amp;&nbsp;</td>
+ <td class="paramname"> <em>busName</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">QObject *&nbsp;</td>
+ <td class="paramname"> <em>parent</em> = <code>0</code></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+A convenient constructor, where autoStart is always true.
+<p>
+
+</div>
+</div><p>
+<a class="anchor" name="8013904e0bb41e4b8ff0b68d4214b853"></a><!-- doxytag: member="ContextProvider::Service::Service" ref="8013904e0bb41e4b8ff0b68d4214b853" args="(QDBusConnection::BusType busType, const QString &amp;busName, bool autoStart, QObject *parent=0)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">ContextProvider::Service::Service </td>
+ <td>(</td>
+ <td class="paramtype">QDBusConnection::BusType&nbsp;</td>
+ <td class="paramname"> <em>busType</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const QString &amp;&nbsp;</td>
+ <td class="paramname"> <em>busName</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">bool&nbsp;</td>
+ <td class="paramname"> <em>autoStart</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">QObject *&nbsp;</td>
+ <td class="paramname"> <em>parent</em> = <code>0</code></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Creates a <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> proxy object for <em>busName</em> on the bus indicated by <em>busType</em>.
+<p>
+The <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> will register the given <em>busName</em> on D-Bus. If the service is accessed for the first time it'll be created and set up. If the service with the given parameters already exists the created object represents a controller to a previously-created service. A new <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> will be started when it is constructed if <em>autoStart</em> is true (which is the default).
+</div>
+</div><p>
+<a class="anchor" name="365b50365fd98d8ee7a1b7dd10dd84d2"></a><!-- doxytag: member="ContextProvider::Service::~Service" ref="365b50365fd98d8ee7a1b7dd10dd84d2" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">ContextProvider::Service::~Service </td>
+ <td>(</td>
+ <td class="paramname"> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Destroys this <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> instance.
+<p>
+The actual service on D-Bus is destroyed and stopped if this object is a last instance pointing at the actual service with the given constructor parameters (QDBusConnection or bus type and bus name).
+</div>
+</div><p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="471dbe35bbd9583f9404b15158f367dd"></a><!-- doxytag: member="ContextProvider::Service::restart" ref="471dbe35bbd9583f9404b15158f367dd" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void ContextProvider::Service::restart </td>
+ <td>(</td>
+ <td class="paramname"> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Stop and start the service.
+<p>
+This function cannot be used when the <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> shares a QDBusConnection with the provider program. When that is the case, you must stop the service, unregister the D-Bus bus name, register it again (to force clients of context properties to resubscribe), and finally start the service again.
+</div>
+</div><p>
+<a class="anchor" name="385b58aef7878b6e33a3989d139f9a4a"></a><!-- doxytag: member="ContextProvider::Service::setAsDefault" ref="385b58aef7878b6e33a3989d139f9a4a" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void ContextProvider::Service::setAsDefault </td>
+ <td>(</td>
+ <td class="paramname"> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Sets the <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> object as the default one to use when constructing <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> objects.
+<p>
+
+</div>
+</div><p>
+<a class="anchor" name="d6bf1d2d8f8c580d4d77e9c4e72fd226"></a><!-- doxytag: member="ContextProvider::Service::setConnection" ref="d6bf1d2d8f8c580d4d77e9c4e72fd226" args="(const QDBusConnection &amp;connection)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void ContextProvider::Service::setConnection </td>
+ <td>(</td>
+ <td class="paramtype">const QDBusConnection &amp;&nbsp;</td>
+ <td class="paramname"> <em>connection</em> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Set (override) the QDBusConnection used by the <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a>.
+<p>
+Deprecated; use constructor with QDBusConnection parameter instead.
+</div>
+</div><p>
+<a class="anchor" name="ee524632842792e9ad80b122eb8600a1"></a><!-- doxytag: member="ContextProvider::Service::setValue" ref="ee524632842792e9ad80b122eb8600a1" args="(const QString &amp;key, const QVariant &amp;val)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void ContextProvider::Service::setValue </td>
+ <td>(</td>
+ <td class="paramtype">const QString &amp;&nbsp;</td>
+ <td class="paramname"> <em>key</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const QVariant &amp;&nbsp;</td>
+ <td class="paramname"> <em>val</em></td><td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Set the value of <em>key</em> to <em>val</em>.
+<p>
+A property named <em>key</em> must have been registered already, by creating a <a class="el" href="class_context_provider_1_1_property.html" title="A Property object represents a context property, i.e., a key-value pair.">Property</a> object for it.
+</div>
+</div><p>
+<a class="anchor" name="6434d467cd84a6295bd24572671b5479"></a><!-- doxytag: member="ContextProvider::Service::start" ref="6434d467cd84a6295bd24572671b5479" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool ContextProvider::Service::start </td>
+ <td>(</td>
+ <td class="paramname"> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Start the <a class="el" href="class_context_provider_1_1_service.html" title="A Service object is a proxy representing a service on D-Bus that implements the ContextKit...">Service</a> again after it has been stopped.
+<p>
+In the case of shared connection, the objects will be registered to D-Bus. In the case of non-shared connection, also the service name will be registered on D-Bus. Returns true on success, false otherwise.
+</div>
+</div><p>
+<a class="anchor" name="25cc85c61a07afe679266fc287da0677"></a><!-- doxytag: member="ContextProvider::Service::stop" ref="25cc85c61a07afe679266fc287da0677" args="()" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void ContextProvider::Service::stop </td>
+ <td>(</td>
+ <td class="paramname"> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Stop the service.
+<p>
+In the case of shared connection, this will cause the related objects to be unregistered, but the bus name will still be on D-Bus. In the case of non-shared connection, this will cause the service to disappear from D-Bus completely.
+</div>
+</div><p>
+<hr><h2>Friends And Related Function Documentation</h2>
+<a class="anchor" name="c3553c08a0c7b57a4c15794caebf1936"></a><!-- doxytag: member="ContextProvider::Service::::ServiceUnitTest" ref="c3553c08a0c7b57a4c15794caebf1936" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">friend class ::ServiceUnitTest<code> [friend]</code> </td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+</div>
+</div><p>
+<a class="anchor" name="386f5a9cf65610cb62143865e5637272"></a><!-- doxytag: member="ContextProvider::Service::Property" ref="386f5a9cf65610cb62143865e5637272" args="" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">friend class <a class="el" href="class_context_provider_1_1_property.html">Property</a><code> [friend]</code> </td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="service_8h-source.html">service.h</a><li><a class="el" href="service_8cpp.html">service.cpp</a></ul>
+</div>
+<hr size="1"><address style="text-align: right;"><small>Generated on Fri Oct 23 08:58:39 2009 for libcontextprovider by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
+</body>
+</html>