summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Droege <slomo@ubuntu.com>2006-03-06 17:53:49 +0000
committerSebastian Droege <slomo@ubuntu.com>2006-03-06 17:53:49 +0000
commit69ae45a7a8ae9adedb163199288f573a220bfa7e (patch)
tree713e92577a70d9784c1e65645b50125564800272
parent8184058a60a504aff222328a7131d9a191f26f6c (diff)
* add ekiga plugin
git-svn-id: file:///home/lennart/svn/public/service-discovery-applet/trunk@96 3be567f1-68ff-0310-b24a-ad7cc433fd2f
-rw-r--r--plugins/Makefile.am3
-rw-r--r--plugins/ekiga.py37
2 files changed, 39 insertions, 1 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 772cd8b..1780573 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -2,7 +2,8 @@ pluginsdir = $(PLUGINSDIR)
plugins_DATA = \
gconfterminal.py \
- nautilus.py
+ nautilus.py \
+ ekiga.py
EXTRA_DIST = $(plugins_DATA)
diff --git a/plugins/ekiga.py b/plugins/ekiga.py
new file mode 100644
index 0000000..c83b40a
--- /dev/null
+++ b/plugins/ekiga.py
@@ -0,0 +1,37 @@
+# -*- coding: UTF-8 -*-
+# -*- python -*-
+# Copyright (C) 2006 by Sebastian Dröge
+#
+# This file may be distributed and/or modified under the terms of
+# the GNU General Public License version 2 as published by
+# the Free Software Foundation.
+# This file is distributed without any warranty; without even the implied
+# warranty of merchantability or fitness for a particular purpose.
+# See "COPYING" in the source distribution for more information.
+#
+# $id$
+#
+
+from sdapplet.pluginutils import *
+import subprocess
+
+class plugin_ekiga:
+ def __init__(self):
+ self.service_type = ["_h323._tcp", "_sip._udp"]
+ self.author = "Sebastian Dröge"
+ self.description = "Start SIP/h323 connections with Ekiga"
+
+ def connect(self, use_host_names, name, stype, hostname, address, port, txts):
+ if use_host_names == True:
+ address = hostname
+ print "connecting using ekiga"
+ cmdline = ["ekiga"]
+ if stype == "_sip._udp":
+ cmdline += ["-c", "sip:%s:%s" % (address, port)]
+ else:
+ cmdline += ["-c", "h323:%s:%s" % (address, port)]
+ print cmdline
+ pid = subprocess.Popen(cmdline).pid
+
+def load():
+ return plugin_ekiga()