| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | from sdapplet.pluginutils import * |
|---|
| 14 | import subprocess |
|---|
| 15 | |
|---|
| 16 | class 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 | |
|---|
| 28 | def load(): |
|---|
| 29 | return plugin_gaim() |
|---|