diff options
| author | Michael Albinus | 2009-08-25 08:42:25 +0000 |
|---|---|---|
| committer | Michael Albinus | 2009-08-25 08:42:25 +0000 |
| commit | ecd3d54f20f4babfaf9a72226c916dfe967d4557 (patch) | |
| tree | dcc7b7cf7221959d4514aeaebcbb007b6565a3a5 /doc/misc | |
| parent | 3691a0a63892879761de7d19af1b19e104ba9f65 (diff) | |
| download | emacs-ecd3d54f20f4babfaf9a72226c916dfe967d4557.tar.gz emacs-ecd3d54f20f4babfaf9a72226c916dfe967d4557.zip | |
* dbus.texi (Bus names): Add optional parameter TIMEOUT to dbus-ping.
Describe autostart behaviour of dbus-ping.
(Synchronous Methods, Asynchronous Methods): Use English numeric format
for timeout values.
Diffstat (limited to 'doc/misc')
| -rw-r--r-- | doc/misc/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/misc/dbus.texi | 25 |
2 files changed, 24 insertions, 8 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index b1af3e86a4e..9056fdae35c 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2009-08-25 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * dbus.texi (Bus names): Add optional parameter TIMEOUT to dbus-ping. | ||
| 4 | Describe autostart behaviour of dbus-ping. | ||
| 5 | (Synchronous Methods, Asynchronous Methods): Use English numeric format | ||
| 6 | for timeout values. | ||
| 7 | |||
| 1 | 2009-08-23 Daiki Ueno <ueno@unixuser.org> | 8 | 2009-08-23 Daiki Ueno <ueno@unixuser.org> |
| 2 | 9 | ||
| 3 | * epa.texi (Quick start): Don't refer to nonexistent epa-mode. | 10 | * epa.texi (Quick start): Don't refer to nonexistent epa-mode. |
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi index 1c9c66103eb..7bf7529d1b4 100644 --- a/doc/misc/dbus.texi +++ b/doc/misc/dbus.texi | |||
| @@ -180,22 +180,31 @@ result is a string, or @code{nil} when there exist no name owner of | |||
| 180 | string. | 180 | string. |
| 181 | @end defun | 181 | @end defun |
| 182 | 182 | ||
| 183 | @defun dbus-ping bus service | 183 | @defun dbus-ping bus service &optional timeout |
| 184 | Check whether the service name @var{service} is registered at D-Bus | 184 | Check whether the service name @var{service} is registered at D-Bus |
| 185 | @var{bus}. @var{service} might not have been started yet. The result | 185 | @var{bus}. @var{service} might not have been started yet, it is |
| 186 | is either @code{t} or @code{nil}. | 186 | autostarted if possible. The result is either @code{t} or @code{nil}. |
| 187 | 187 | ||
| 188 | @var{bus} must be either the symbol @code{:system} or the symbol | 188 | @var{bus} must be either the symbol @code{:system} or the symbol |
| 189 | @code{:session}. @var{service} must be a string. Example: | 189 | @code{:session}. @var{service} must be a string. @var{timeout}, a |
| 190 | nonnegative integer, specifies the maximum number of milliseconds | ||
| 191 | @code{dbus-ping} must return. The default value is 25,000. Example: | ||
| 190 | 192 | ||
| 191 | @lisp | 193 | @lisp |
| 192 | (message | 194 | (message |
| 193 | "%s screensaver on board." | 195 | "%s screensaver on board." |
| 194 | (cond | 196 | (cond |
| 195 | ((dbus-ping :session "org.gnome.ScreenSaver") "Gnome") | 197 | ((dbus-ping :session "org.gnome.ScreenSaver" 100) "Gnome") |
| 196 | ((dbus-ping :session "org.freedesktop.ScreenSaver") "KDE") | 198 | ((dbus-ping :session "org.freedesktop.ScreenSaver" 100) "KDE") |
| 197 | (t "No"))) | 199 | (t "No"))) |
| 198 | @end lisp | 200 | @end lisp |
| 201 | |||
| 202 | If it shall be checked whether @var{service} is already running | ||
| 203 | without autostarting it, one shall apply | ||
| 204 | |||
| 205 | @lisp | ||
| 206 | (member service (dbus-list-known-names bus)) | ||
| 207 | @end lisp | ||
| 199 | @end defun | 208 | @end defun |
| 200 | 209 | ||
| 201 | @defun dbus-get-unique-name bus | 210 | @defun dbus-get-unique-name bus |
| @@ -1078,7 +1087,7 @@ an interface offered by @var{service}. It must provide @var{method}. | |||
| 1078 | 1087 | ||
| 1079 | If the parameter @code{:timeout} is given, the following integer | 1088 | If the parameter @code{:timeout} is given, the following integer |
| 1080 | @var{timeout} specifies the maximum number of milliseconds the method | 1089 | @var{timeout} specifies the maximum number of milliseconds the method |
| 1081 | call must return. The default value is 25.000. If the method call | 1090 | call must return. The default value is 25,000. If the method call |
| 1082 | doesn't return in time, a D-Bus error is raised (@pxref{Errors and | 1091 | doesn't return in time, a D-Bus error is raised (@pxref{Errors and |
| 1083 | Events}). | 1092 | Events}). |
| 1084 | 1093 | ||
| @@ -1194,7 +1203,7 @@ corresponding return message has arrived. If @var{handler} is | |||
| 1194 | 1203 | ||
| 1195 | If the parameter @code{:timeout} is given, the following integer | 1204 | If the parameter @code{:timeout} is given, the following integer |
| 1196 | @var{timeout} specifies the maximum number of milliseconds a reply | 1205 | @var{timeout} specifies the maximum number of milliseconds a reply |
| 1197 | message must arrive. The default value is 25.000. If there is no | 1206 | message must arrive. The default value is 25,000. If there is no |
| 1198 | reply message in time, a D-Bus error is raised (@pxref{Errors and | 1207 | reply message in time, a D-Bus error is raised (@pxref{Errors and |
| 1199 | Events}). | 1208 | Events}). |
| 1200 | 1209 | ||