Ticket #73: gaim.py

File gaim.py, 1.0 KB (added by pharon, 6 years ago)
Line 
1# -*- coding: UTF-8 -*-
2# -*- python -*-
3# Copyright (C) 2006 by Sebastien Estienne
4#
5# This file may be distributed and/or modified under the terms of
6# the GNU General Public License version 2 as published by
7# the Free Software Foundation.
8# This file is distributed without any warranty; without even the implied
9# warranty of merchantability or fitness for a particular purpose.
10# See "COPYING" in the source distribution for more information.
11#
12
13from sdapplet.pluginutils import *
14import subprocess
15
16class plugin_gaim:
17    def __init__(self):
18        self.service_type = ["_presence._tcp"]
19        self.author = "Islam Amer"
20        self.description = "Start a bonjour chat with gaim"
21
22    def connect(self, use_host_names, name, stype, hostname, address, port, txts):
23        print "connecting using gaim"
24    cmdline = ["/usr/share/service-discovery-applet/tools/exec_wrapper", "gaim-remote", "bonjour:goim?screenname=%s" % ( name ) ]
25    print cmdline
26    pid = subprocess.Popen(cmdline, close_fds=True).pid
27
28def load():
29    return plugin_gaim()