diff options
| author | Michael Albinus | 2009-06-30 21:13:29 +0000 |
|---|---|---|
| committer | Michael Albinus | 2009-06-30 21:13:29 +0000 |
| commit | d557e7a69b2e835547d9349e76ff6821c220bc42 (patch) | |
| tree | bb0329bb0a4f5c5c741756ef995fb4deeb9d278c | |
| parent | 551b8e0b8cb914d98e1c0d6b85f8c0ab1e6d6846 (diff) | |
| download | emacs-d557e7a69b2e835547d9349e76ff6821c220bc42.tar.gz emacs-d557e7a69b2e835547d9349e76ff6821c220bc42.zip | |
* net/tramp-gvfs.el (top): Add a default for "synce" in
`tramp-default-user-alist'.
(tramp-hal-service, tramp-hal-path-manager)
(tramp-hal-interface-manager, tramp-hal-interface-device): New
defconst.
(tramp-synce-list-devices, tramp-synce-parse-device-names): New
defuns.
| -rw-r--r-- | lisp/net/tramp-gvfs.el | 61 |
1 files changed, 41 insertions, 20 deletions
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index aaba49e8154..3737628d2c9 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el | |||
| @@ -36,11 +36,11 @@ | |||
| 36 | ;; development time, is given in respective comments. | 36 | ;; development time, is given in respective comments. |
| 37 | 37 | ||
| 38 | ;; The customer option `tramp-gvfs-methods' contains the list of | 38 | ;; The customer option `tramp-gvfs-methods' contains the list of |
| 39 | ;; supported connection methods. Per default, these are "dav", "davs" | 39 | ;; supported connection methods. Per default, these are "dav", |
| 40 | ;; and "obex". Note that with "obex" it might be necessary to pair | 40 | ;; "davs", "obex" and "synce". Note that with "obex" it might be |
| 41 | ;; with the other bluetooth device, if it hasn't been done already. | 41 | ;; necessary to pair with the other bluetooth device, if it hasn't |
| 42 | ;; There might be also some few seconds delay in discovering available | 42 | ;; been done already. There might be also some few seconds delay in |
| 43 | ;; bluetooth devices. | 43 | ;; discovering available bluetooth devices. |
| 44 | 44 | ||
| 45 | ;; Other possible connection methods are "ftp", "sftp" and "smb". | 45 | ;; Other possible connection methods are "ftp", "sftp" and "smb". |
| 46 | ;; When one of these methods is added to the list, the remote access | 46 | ;; When one of these methods is added to the list, the remote access |
| @@ -65,11 +65,12 @@ | |||
| 65 | ;; drop me a note. | 65 | ;; drop me a note. |
| 66 | 66 | ||
| 67 | ;; For hostname completion, information is retrieved either from the | 67 | ;; For hostname completion, information is retrieved either from the |
| 68 | ;; bluez daemon (for the "obex" method), or from the zeroconf daemon | 68 | ;; bluez daemon (for the "obex" method), the hal daemon (for the |
| 69 | ;; (for the "dav", "davs", and "sftp" methods). The zeroconf daemon | 69 | ;; "synce" method), or from the zeroconf daemon (for the "dav", |
| 70 | ;; is pre-configured to discover services in the "local" domain. If | 70 | ;; "davs", and "sftp" methods). The zeroconf daemon is pre-configured |
| 71 | ;; another domain shall be used for discovering services, the customer | 71 | ;; to discover services in the "local" domain. If another domain |
| 72 | ;; option `tramp-gvfs-zeroconf-domain' can be set accordingly. | 72 | ;; shall be used for discovering services, the customer option |
| 73 | ;; `tramp-gvfs-zeroconf-domain' can be set accordingly. | ||
| 73 | 74 | ||
| 74 | ;; Restrictions: | 75 | ;; Restrictions: |
| 75 | 76 | ||
| @@ -109,6 +110,11 @@ | |||
| 109 | (const "smb") | 110 | (const "smb") |
| 110 | (const "synce")))) | 111 | (const "synce")))) |
| 111 | 112 | ||
| 113 | ;; Add a default for `tramp-default-user-alist'. Rule: For the SYNCE | ||
| 114 | ;; method, no user is chosen. | ||
| 115 | (add-to-list 'tramp-default-user-alist | ||
| 116 | '("synce" nil nil)) | ||
| 117 | |||
| 112 | (defcustom tramp-gvfs-zeroconf-domain "local" | 118 | (defcustom tramp-gvfs-zeroconf-domain "local" |
| 113 | "*Zeroconf domain to be used for discovering services, like host names." | 119 | "*Zeroconf domain to be used for discovering services, like host names." |
| 114 | :group 'tramp | 120 | :group 'tramp |
| @@ -337,6 +343,19 @@ It keeps the timestamp of last discovery.") | |||
| 337 | "Alist of detected bluetooth devices. | 343 | "Alist of detected bluetooth devices. |
| 338 | Every entry is a list (NAME ADDRESS).") | 344 | Every entry is a list (NAME ADDRESS).") |
| 339 | 345 | ||
| 346 | (defconst tramp-hal-service "org.freedesktop.Hal" | ||
| 347 | "The well known name of the HAL service.") | ||
| 348 | |||
| 349 | (defconst tramp-hal-path-manager "/org/freedesktop/Hal/Manager" | ||
| 350 | "The object path of the HAL daemon manager.") | ||
| 351 | |||
| 352 | (defconst tramp-hal-interface-manager "org.freedesktop.Hal.Manager" | ||
| 353 | "The manager interface of the HAL daemon.") | ||
| 354 | |||
| 355 | (defconst tramp-hal-interface-device "org.freedesktop.Hal.Device" | ||
| 356 | "The device interface of the HAL daemon.") | ||
| 357 | |||
| 358 | |||
| 340 | ;; New handlers should be added here. | 359 | ;; New handlers should be added here. |
| 341 | (defconst tramp-gvfs-file-name-handler-alist | 360 | (defconst tramp-gvfs-file-name-handler-alist |
| 342 | '( | 361 | '( |
| @@ -1178,22 +1197,24 @@ be used." | |||
| 1178 | ;; D-Bus SYNCE functions. | 1197 | ;; D-Bus SYNCE functions. |
| 1179 | 1198 | ||
| 1180 | (defun tramp-synce-list-devices () | 1199 | (defun tramp-synce-list-devices () |
| 1181 | "Returns all discovered synce devices as list." | 1200 | "Returns all discovered synce devices as list. |
| 1201 | They are retrieved from the hal daemon." | ||
| 1182 | (let (tramp-synce-devices) | 1202 | (let (tramp-synce-devices) |
| 1183 | (dolist (device | 1203 | (dolist (device |
| 1184 | (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t | 1204 | (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t |
| 1185 | :system "org.freedesktop.Hal" | 1205 | :system tramp-hal-service tramp-hal-path-manager |
| 1186 | "/org/freedesktop/Hal/Manager" | 1206 | tramp-hal-interface-manager "GetAllDevices")) |
| 1187 | "org.freedesktop.Hal.Manager" "GetAllDevices")) | 1207 | (when (and (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t |
| 1188 | (when (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t | 1208 | :system tramp-hal-service device tramp-hal-interface-device |
| 1189 | :system "org.freedesktop.Hal" device | 1209 | "PropertyExists" "sync.plugin") |
| 1190 | "org.freedesktop.Hal.Device" "PropertyExists" "sync.plugin") | 1210 | (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t |
| 1211 | :system tramp-hal-service device tramp-hal-interface-device | ||
| 1212 | "PropertyExists" "pda.pocketpc.name")) | ||
| 1191 | (add-to-list | 1213 | (add-to-list |
| 1192 | 'tramp-synce-devices | 1214 | 'tramp-synce-devices |
| 1193 | (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t | 1215 | (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t |
| 1194 | :system "org.freedesktop.Hal" device | 1216 | :system tramp-hal-service device tramp-hal-interface-device |
| 1195 | "org.freedesktop.Hal.Device" | 1217 | "GetPropertyString" "pda.pocketpc.name")))) |
| 1196 | "GetPropertyString" "pda.pocketpc.name")))) | ||
| 1197 | (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices) | 1218 | (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices) |
| 1198 | tramp-synce-devices)) | 1219 | tramp-synce-devices)) |
| 1199 | 1220 | ||