aboutsummaryrefslogtreecommitdiff
path: root/libcontextprovider/doc/html/class_context_provider_1_1_subscriber.html
blob: e42aa1445e48e06c713250b69fb52201968593c1 (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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<!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::Subscriber 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_subscriber.html">Subscriber</a>
  </div>
</div>
<div class="contents">
<h1>ContextProvider::Subscriber Class Reference</h1><!-- doxytag: class="ContextProvider::Subscriber" --><!-- doxytag: inherits="ContextProvider::QueuedInvoker" --><a class="el" href="class_context_provider_1_1_subscriber.html" title="Subscriber implements the org.freedesktop.ContextKit.Subscriber DBus interface with...">Subscriber</a> implements the org.freedesktop.ContextKit.Subscriber DBus interface with help of the SubsciberAdaptor.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="subscriber_8h-source.html">subscriber.h</a>&gt;</code>
<p>

<p>
<a href="class_context_provider_1_1_subscriber-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Signals</h2></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_subscriber.html#185b6a3ba9f09b4e45cb4cf011a4b3dc">changed</a> (const QMap&lt; QString, QVariant &gt; &amp;values, const QStringList &amp;undetermined)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Emitted when any of the subscribed keys changes it's value.  <a href="#185b6a3ba9f09b4e45cb4cf011a4b3dc"></a><br></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_subscriber.html#bacc217f5389cca9e37f44278752a4c6">Subscriber</a> (const QString &amp;dbusPath, <a class="el" href="class_context_provider_1_1_manager.html">Manager</a> *manager)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#bacc217f5389cca9e37f44278752a4c6"></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_subscriber.html#cbaa9a1a17dbd0337b025255df2b9b53">~Subscriber</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroys the subscriber.  <a href="#cbaa9a1a17dbd0337b025255df2b9b53"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QMap&lt; QString, QVariant &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_subscriber.html#38b01c1486af496970ed00e8bb9dd503">subscribe</a> (const QStringList &amp;keys, QStringList &amp;undetermined)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Subscribes to te specified list of <em>keys</em>.  <a href="#38b01c1486af496970ed00e8bb9dd503"></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_subscriber.html#d006229fc6745798dbe55ceb81f88722">unsubscribe</a> (const QStringList &amp;keys)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unsubscribes from the passed list of keys.  <a href="#d006229fc6745798dbe55ceb81f88722"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_context_provider_1_1_subscriber.html#cc24c10d7e14b445eff6b216ad01caf0">dbusPath</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the dbus object path for this <a class="el" href="class_context_provider_1_1_subscriber.html" title="Subscriber implements the org.freedesktop.ContextKit.Subscriber DBus interface with...">Subscriber</a>.  <a href="#cc24c10d7e14b445eff6b216ad01caf0"></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_subscriber.html#80406eb66a937045a8071c70ec0f1ba5">isSubscribedToKey</a> (const QString &amp;key)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if the <a class="el" href="class_context_provider_1_1_subscriber.html" title="Subscriber implements the org.freedesktop.ContextKit.Subscriber DBus interface with...">Subscriber</a> is currently subscribed to the specified key.  <a href="#80406eb66a937045a8071c70ec0f1ba5"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="class_context_provider_1_1_subscriber.html" title="Subscriber implements the org.freedesktop.ContextKit.Subscriber DBus interface with...">Subscriber</a> implements the org.freedesktop.ContextKit.Subscriber DBus interface with help of the SubsciberAdaptor. 
<p>
<a class="el" href="class_context_provider_1_1_subscriber.html" title="Subscriber implements the org.freedesktop.ContextKit.Subscriber DBus interface with...">Subscriber</a> lets the user to suscribe to or unsubscribe from properties and get informed when their values change. <hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="bacc217f5389cca9e37f44278752a4c6"></a><!-- doxytag: member="ContextProvider::Subscriber::Subscriber" ref="bacc217f5389cca9e37f44278752a4c6" args="(const QString &amp;dbusPath, Manager *manager)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ContextProvider::Subscriber::Subscriber           </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>dbusPath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_context_provider_1_1_manager.html">Manager</a> *&nbsp;</td>
          <td class="paramname"> <em>man</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<p>
Creates a new <a class="el" href="class_context_provider_1_1_subscriber.html" title="Subscriber implements the org.freedesktop.ContextKit.Subscriber DBus interface with...">Subscriber</a> with the given <em>dbusPath</em> object path and a parent <a class="el" href="class_context_provider_1_1_manager.html" title="Manager implements the org.freedesktop.ContextKit.Manager DBus interface. (With the...">Manager</a> <em>man</em>. The <a class="el" href="class_context_provider_1_1_subscriber.html" title="Subscriber implements the org.freedesktop.ContextKit.Subscriber DBus interface with...">Subscriber</a> will use the <a class="el" href="class_context_provider_1_1_manager.html" title="Manager implements the org.freedesktop.ContextKit.Manager DBus interface. (With the...">Manager</a> to obtain values etc. 
</div>
</div><p>
<a class="anchor" name="cbaa9a1a17dbd0337b025255df2b9b53"></a><!-- doxytag: member="ContextProvider::Subscriber::~Subscriber" ref="cbaa9a1a17dbd0337b025255df2b9b53" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ContextProvider::Subscriber::~Subscriber           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destroys the subscriber. 
<p>
Decreases the subscription count on the parent <a class="el" href="class_context_provider_1_1_manager.html" title="Manager implements the org.freedesktop.ContextKit.Manager DBus interface. (With the...">Manager</a> before going down. 
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="185b6a3ba9f09b4e45cb4cf011a4b3dc"></a><!-- doxytag: member="ContextProvider::Subscriber::changed" ref="185b6a3ba9f09b4e45cb4cf011a4b3dc" args="(const QMap&lt; QString, QVariant &gt; &amp;values, const QStringList &amp;undetermined)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ContextProvider::Subscriber::changed           </td>
          <td>(</td>
          <td class="paramtype">const QMap&lt; QString, QVariant &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>values</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStringList &amp;&nbsp;</td>
          <td class="paramname"> <em>undetermined</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Emitted when any of the subscribed keys changes it's value. 
<p>
The <em>values</em> map contains a mapping of keys -&gt; new values. The <em>undetermined</em> list contains the names of keys that could not be determined. The <em>values</em> and <em>undetermined</em> contains only the keys that actually changed value. 
</div>
</div><p>
<a class="anchor" name="cc24c10d7e14b445eff6b216ad01caf0"></a><!-- doxytag: member="ContextProvider::Subscriber::dbusPath" ref="cc24c10d7e14b445eff6b216ad01caf0" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString ContextProvider::Subscriber::dbusPath           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the dbus object path for this <a class="el" href="class_context_provider_1_1_subscriber.html" title="Subscriber implements the org.freedesktop.ContextKit.Subscriber DBus interface with...">Subscriber</a>. 
<p>

</div>
</div><p>
<a class="anchor" name="80406eb66a937045a8071c70ec0f1ba5"></a><!-- doxytag: member="ContextProvider::Subscriber::isSubscribedToKey" ref="80406eb66a937045a8071c70ec0f1ba5" args="(const QString &amp;key)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ContextProvider::Subscriber::isSubscribedToKey           </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns true if the <a class="el" href="class_context_provider_1_1_subscriber.html" title="Subscriber implements the org.freedesktop.ContextKit.Subscriber DBus interface with...">Subscriber</a> is currently subscribed to the specified key. 
<p>

</div>
</div><p>
<a class="anchor" name="38b01c1486af496970ed00e8bb9dd503"></a><!-- doxytag: member="ContextProvider::Subscriber::subscribe" ref="38b01c1486af496970ed00e8bb9dd503" args="(const QStringList &amp;keys, QStringList &amp;undetermined)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QMap&lt; QString, QVariant &gt; ContextProvider::Subscriber::subscribe           </td>
          <td>(</td>
          <td class="paramtype">const QStringList &amp;&nbsp;</td>
          <td class="paramname"> <em>keys</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QStringList &amp;&nbsp;</td>
          <td class="paramname"> <em>undetermined</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Subscribes to te specified list of <em>keys</em>. 
<p>
The keys for which values could not be determined are placed in the <code>undetermined</code> list. Otherwise the current values are placed in the returned map in a key -&gt; value order. 
</div>
</div><p>
<a class="anchor" name="d006229fc6745798dbe55ceb81f88722"></a><!-- doxytag: member="ContextProvider::Subscriber::unsubscribe" ref="d006229fc6745798dbe55ceb81f88722" args="(const QStringList &amp;keys)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ContextProvider::Subscriber::unsubscribe           </td>
          <td>(</td>
          <td class="paramtype">const QStringList &amp;&nbsp;</td>
          <td class="paramname"> <em>keys</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Unsubscribes from the passed list of keys. 
<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="subscriber_8h-source.html">subscriber.h</a><li><a class="el" href="subscriber_8cpp.html">subscriber.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>