From 27c6fade238336c61a5a01d22fe767bf664ca010 Mon Sep 17 00:00:00 2001 From: Sebastien Estienne Date: Sun, 6 Aug 2006 23:52:31 +0000 Subject: display error messages when something goes wrong in plugins git-svn-id: file:///home/lennart/svn/public/service-discovery-applet/trunk@115 3be567f1-68ff-0310-b24a-ad7cc433fd2f --- plugins/ekiga.py.in | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 plugins/ekiga.py.in (limited to 'plugins/ekiga.py.in') diff --git a/plugins/ekiga.py.in b/plugins/ekiga.py.in new file mode 100644 index 0000000..26b37fa --- /dev/null +++ b/plugins/ekiga.py.in @@ -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 = ["@toolsdir@/exec_wrapper", "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() -- cgit