aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMichael Albinus2007-12-02 17:19:17 +0000
committerMichael Albinus2007-12-02 17:19:17 +0000
commitd9e21158633e2c1789dddcc2260e12f3f4ee060a (patch)
treea9f3087c9566827b0db956e6af77f058f0a6972d /doc
parentd3a8e0dffbf04a6ba2c07ce6e8bed9282ea77818 (diff)
downloademacs-d9e21158633e2c1789dddcc2260e12f3f4ee060a.tar.gz
emacs-d9e21158633e2c1789dddcc2260e12f3f4ee060a.zip
* dbus.texi: Applying comments from RMS.
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/dbus.texi84
1 files changed, 34 insertions, 50 deletions
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi
index df968f02d60..30d7c16bd7b 100644
--- a/doc/misc/dbus.texi
+++ b/doc/misc/dbus.texi
@@ -78,7 +78,7 @@ and looks like @samp{:1.42}.
78 78
79Additionally, a client application can register itself to a so called 79Additionally, a client application can register itself to a so called
80@dfn{known name}, which is a series of identifiers separated by dots, 80@dfn{known name}, which is a series of identifiers separated by dots,
81e.g. @samp{org.gnu.Emacs}. If several applications register to the 81like @samp{org.gnu.Emacs}. If several applications register to the
82same known name, these registrations are queued, and only the first 82same known name, these registrations are queued, and only the first
83application which has registered for the known name is reachable via 83application which has registered for the known name is reachable via
84this name. If this application disconnects from the bus, the next 84this name. If this application disconnects from the bus, the next
@@ -114,7 +114,6 @@ registered names. Internally they use the basic interface
114@samp{org.freedesktop.DBus}, which is supported by all objects of a bus. 114@samp{org.freedesktop.DBus}, which is supported by all objects of a bus.
115 115
116@defun dbus-list-activatable-names 116@defun dbus-list-activatable-names
117
118This function returns the D-Bus service names, which can be activated. 117This function returns the D-Bus service names, which can be activated.
119An activatable service is described in a service registration file. 118An activatable service is described in a service registration file.
120Under GNU/Linux, such files are located at 119Under GNU/Linux, such files are located at
@@ -125,7 +124,6 @@ activatable service names at all.
125@end defun 124@end defun
126 125
127@defun dbus-list-names bus 126@defun dbus-list-names bus
128
129All service names, which are registered at D-Bus @var{bus}, are 127All service names, which are registered at D-Bus @var{bus}, are
130returned. The result is a list of strings, which is @code{nil} when 128returned. The result is a list of strings, which is @code{nil} when
131there are no registered service names at all. Well known names are 129there are no registered service names at all. Well known names are
@@ -137,7 +135,6 @@ strings like @samp{org.freedesktop.DBus}. Names starting with
137@end defun 135@end defun
138 136
139@defun dbus-list-known-names bus 137@defun dbus-list-known-names bus
140
141Retrieves all services which correspond to a known name in @var{bus}. 138Retrieves all services which correspond to a known name in @var{bus}.
142A service has a known name if it doesn't start with @samp{:}. The 139A service has a known name if it doesn't start with @samp{:}. The
143result is a list of strings, which is @code{nil} when there are no 140result is a list of strings, which is @code{nil} when there are no
@@ -148,7 +145,6 @@ known names at all.
148@end defun 145@end defun
149 146
150@defun dbus-list-queued-owners bus service 147@defun dbus-list-queued-owners bus service
151
152For a given service, registered at D-Bus @var{bus} under the name 148For a given service, registered at D-Bus @var{bus} under the name
153@var{service}, all queued unique names are returned. The result is a 149@var{service}, all queued unique names are returned. The result is a
154list of strings, or @code{nil} when there are no queued names for 150list of strings, or @code{nil} when there are no queued names for
@@ -160,7 +156,6 @@ string.
160@end defun 156@end defun
161 157
162@defun dbus-get-name-owner bus service 158@defun dbus-get-name-owner bus service
163
164For a given service, registered at D-Bus @var{bus} under the name 159For a given service, registered at D-Bus @var{bus} under the name
165@var{service}, the unique name of the name owner is returned. The result is a 160@var{service}, the unique name of the name owner is returned. The result is a
166string, or @code{nil} when there exist no name owner of @var{service}. 161string, or @code{nil} when there exist no name owner of @var{service}.
@@ -171,7 +166,6 @@ string.
171@end defun 166@end defun
172 167
173@defun dbus-get-unique-name bus 168@defun dbus-get-unique-name bus
174
175The unique name, under which Emacs is registered at D-Bus @var{bus}, 169The unique name, under which Emacs is registered at D-Bus @var{bus},
176is returned as string. 170is returned as string.
177 171
@@ -180,7 +174,6 @@ is returned as string.
180@end defun 174@end defun
181 175
182@defun dbus-introspect bus service path 176@defun dbus-introspect bus service path
183
184Objects can publish there interfaces to the D-Bus. This function 177Objects can publish there interfaces to the D-Bus. This function
185returns all interfaces of @var{service}, registered at object path 178returns all interfaces of @var{service}, registered at object path
186@var{path} at bus @var{bus}. 179@var{path} at bus @var{bus}.
@@ -196,22 +189,22 @@ format. Example:
196 :system "org.freedesktop.Hal" 189 :system "org.freedesktop.Hal"
197 "/org/freedesktop/Hal/devices/computer") 190 "/org/freedesktop/Hal/devices/computer")
198 191
199@result{} <!DOCTYPE node PUBLIC 192@result{} "<!DOCTYPE node PUBLIC
200 "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" 193 \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"
201 "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> 194 \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">
202 <node> 195 <node>
203 <interface name="org.freedesktop.Hal.Device"> 196 <interface name=\"org.freedesktop.Hal.Device\">
204 <method name="GetAllProperties"> 197 <method name=\"GetAllProperties\">
205 <arg name="properties" direction="out" type="a@{sv@}"/> 198 <arg name=\"properties\" direction=\"out\" type=\"a@{sv@}\"/>
206 </method> 199 </method>
207 ... 200 ...
208 <signal name="PropertyModified"> 201 <signal name=\"PropertyModified\">
209 <arg name="num_updates" type="i"/> 202 <arg name=\"num_updates\" type=\"i\"/>
210 <arg name="updates" type="a(sbb)"/> 203 <arg name=\"updates\" type=\"a(sbb)\"/>
211 </signal> 204 </signal>
212 </interface> 205 </interface>
213 ... 206 ...
214 </node> 207 </node>"
215@end example 208@end example
216 209
217This example informs us, that the service @code{org.freedesktop.Hal} 210This example informs us, that the service @code{org.freedesktop.Hal}
@@ -278,7 +271,7 @@ Other Lisp types, especially lists, are not supported (yet).
278 271
279Output parameters of D-Bus methods and signals are mapped to Lisp 272Output parameters of D-Bus methods and signals are mapped to Lisp
280objects. This mapping is more powerful than the one for input 273objects. This mapping is more powerful than the one for input
281parameters, i.e. more types are supported by the current 274parameters, i.e., more D-Bus types are supported by the current
282implementation. 275implementation.
283 276
284@example 277@example
@@ -326,7 +319,6 @@ be called, and a reply message returning the resulting output
326parameters from the object. 319parameters from the object.
327 320
328@defun dbus-call-method bus method service path interface &rest args 321@defun dbus-call-method bus method service path interface &rest args
329
330This function calls @var{method} on the D-Bus @var{bus}. @var{bus} is 322This function calls @var{method} on the D-Bus @var{bus}. @var{bus} is
331either the symbol @code{:system} or the symbol @code{:session}. 323either the symbol @code{:system} or the symbol @code{:session}.
332 324
@@ -387,22 +379,22 @@ emulate the @code{lshal} command on GNU/Linux systems:
387 (message " %s = %S" 379 (message " %s = %S"
388 (car properties) (or (caar (cdr properties)) "")))) 380 (car properties) (or (caar (cdr properties)) ""))))
389 381
390@result{} udi = /org/freedesktop/Hal/devices/computer 382@result{} "udi = /org/freedesktop/Hal/devices/computer
391 info.addons = ("hald-addon-acpi") 383 info.addons = (\"hald-addon-acpi\")
392 info.bus = "unknown" 384 info.bus = \"unknown\"
393 info.product = "Computer" 385 info.product = \"Computer\"
394 info.subsystem = "unknown" 386 info.subsystem = \"unknown\"
395 info.udi = "/org/freedesktop/Hal/devices/computer" 387 info.udi = \"/org/freedesktop/Hal/devices/computer\"
396 linux.sysfs_path_device = "(none)" 388 linux.sysfs_path_device = \"(none)\"
397 power_management.acpi.linux.version = "20051216" 389 power_management.acpi.linux.version = \"20051216\"
398 power_management.can_suspend_to_disk = t 390 power_management.can_suspend_to_disk = t
399 power_management.can_suspend_to_ram = "" 391 power_management.can_suspend_to_ram = \"\"
400 power_management.type = "acpi" 392 power_management.type = \"acpi\"
401 smbios.bios.release_date = "11/07/2001" 393 smbios.bios.release_date = \"11/07/2001\"
402 system.chassis.manufacturer = "COMPAL" 394 system.chassis.manufacturer = \"COMPAL\"
403 system.chassis.type = "Notebook" 395 system.chassis.type = \"Notebook\"
404 system.firmware.release_date = "03/19/2005" 396 system.firmware.release_date = \"03/19/2005\"
405 ... 397 ..."
406@end example 398@end example
407@end defun 399@end defun
408 400
@@ -415,7 +407,6 @@ Signals are broadcast messages. They carry input parameters, which
415are received by all objects which have registered for such a signal. 407are received by all objects which have registered for such a signal.
416 408
417@defun dbus-send-signal bus signal service path interface &rest args 409@defun dbus-send-signal bus signal service path interface &rest args
418
419This function is similar to @code{dbus-call-method}. The difference 410This function is similar to @code{dbus-call-method}. The difference
420is, that there are no returning output parameters. 411is, that there are no returning output parameters.
421 412
@@ -440,7 +431,6 @@ Conversion}. Example:
440@end defun 431@end defun
441 432
442@defun dbus-register-signal bus signal service path interface handler 433@defun dbus-register-signal bus signal service path interface handler
443
444With this function, an application registers for @var{signal} on the 434With this function, an application registers for @var{signal} on the
445D-Bus @var{bus}. 435D-Bus @var{bus}.
446 436
@@ -482,7 +472,6 @@ registration for @var{signal}.
482@end defun 472@end defun
483 473
484@defun dbus-unregister-signal object 474@defun dbus-unregister-signal object
485
486Unregister @var{object} from the the D-Bus. @var{object} must be the 475Unregister @var{object} from the the D-Bus. @var{object} must be the
487result of a preceding @code{dbus-register-signal} call. 476result of a preceding @code{dbus-register-signal} call.
488@end defun 477@end defun
@@ -526,28 +515,23 @@ There exist convenience functions which could be called inside a
526callback function in order to retrieve the information from the event. 515callback function in order to retrieve the information from the event.
527 516
528@defun dbus-event-bus-name event 517@defun dbus-event-bus-name event
529
530Returns the bus name @var{event} is coming from. 518Returns the bus name @var{event} is coming from.
531The result is either the symbol @code{:system} or the symbol @code{:session}. 519The result is either the symbol @code{:system} or the symbol @code{:session}.
532@end defun 520@end defun
533 521
534@defun dbus-event-service-name event 522@defun dbus-event-service-name event
535
536Returns the unique name of the D-Bus object @var{event} is coming from. 523Returns the unique name of the D-Bus object @var{event} is coming from.
537@end defun 524@end defun
538 525
539@defun dbus-event-path-name event 526@defun dbus-event-path-name event
540
541Returns the object path of the D-Bus object @var{event} is coming from. 527Returns the object path of the D-Bus object @var{event} is coming from.
542@end defun 528@end defun
543 529
544@defun dbus-event-interface-name event 530@defun dbus-event-interface-name event
545
546Returns the interface name of of the D-Bus object @var{event} is coming from. 531Returns the interface name of of the D-Bus object @var{event} is coming from.
547@end defun 532@end defun
548 533
549@defun dbus-event-member-name event 534@defun dbus-event-member-name event
550
551Returns the member name of of the D-Bus object @var{event} is coming 535Returns the member name of of the D-Bus object @var{event} is coming
552from. It is either a signal name or a method name. 536from. It is either a signal name or a method name.
553@end defun 537@end defun