aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMichael Albinus2008-01-03 21:32:04 +0000
committerMichael Albinus2008-01-03 21:32:04 +0000
commit4db2806c441a6c7bd94fe9ecbf6bdf9ee7275cca (patch)
tree6ea77bed50ac6c690a06fa91e683a57704a670de /doc
parent5125905efd436e023d09290dad500e4e0eaed3d5 (diff)
downloademacs-4db2806c441a6c7bd94fe9ecbf6bdf9ee7275cca.tar.gz
emacs-4db2806c441a6c7bd94fe9ecbf6bdf9ee7275cca.zip
* dbus.texi (Type Conversion): Explain the type specification for empty
arrays. Use another example.
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/ChangeLog5
-rw-r--r--doc/misc/dbus.texi56
2 files changed, 41 insertions, 20 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 4db888d6e44..b8e7a342644 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,8 @@
12008-01-03 Michael Albinus <michael.albinus@gmx.de>
2
3 * dbus.texi (Type Conversion): Explain the type specification for empty
4 arrays. Use another example.
5
12007-12-30 Michael Albinus <michael.albinus@gmx.de> 62007-12-30 Michael Albinus <michael.albinus@gmx.de>
2 7
3 * dbus.texi (all): Replace "..." by @dots{}. 8 * dbus.texi (all): Replace "..." by @dots{}.
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi
index d8f2f590360..c3fc8c2d766 100644
--- a/doc/misc/dbus.texi
+++ b/doc/misc/dbus.texi
@@ -6,7 +6,7 @@
6@c %**end of header 6@c %**end of header
7 7
8@copying 8@copying
9Copyright @copyright{} 2007 Free Software Foundation, Inc. 9Copyright @copyright{} 2007, 2008 Free Software Foundation, Inc.
10 10
11@quotation 11@quotation
12Permission is granted to copy, distribute and/or modify this document 12Permission is granted to copy, distribute and/or modify this document
@@ -292,40 +292,56 @@ but different to
292(dbus-call-method @dots{} :int32 @var{NUMBER} :signature @var{STRING}) 292(dbus-call-method @dots{} :int32 @var{NUMBER} :signature @var{STRING})
293@end lisp 293@end lisp
294 294
295The value for a byte type can be any integer in the range 0 through 295The value for a byte D-Bus type can be any integer in the range 0
296255. If a character is used as argument, modifiers represented 296through 255. If a character is used as argument, modifiers
297outside this range are stripped of. For example, @code{:byte ?x} is 297represented outside this range are stripped of. For example,
298equal to @code{:byte ?\M-x}, but it is not equal to @code{:byte 298@code{:byte ?x} is equal to @code{:byte ?\M-x}, but it is not equal to
299?\C-x} or @code{:byte ?\M-\C-x}. 299@code{:byte ?\C-x} or @code{:byte ?\M-\C-x}.
300 300
301A D-Bus compound type is always represented as list. The car of this 301A D-Bus compound type is always represented as a list. The @sc{car}
302list can be the type symbol @code{:array}, @code{:variant}, 302of this list can be the type symbol @code{:array}, @code{:variant},
303@code{:struct} or @code{:dict-entry}, which would result in a 303@code{:struct} or @code{:dict-entry}, which would result in a
304corresponding D-Bus container. @code{:array} is optional, because 304corresponding D-Bus container. @code{:array} is optional, because
305this is the default compoud type for a list. 305this is the default compound D-Bus type for a list.
306 306
307The objects being elements of the list are checked according to the 307The objects being elements of the list are checked according to the
308D-Bus compound type rules. 308D-Bus compound type rules.
309 309
310@itemize 310@itemize
311@item An array must contain only elements of the same D-Bus type. 311@item An array must contain only elements of the same D-Bus type. It
312can be empty.
313
312@item A variant must contain only one single element. 314@item A variant must contain only one single element.
315
313@item A dictionary entry must be element of an array, and it must 316@item A dictionary entry must be element of an array, and it must
314contain only a key-value pair of two element, with a basic type key. 317contain only a key-value pair of two elements, with a basic D-Bus type
318key.
319
315@item There is no restriction for structs. 320@item There is no restriction for structs.
316@end itemize 321@end itemize
317 322
318@noindent 323If an empty array needs an element D-Bus type other than string, it
319Example: 324can contain exactly one element of D-Bus type @code{:signature}. The
325value of this element (a string) is used as the signature of the
326elements of this array. Example:
320 327
321@lisp 328@lisp
322(dbus-send-signal @dots{} 329(dbus-call-method
323 :object-path STRING '(:variant :boolean BOOL) 330 :session "org.freedesktop.Notifications"
324 '(:array NUMBER NUMBER) '(:array BOOL :boolean BOOL) 331 "/org/freedesktop/Notifications"
325 '(:struct BOOL :boolean BOOL BOOL 332 "org.freedesktop.Notifications" "Notify"
326 (:array NUMBER NUMBER) (:array BOOL BOOL)) 333 "GNU Emacs" ;; Application name.
327 '(:struct NUMBER NUMBER) '((:dict-entry NUMBER (NUMBER))) 334 0 ;; No replacement of other notifications.
328 '(:array (:dict-entry NUMBER :int32 NUMBER))) 335 "" ;; No icon.
336 "Notification summary" ;; Summary.
337 (format ;; Body.
338 "This is a test notification, raised from %s" (emacs-version))
339 '(:array) ;; No actions (empty array of strings).
340 '(:array :signature "@{sv@}") ;; No hints
341 ;; (empty array of dictionary entries).
342 ':int32 -1) ;; Default timeout.
343
344@result{} 3
329@end lisp 345@end lisp
330 346
331 347