/usr/share/GNUstep/Documentation/Developer/DBusKit/Reference/DKNotificationCenter.html is in libdbuskit-dev 0.1.1-2+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | <!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" lang="en">
<head>
<title>DKNotificationCenter class documentation</title>
</head>
<body>
<font face="serif">
<h1><a name="title$DKNotificationCenter">DKNotificationCenter class documentation</a></h1>
<h3>Authors</h3>
<dl>
<dt>Niels Grewe (<a href="mailto:niels.grewe@halbordnung.de"><code>niels.grewe@halbordnung.de</code></a>)</dt>
<dd>
</dd>
</dl>
<p><b>Copyright:</b> (C) 2010 Free Software Foundation, Inc.</p>
<div>
</div>
<h1><a name="001000000000">
Software documentation for the DKNotificationCenter
class
</a></h1>
<h2><a name="class$DKNotificationCenter">DKNotificationCenter</a> : NSObject</h2>
<blockquote class="declared">
<dl>
<dt><b>Declared in:</b></dt>
<dd>DBusKit/DKNotificationCenter.h</dd>
</dl>
</blockquote>
<div class="desc">
The DKNotificationCenter class allows Objective-C objects
to watch for notifications from other D-Bus objects
('signals' in the D-Bus dialect) or to post
notifications to D-Bus themselves. You can use
this class just as you would use an
NSNotificationCenter. Notification
names will be mapped to signals as follows: If the
introspection data for theD-Bus signal carries
an <code>org.gnustep.openstep.notification</code>
annotation,the value of this annotation will be
used as the name of the notification. Otherwise, the
notification name will be
<code>
DKSignal_<InterfaceName>_<SignalName>
</code>
. Additionally, D-Bus provides a rather sophisticated
matching mechanism to catch only signal emissions
with a specific signature. This mechanism is available
to applications through the
<a rel="gsdoc" href="#method$DKNotificationCenter-addObserver$selector$signal$interface$sender$destination$">-addObserver:selector:signal:interface:sender:destination:</a>
method and its more specific variants. Unfortunately, at this time, you need to specify identical match rules when removing the observer again. Every notification from D-Bus carries a reference to a proxy for the object emitting the signal and also guarantees that the following keys are present in the dictionary:
<dl>
<dt>member</dt>
<dd>
The name of the signal being emitted (e.g. "NameOwnerChanged"
</dd>
<dt>interface</dt>
<dd>
The name of the interface to which the signal belongs. (e.g. "org.freedesktop.DBus").
</dd>
<dt>sender</dt>
<dd>
The service emitting the signal (e.g. "org.freedesktop.DBus"). This will always be the unique name of the service, even if you registered the signal for another name.
</dd>
<dt>path</dt>
<dd>
The path to the object emitting the signal (e.g "/org/freedesktop/DBus").
</dd>
<dt>destination</dt>
<dd>
The intended receiver of the signal, might be empty if the signal was broadcast, which is usually the case.
</dd>
</dl>
Additionally the userInfo dictionary will contain keys for every argument specified in the signal, named "arg <em>N</em> ". The dictionary might also contain further keys if <code>org.gnustep.openstep.notification.key</code> annotations were available.
</div>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter+centerForBusType$">+centerForBusType:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter+sessionBusCenter">+sessionBusCenter</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter+systemBusCenter">+systemBusCenter</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-addObserver$selector$name$object$">-addObserver:selector:name:object:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-addObserver$selector$name$sender$destination$">-addObserver:selector:name:sender:destination:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-addObserver$selector$signal$interface$sender$destination$">-addObserver:selector:signal:interface:sender:destination:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-addObserver$selector$signal$interface$sender$destination$filter$atIndex$">-addObserver:selector:signal:interface:sender:destination:filter:atIndex:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-addObserver$selector$signal$interface$sender$destination$filtersAndIndices$,...">-addObserver:selector:signal:interface:sender:destination:filtersAndIndices:,...</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-postNotification$">-postNotification:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-postNotificationName$object$">-postNotificationName:object:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-postNotificationName$object$userInfo$">-postNotificationName:object:userInfo:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-postSignalName$interface$object$">-postSignalName:interface:object:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-postSignalName$interface$object$userInfo$">-postSignalName:interface:object:userInfo:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-registerNotificationName$asSignal$inInterface$">-registerNotificationName:asSignal:inInterface:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-removeObserver$">-removeObserver:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-removeObserver$name$object$">-removeObserver:name:object:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-removeObserver$name$sender$destination$">-removeObserver:name:sender:destination:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-removeObserver$signal$interface$object$">-removeObserver:signal:interface:object:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-removeObserver$signal$interface$sender$destination$">-removeObserver:signal:interface:sender:destination:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-removeObserver$signal$interface$sender$destination$filter$atIndex$">-removeObserver:signal:interface:sender:destination:filter:atIndex:</a></li>
<li><a rel="gsdoc" href="DKNotificationCenter.html#method$DKNotificationCenter-removeObserver$signal$interface$sender$destination$filtersAndIndices$,...">-removeObserver:signal:interface:sender:destination:filtersAndIndices:,...</a></li>
</ul>
<hr width="50%" align="left" />
<div class="method">
<h3><a name="method$DKNotificationCenter+centerForBusType$">centerForBusType: </a></h3>
+ (id) <b>centerForBusType:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$DKDBusBusType">DKDBusBusType</a>)type;<br />
<div class="desc">
Returns a notification center for the specified bus
<var>type</var>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter+sessionBusCenter">sessionBusCenter </a></h3>
+ (id) <b>sessionBusCenter</b>;<br />
<div class="desc">
Returns a notification center for the session
message bus.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter+systemBusCenter">systemBusCenter </a></h3>
+ (id) <b>systemBusCenter</b>;<br />
<div class="desc">
Returns a notification center for the system
message bus.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-addObserver$selector$name$object$">addObserver: selector: name: object: </a></h3>
- (void) <b>addObserver:</b> (id)observer<b> selector:</b> (SEL)notifySelector<b> name:</b> (NSString*)notificationName<b> object:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)sender;<br />
<div class="desc">
Watches the bus for signals matching
<var>notificationName</var> from <var>sender</var>.
If one of them is <code>nil</code>, the value will not
be used to restrict the notifications delivered to the
<var>observer</var>. Notifications are delivered by
calling <var>notifySelector</var> on
<var>observer</var> as a receiver. Neither can be
<code>nil</code> and <var>notifySelector</var> takes
exactly one argument (the notification).
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-addObserver$selector$name$sender$destination$">addObserver: selector: name: sender: destination: </a></h3>
- (void) <b>addObserver:</b> (id)observer<b> selector:</b> (SEL)notifySelector<b> name:</b> (NSString*)notificationName<b> sender:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)sender<b> destination:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)destination;<br />
<div class="desc">
Similar to
<a rel="gsdoc" href="#method$DKNotificationCenter-addObserver$selector$name$object$">-addObserver:selector:name:object:</a>
but allows to specify both <var>sender</var> and <var>destination</var> of the notification.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-addObserver$selector$signal$interface$sender$destination$">addObserver: selector: signal: interface: sender: destination: </a></h3>
- (void) <b>addObserver:</b> (id)observer<b> selector:</b> (SEL)notifySelector<b> signal:</b> (NSString*)signalName<b> interface:</b> (NSString*)interfaceName<b> sender:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)sender<b> destination:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)destination;<br />
<div class="desc">
Similar to
<a rel="gsdoc" href="#method$DKNotificationCenter-addObserver$selector$name$sender$destination$">-addObserver:selector:name:sender:destination:</a>
but allows finer grained control over what signals to match. (E.g. it would be possible to request all notifications matching a particular interface only.).
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-addObserver$selector$signal$interface$sender$destination$filter$atIndex$">addObserver: selector: signal: interface: sender: destination: filter: atIndex: </a></h3>
- (void) <b>addObserver:</b> (id)observer<b> selector:</b> (SEL)notifySelector<b> signal:</b> (NSString*)signalName<b> interface:</b> (NSString*)interfaceName<b> sender:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)sender<b> destination:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)destination<b> filter:</b> (NSString*)filter<b> atIndex:</b> (NSUInteger)index;<br />
<div class="desc">
Similar to
<a rel="gsdoc" href="#method$DKNotificationCenter-addObserver$selector$signal$interface$sender$destination$">-addObserver:selector:signal:interface:sender:destination:</a>
but additionally allows matching a single argument. Due to D-Bus constraints, <var>index</var> must be less than 64. The signal will only be matched if the value of the argument at <var>index</var> <em>is equal</em> to the value of <var>filter</var>. Additionally, this matching is limited to string arguments.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-addObserver$selector$signal$interface$sender$destination$filtersAndIndices$,...">addObserver: selector: signal: interface: sender: destination: filtersAndIndices: ,...</a></h3>
- (void) <b>addObserver:</b> (id)observer<b> selector:</b> (SEL)notifySelector<b> signal:</b> (NSString*)signalName<b> interface:</b> (NSString*)interfaceName<b> sender:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)sender<b> destination:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)destination<b> filtersAndIndices:</b> (NSString*)firstFilter<b>,...</b>;<br />
<div class="desc">
Similar to
<a rel="gsdoc" href="#method$DKNotificationCenter-addObserver$selector$signal$interface$sender$destination$filter$atIndex$">-addObserver:selector:signal:interface:sender:destination:filter:atIndex:</a>
but allows matching more than one signal. The argument list needs to be terminated by <code>nil</code>. If you want to match the first argument, specify that particular match as the first one and set <var>firstIndex</var> to <code>0</code>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-postNotification$">postNotification: </a></h3>
- (void) <b>postNotification:</b> (NSNotification*)notification;<br />
<div class="desc">
NOTE: Not yet implemented.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-postNotificationName$object$">postNotificationName: object: </a></h3>
- (void) <b>postNotificationName:</b> (NSString*)name<b> object:</b> (id)sender;<br />
<div class="desc">
NOTE: Not yet implemented.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-postNotificationName$object$userInfo$">postNotificationName: object: userInfo: </a></h3>
- (void) <b>postNotificationName:</b> (NSString*)name<b> object:</b> (id)sender<b> userInfo:</b> (NSDictionary*)info;<br />
<div class="desc">
NOTE: Not yet implemented.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-postSignalName$interface$object$">postSignalName: interface: object: </a></h3>
- (void) <b>postSignalName:</b> (NSString*)signalName<b> interface:</b> (NSString*)interfaceName<b> object:</b> (id)sender;<br />
<div class="desc">
NOTE: Not yet implemented.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-postSignalName$interface$object$userInfo$">postSignalName: interface: object: userInfo: </a></h3>
- (void) <b>postSignalName:</b> (NSString*)signalName<b> interface:</b> (NSString*)interfaceName<b> object:</b> (id)sender<b> userInfo:</b> (NSDictionary*)info;<br />
<div class="desc">
NOTE: Not yet implemented.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-registerNotificationName$asSignal$inInterface$">registerNotificationName: asSignal: inInterface: </a></h3>
- (BOOL) <b>registerNotificationName:</b> (NSString*)notificationName<b> asSignal:</b> (NSString*)signalName<b> inInterface:</b> (NSString*)interface;<br />
<div class="desc">
This method allows notification names to be registered
for specific signals. E.g.:
<pre>
[[DKNotificationCenter sessionBusCenter] registerNotificationName: @"DKNameChanged"
asSignal: @"NameOwnerChanged"
inInterface: @"org.freedesktop.DBus"];
</pre>
would deliver all " <code>NameOwnerChanged</code> "
emissions as notifications named "
<code>DKNameChanged</code> ". The method returns
<code>NO</code> if the notification name has already
been registered.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-removeObserver$">removeObserver: </a></h3>
- (void) <b>removeObserver:</b> (id)observer;<br />
<div class="desc">
Removes all observation activities involving the
<var>observer</var>.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-removeObserver$name$object$">removeObserver: name: object: </a></h3>
- (void) <b>removeObserver:</b> (id)observer<b> name:</b> (NSString*)notificationName<b> object:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)sender;<br />
<div class="desc">
Removes all observation activities matching the
arguments specified. The match is inclusive.
Every observation for a more specific rule will also
be removed.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-removeObserver$name$sender$destination$">removeObserver: name: sender: destination: </a></h3>
- (void) <b>removeObserver:</b> (id)observer<b> name:</b> (NSString*)notificationName<b> sender:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)sender<b> destination:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)destination;<br />
<div class="desc">
Removes all observation activities matching the
arguments specified. The match is inclusive.
Every observation for a more specific rule will also
be removed.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-removeObserver$signal$interface$object$">removeObserver: signal: interface: object: </a></h3>
- (void) <b>removeObserver:</b> (id)observer<b> signal:</b> (NSString*)signalName<b> interface:</b> (NSString*)interfaceName<b> object:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)sender;<br />
<div class="desc">
Removes all observation activities matching the
arguments specified. The match is inclusive.
Every observation for a more specific rule will also
be removed.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-removeObserver$signal$interface$sender$destination$">removeObserver: signal: interface: sender: destination: </a></h3>
- (void) <b>removeObserver:</b> (id)observer<b> signal:</b> (NSString*)signalName<b> interface:</b> (NSString*)interfaceName<b> sender:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)sender<b> destination:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)destination;<br />
<div class="desc">
Removes all observation activities matching the
arguments specified. The match is inclusive.
Every observation for a more specific rule will also
be removed.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-removeObserver$signal$interface$sender$destination$filter$atIndex$">removeObserver: signal: interface: sender: destination: filter: atIndex: </a></h3>
- (void) <b>removeObserver:</b> (id)observer<b> signal:</b> (NSString*)signalName<b> interface:</b> (NSString*)interfaceName<b> sender:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)sender<b> destination:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)destination<b> filter:</b> (NSString*)filter<b> atIndex:</b> (NSUInteger)index;<br />
<div class="desc">
Removes all observation activities matching the
arguments specified. The match is inclusive.
Every observation for a more specific rule will also
be removed.
</div>
<hr width="25%" align="left" />
</div>
<div class="method">
<h3><a name="method$DKNotificationCenter-removeObserver$signal$interface$sender$destination$filtersAndIndices$,...">removeObserver: signal: interface: sender: destination: filtersAndIndices: ,...</a></h3>
- (void) <b>removeObserver:</b> (id)observer<b> signal:</b> (NSString*)signalName<b> interface:</b> (NSString*)interfaceName<b> sender:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)sender<b> destination:</b> (<a rel="gsdoc" href="DKProxy.html#class$DKProxy">DKProxy</a>*)destination<b> filtersAndIndices:</b> (NSString*)firstFilter<b>,...</b>;<br />
<div class="desc">
Removes all observation activities matching the
arguments specified. The match is inclusive.
Every observation for a more specific rule will also
be removed.
</div>
<hr width="25%" align="left" />
</div>
<br />
</font>
</body>
</html>
|