summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Droege <slomo@ubuntu.com>2005-11-13 17:18:10 +0000
committerSebastian Droege <slomo@ubuntu.com>2005-11-13 17:18:10 +0000
commit1011f7c70dcd9b3d78898e40e6bc91c6983ce97e (patch)
treed578a5ff0ab6f428a394a16294ae3f09c205af67
parent0a0184ef6366934edb36664444089e04622d6d32 (diff)
* Added webdav, webdavs browsing support
git-svn-id: file:///home/lennart/svn/public/service-discovery-applet/trunk@76 3be567f1-68ff-0310-b24a-ad7cc433fd2f
-rwxr-xr-xactions/services/__init__.py.in21
-rwxr-xr-xsrc/service-discovery-applet.in2
2 files changed, 22 insertions, 1 deletions
diff --git a/actions/services/__init__.py.in b/actions/services/__init__.py.in
index c08dc81..c55adfe 100755
--- a/actions/services/__init__.py.in
+++ b/actions/services/__init__.py.in
@@ -85,6 +85,20 @@ def _https_tcp(name, hostname, address, port, txts):
password = get_txt_value(txts,"p")
url = build_url("https",address,port, path, username,password)
gnome.url_show(url)
+
+def _webdav_tcp(name, hostname, address, port, txts):
+ path = get_txt_value(txts,"path")
+ username = get_txt_value(txts,"u")
+ password = get_txt_value(txts,"p")
+ url = build_url("dav",address,port, path, username,password)
+ gnome.url_show(url)
+
+def _webdavs_tcp(name, hostname, address, port, txts):
+ path = get_txt_value(txts,"path")
+ username = get_txt_value(txts,"u")
+ password = get_txt_value(txts,"p")
+ url = build_url("dav",address,port, path, username,password)
+ gnome.url_show(url)
def _ftp_tcp(name, hostname, address, port, txts):
path = get_txt_value(txts,"path")
@@ -198,7 +212,12 @@ def handle(name, stype, hostname, address, port, txts):
if stype == "_sftp-ssh._tcp":
_sftpssh_tcp(name, hostname, address, port, txts)
return
-
+ if stype == "_webdav._tcp":
+ _webdav_tcp(name, hostname, address, port, txts)
+ return
+ if stype == "_webdavs._tcp":
+ _webdavs_tcp(name, hostname, address, port, txts)
+ return
if __name__ == "__main__":
print build_url()
diff --git a/src/service-discovery-applet.in b/src/service-discovery-applet.in
index ce7f083..0c848ea 100755
--- a/src/service-discovery-applet.in
+++ b/src/service-discovery-applet.in
@@ -66,6 +66,8 @@ first_run_services = {
"_ssh._tcp" : True,
"_sftp-ssh._tcp" : False,
"_ftp._tcp" : True,
+ "_webdav._tcp" : False,
+ "_webdavs._tcp": False
}