diff options
| author | Michael Albinus | 2007-12-02 17:19:17 +0000 |
|---|---|---|
| committer | Michael Albinus | 2007-12-02 17:19:17 +0000 |
| commit | d9e21158633e2c1789dddcc2260e12f3f4ee060a (patch) | |
| tree | a9f3087c9566827b0db956e6af77f058f0a6972d /doc | |
| parent | d3a8e0dffbf04a6ba2c07ce6e8bed9282ea77818 (diff) | |
| download | emacs-d9e21158633e2c1789dddcc2260e12f3f4ee060a.tar.gz emacs-d9e21158633e2c1789dddcc2260e12f3f4ee060a.zip | |
* dbus.texi: Applying comments from RMS.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc/dbus.texi | 84 |
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 | ||
| 79 | Additionally, a client application can register itself to a so called | 79 | Additionally, 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, |
| 81 | e.g. @samp{org.gnu.Emacs}. If several applications register to the | 81 | like @samp{org.gnu.Emacs}. If several applications register to the |
| 82 | same known name, these registrations are queued, and only the first | 82 | same known name, these registrations are queued, and only the first |
| 83 | application which has registered for the known name is reachable via | 83 | application which has registered for the known name is reachable via |
| 84 | this name. If this application disconnects from the bus, the next | 84 | this 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 | |||
| 118 | This function returns the D-Bus service names, which can be activated. | 117 | This function returns the D-Bus service names, which can be activated. |
| 119 | An activatable service is described in a service registration file. | 118 | An activatable service is described in a service registration file. |
| 120 | Under GNU/Linux, such files are located at | 119 | Under 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 | |||
| 129 | All service names, which are registered at D-Bus @var{bus}, are | 127 | All service names, which are registered at D-Bus @var{bus}, are |
| 130 | returned. The result is a list of strings, which is @code{nil} when | 128 | returned. The result is a list of strings, which is @code{nil} when |
| 131 | there are no registered service names at all. Well known names are | 129 | there 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 | |||
| 141 | Retrieves all services which correspond to a known name in @var{bus}. | 138 | Retrieves all services which correspond to a known name in @var{bus}. |
| 142 | A service has a known name if it doesn't start with @samp{:}. The | 139 | A service has a known name if it doesn't start with @samp{:}. The |
| 143 | result is a list of strings, which is @code{nil} when there are no | 140 | result 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 | |||
| 152 | For a given service, registered at D-Bus @var{bus} under the name | 148 | For 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 |
| 154 | list of strings, or @code{nil} when there are no queued names for | 150 | list 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 | |||
| 164 | For a given service, registered at D-Bus @var{bus} under the name | 159 | For 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 |
| 166 | string, or @code{nil} when there exist no name owner of @var{service}. | 161 | string, 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 | |||
| 175 | The unique name, under which Emacs is registered at D-Bus @var{bus}, | 169 | The unique name, under which Emacs is registered at D-Bus @var{bus}, |
| 176 | is returned as string. | 170 | is 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 | |||
| 184 | Objects can publish there interfaces to the D-Bus. This function | 177 | Objects can publish there interfaces to the D-Bus. This function |
| 185 | returns all interfaces of @var{service}, registered at object path | 178 | returns 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 | ||
| 217 | This example informs us, that the service @code{org.freedesktop.Hal} | 210 | This 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 | ||
| 279 | Output parameters of D-Bus methods and signals are mapped to Lisp | 272 | Output parameters of D-Bus methods and signals are mapped to Lisp |
| 280 | objects. This mapping is more powerful than the one for input | 273 | objects. This mapping is more powerful than the one for input |
| 281 | parameters, i.e. more types are supported by the current | 274 | parameters, i.e., more D-Bus types are supported by the current |
| 282 | implementation. | 275 | implementation. |
| 283 | 276 | ||
| 284 | @example | 277 | @example |
| @@ -326,7 +319,6 @@ be called, and a reply message returning the resulting output | |||
| 326 | parameters from the object. | 319 | parameters 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 | |||
| 330 | This function calls @var{method} on the D-Bus @var{bus}. @var{bus} is | 322 | This function calls @var{method} on the D-Bus @var{bus}. @var{bus} is |
| 331 | either the symbol @code{:system} or the symbol @code{:session}. | 323 | either 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 | |||
| 415 | are received by all objects which have registered for such a signal. | 407 | are 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 | |||
| 419 | This function is similar to @code{dbus-call-method}. The difference | 410 | This function is similar to @code{dbus-call-method}. The difference |
| 420 | is, that there are no returning output parameters. | 411 | is, 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 | |||
| 444 | With this function, an application registers for @var{signal} on the | 434 | With this function, an application registers for @var{signal} on the |
| 445 | D-Bus @var{bus}. | 435 | D-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 | |||
| 486 | Unregister @var{object} from the the D-Bus. @var{object} must be the | 475 | Unregister @var{object} from the the D-Bus. @var{object} must be the |
| 487 | result of a preceding @code{dbus-register-signal} call. | 476 | result 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 | |||
| 526 | callback function in order to retrieve the information from the event. | 515 | callback 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 | |||
| 530 | Returns the bus name @var{event} is coming from. | 518 | Returns the bus name @var{event} is coming from. |
| 531 | The result is either the symbol @code{:system} or the symbol @code{:session}. | 519 | The 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 | |||
| 536 | Returns the unique name of the D-Bus object @var{event} is coming from. | 523 | Returns 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 | |||
| 541 | Returns the object path of the D-Bus object @var{event} is coming from. | 527 | Returns 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 | |||
| 546 | Returns the interface name of of the D-Bus object @var{event} is coming from. | 531 | Returns 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 | |||
| 551 | Returns the member name of of the D-Bus object @var{event} is coming | 535 | Returns the member name of of the D-Bus object @var{event} is coming |
| 552 | from. It is either a signal name or a method name. | 536 | from. It is either a signal name or a method name. |
| 553 | @end defun | 537 | @end defun |