aboutsummaryrefslogtreecommitdiff
path: root/libcontextsubscriber/doc/html/class_async_d_bus_interface.html
blob: f847cdd82e51f553e80fe0d981162c014ed2ef08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>libcontextsubscriber: AsyncDBusInterface 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.6.1 -->
<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>
<div class="contents">
<h1>AsyncDBusInterface Class Reference</h1><!-- doxytag: class="AsyncDBusInterface" -->
<p>This is a workaround for QtDBus to be asynchronous.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="asyncdbusinterface_8h_source.html">asyncdbusinterface.h</a>&gt;</code></p>

<p><a href="class_async_d_bus_interface-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_async_d_bus_interface.html#a744b95cd3be282e83cf0fdc63e41144b">AsyncDBusInterface</a> (const QString &amp;service, const QString &amp;path, const QString &amp;interface, const QDBusConnection &amp;connection, QObject *parent=0)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This is a workaround for QtDBus to be asynchronous. </p>
<p>In QtDBus, the QDBusInterface class which the developer is supposed to use makes introspection calls synchronously. It is not clear (and not documented), what is the benefit of these introspection calls, probably invalid use and some errors are catched earlier if introspection data is available.</p>
<p>However this introspection data is requested synchronously, so constructing a new QDBusInterface can block your thread if the endpoint serving that introspection data on D-Bus is stuck.</p>
<p>ContextKit tries to be asynchronous, so this behavior of QDBusInterface is unacceptable and this is why QDBusAbstractInterface has to be used instead (it is simpler, it doesn't use introspection at all).</p>
<p>Unfortunately QDBusAbstractInterface only has a protected constructor, so we need this wrapper class, which makes that constructor available to us.</p>
<p>So this class is internal to ContextKit, it is distributed only, because we use it in several subprojects, do not use it through ContextKit. If you find this useful, copy the source instead. </p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a744b95cd3be282e83cf0fdc63e41144b"></a><!-- doxytag: member="AsyncDBusInterface::AsyncDBusInterface" ref="a744b95cd3be282e83cf0fdc63e41144b" args="(const QString &amp;service, const QString &amp;path, const QString &amp;interface, const QDBusConnection &amp;connection, QObject *parent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">AsyncDBusInterface::AsyncDBusInterface </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>service</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>interface</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QDBusConnection &amp;&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></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="asyncdbusinterface_8h_source.html">asyncdbusinterface.h</a></li>
<li><a class="el" href="asyncdbusinterface_8cpp.html">asyncdbusinterface.cpp</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Nov 18 12:52:33 2009 for libcontextsubscriber by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>