Mercurial > emacs
comparison doc/misc/dbus.texi @ 91304:c938ab6810a4
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-308
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 02 Jan 2008 04:13:39 +0000 |
parents | dd7c58c2342a |
children | 084340c0bd27 |
comparison
equal
deleted
inserted
replaced
91303:1ae1f4066439 | 91304:c938ab6810a4 |
---|---|
195 <node> | 195 <node> |
196 <interface name=\"org.freedesktop.Hal.Device\"> | 196 <interface name=\"org.freedesktop.Hal.Device\"> |
197 <method name=\"GetAllProperties\"> | 197 <method name=\"GetAllProperties\"> |
198 <arg name=\"properties\" direction=\"out\" type=\"a@{sv@}\"/> | 198 <arg name=\"properties\" direction=\"out\" type=\"a@{sv@}\"/> |
199 </method> | 199 </method> |
200 ... | 200 @dots{} |
201 <signal name=\"PropertyModified\"> | 201 <signal name=\"PropertyModified\"> |
202 <arg name=\"num_updates\" type=\"i\"/> | 202 <arg name=\"num_updates\" type=\"i\"/> |
203 <arg name=\"updates\" type=\"a(sbb)\"/> | 203 <arg name=\"updates\" type=\"a(sbb)\"/> |
204 </signal> | 204 </signal> |
205 </interface> | 205 </interface> |
206 ... | 206 @dots{} |
207 </node>" | 207 </node>" |
208 @end example | 208 @end example |
209 | 209 |
210 This example informs us, that the service @code{org.freedesktop.Hal} | 210 This example informs us, that the service @code{org.freedesktop.Hal} |
211 at object path @code{/org/freedesktop/Hal/devices/computer} offers the | 211 at object path @code{/org/freedesktop/Hal/devices/computer} offers the |
275 | 275 |
276 @noindent | 276 @noindent |
277 Example: | 277 Example: |
278 | 278 |
279 @lisp | 279 @lisp |
280 (dbus-call-method ... @var{NUMBER} @var{STRING}) | 280 (dbus-call-method @dots{} @var{NUMBER} @var{STRING}) |
281 @end lisp | 281 @end lisp |
282 | 282 |
283 is equivalent to | 283 is equivalent to |
284 | 284 |
285 @lisp | 285 @lisp |
286 (dbus-call-method ... :uint32 @var{NUMBER} :string @var{STRING}) | 286 (dbus-call-method @dots{} :uint32 @var{NUMBER} :string @var{STRING}) |
287 @end lisp | 287 @end lisp |
288 | 288 |
289 but different to | 289 but different to |
290 | 290 |
291 @lisp | 291 @lisp |
292 (dbus-call-method ... :int32 @var{NUMBER} :signature @var{STRING}) | 292 (dbus-call-method @dots{} :int32 @var{NUMBER} :signature @var{STRING}) |
293 @end lisp | 293 @end lisp |
294 | |
295 The value for a byte type can be any integer in the range 0 through | |
296 255. If a character is used as argument, modifiers represented | |
297 outside this range are stripped of. For example, @code{:byte ?x} is | |
298 equal to @code{:byte ?\M-x}, but it is not equal to @code{:byte | |
299 ?\C-x} or @code{:byte ?\M-\C-x}. | |
294 | 300 |
295 A D-Bus compound type is always represented as list. The car of this | 301 A D-Bus compound type is always represented as list. The car of this |
296 list can be the type symbol @code{:array}, @code{:variant}, | 302 list can be the type symbol @code{:array}, @code{:variant}, |
297 @code{:struct} or @code{:dict-entry}, which would result in a | 303 @code{:struct} or @code{:dict-entry}, which would result in a |
298 corresponding D-Bus container. @code{:array} is optional, because | 304 corresponding D-Bus container. @code{:array} is optional, because |
311 | 317 |
312 @noindent | 318 @noindent |
313 Example: | 319 Example: |
314 | 320 |
315 @lisp | 321 @lisp |
316 (dbus-send-signal ... | 322 (dbus-send-signal @dots{} |
317 :object-path STRING '(:variant :boolean BOOL) | 323 :object-path STRING '(:variant :boolean BOOL) |
318 '(:array NUMBER NUMBER) '(:array BOOL :boolean BOOL) | 324 '(:array NUMBER NUMBER) '(:array BOOL :boolean BOOL) |
319 '(:struct BOOL :boolean BOOL BOOL | 325 '(:struct BOOL :boolean BOOL BOOL |
320 (:array NUMBER NUMBER) (:array BOOL BOOL)) | 326 (:array NUMBER NUMBER) (:array BOOL BOOL)) |
321 '(:struct NUMBER NUMBER) '((:dict-entry NUMBER (NUMBER))) | 327 '(:struct NUMBER NUMBER) '((:dict-entry NUMBER (NUMBER))) |
363 The signal @code{PropertyModified}, discussed as example in | 369 The signal @code{PropertyModified}, discussed as example in |
364 @ref{Inspection}, would offer as Lisp data the following object | 370 @ref{Inspection}, would offer as Lisp data the following object |
365 (@var{BOOL} stands here for either @code{nil} or @code{t}): | 371 (@var{BOOL} stands here for either @code{nil} or @code{t}): |
366 | 372 |
367 @lisp | 373 @lisp |
368 (@var{NUMBER} ((@var{STRING} @var{BOOL} @var{BOOL}) (@var{STRING} @var{BOOL} @var{BOOL}) ...)) | 374 (@var{NUMBER} ((@var{STRING} @var{BOOL} @var{BOOL}) (@var{STRING} @var{BOOL} @var{BOOL}) @dots{})) |
369 @end lisp | 375 @end lisp |
370 | 376 |
371 | 377 |
372 @node Synchronous Methods | 378 @node Synchronous Methods |
373 @chapter Calling methods in a blocking way. | 379 @chapter Calling methods in a blocking way. |
458 power_management.type = \"acpi\" | 464 power_management.type = \"acpi\" |
459 smbios.bios.release_date = \"11/07/2001\" | 465 smbios.bios.release_date = \"11/07/2001\" |
460 system.chassis.manufacturer = \"COMPAL\" | 466 system.chassis.manufacturer = \"COMPAL\" |
461 system.chassis.type = \"Notebook\" | 467 system.chassis.type = \"Notebook\" |
462 system.firmware.release_date = \"03/19/2005\" | 468 system.firmware.release_date = \"03/19/2005\" |
463 ..." | 469 @dots{}" |
464 @end example | 470 @end example |
465 @end defun | 471 @end defun |
466 | 472 |
467 | 473 |
468 @node Signals | 474 @node Signals |
546 single string argument therefore. Plugging an USB device to your | 552 single string argument therefore. Plugging an USB device to your |
547 machine, when registered for signal @code{DeviceAdded}, will show you | 553 machine, when registered for signal @code{DeviceAdded}, will show you |
548 which objects the GNU/Linux @code{hal} daemon adds. | 554 which objects the GNU/Linux @code{hal} daemon adds. |
549 | 555 |
550 @code{dbus-register-signal} returns a Lisp symbol, which can be used | 556 @code{dbus-register-signal} returns a Lisp symbol, which can be used |
551 as argument in @code{dbus-unregister-signal} for removing the | 557 as argument in @code{dbus-unregister-object} for removing the |
552 registration for @var{signal}. | 558 registration for @var{signal}. |
553 @end defun | 559 @end defun |
554 | 560 |
555 @defun dbus-unregister-signal object | 561 @defun dbus-unregister-object object |
556 Unregister @var{object} from the the D-Bus. @var{object} must be the | 562 Unregister @var{object} from the the D-Bus. @var{object} must be the |
557 result of a preceding @code{dbus-register-signal} call. | 563 result of a preceding @code{dbus-register-signal} or |
564 @code{dbus-register-method} call. It returns @code{t} if @var{object} | |
565 has been unregistered, @code{nil} otherwise. | |
558 @end defun | 566 @end defun |
559 | 567 |
560 | 568 |
561 @node Errors and Events | 569 @node Errors and Events |
562 @chapter Errors and events. | 570 @chapter Errors and events. |
622 @defun dbus-event-member-name event | 630 @defun dbus-event-member-name event |
623 Returns the member name of of the D-Bus object @var{event} is coming | 631 Returns the member name of of the D-Bus object @var{event} is coming |
624 from. It is either a signal name or a method name. | 632 from. It is either a signal name or a method name. |
625 @end defun | 633 @end defun |
626 | 634 |
635 D-Bus errors are not propagated during event handling, because it is | |
636 usually not desired. D-Bus errors in events can be made visible by | |
637 setting the variable @code{dbus-debug} to @code{t}. | |
638 | |
627 | 639 |
628 @node GNU Free Documentation License | 640 @node GNU Free Documentation License |
629 @appendix GNU Free Documentation License | 641 @appendix GNU Free Documentation License |
630 @include doclicense.texi | 642 @include doclicense.texi |
631 | 643 |