~gnome15-team/gnome15/trunk

« back to all changes in this revision

Viewing changes to gnome15-plugins/src/voip-mumble/voip-mumble.py

  • Committer: tanktarta
  • Date: 2012-11-24 10:27:36 UTC
  • Revision ID: tanktarta-20121124102736-0drhasy3jdn862wx
0.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#        +-----------------------------------------------------------------------------+
 
2
#        | GPL                                                                         |
 
3
#        +-----------------------------------------------------------------------------+
 
4
#        | Copyright (c) Brett Smith <tanktarta@blueyonder.co.uk>                      |
 
5
#        |                                                                             |
 
6
#        | This program is free software; you can redistribute it and/or               |
 
7
#        | modify it under the terms of the GNU General Public License                 |
 
8
#        | as published by the Free Software Foundation; either version 2              |
 
9
#        | of the License, or (at your option) any later version.                      |
 
10
#        |                                                                             |
 
11
#        | This program is distributed in the hope that it will be useful,             |
 
12
#        | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
 
13
#        | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
 
14
#        | GNU General Public License for more details.                                |
 
15
#        |                                                                             |
 
16
#        | You should have received a copy of the GNU General Public License           |
 
17
#        | along with this program; if not, write to the Free Software                 |
 
18
#        | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
 
19
#        +-----------------------------------------------------------------------------+
 
20
#
 
21
 
 
22
import gnome15.g15locale as g15locale
 
23
_ = g15locale.get_translation("voip-mumble", modfile = __file__).ugettext
 
24
 
 
25
import gnome15.g15driver as g15driver
 
26
import gnome15.g15util as g15util
 
27
import ts3
 
28
import traceback
 
29
from threading import Thread
 
30
from threading import Lock
 
31
from threading import RLock
 
32
from threading import Semaphore
 
33
import voip
 
34
import os
 
35
import base64
 
36
import socket
 
37
import errno
 
38
 
 
39
# Plugin details 
 
40
id="voip-mumble"
 
41
name=_("Mumble")
 
42
description=_("Provides integration with Mumble. Note, this plugin also\n\
 
43
requires the 'Voip' plugin as well which provides the user interface.")
 
44
author="Brett Smith <tanktarta@blueyonder.co.uk>"
 
45
copyright=_("Copyright (C)2011 Brett Smith")
 
46
site="http://www.gnome15.org/"
 
47
has_preferences=False
 
48
unsupported_models = [ g15driver.MODEL_G110, g15driver.MODEL_G11, g15driver.MODEL_G930, g15driver.MODEL_G35 ]
 
49
 
 
50
# This plugin only supplies classes to the 'voip' plugin and so is never activated 
 
51
passive=True 
 
52
global_plugin=True
 
53
 
 
54
# Logging
 
55
import logging
 
56
logger = logging.getLogger("voip-mumble")
 
57
 
 
58
"""
 
59
Calendar Back-end module functions
 
60
"""
 
61
 
 
62
def create_backend():
 
63
    return MumbleBackend()
 
64
 
 
65
"""
 
66
Mumble backend
 
67
"""
 
68
 
 
69
class MumbleBackend(voip.VoipBackend):
 
70
    
 
71
    def __init__(self):
 
72
        voip.VoipBackend.__init__(self)
 
73
    
 
74
    def get_name(self):
 
75
        raise _("Mumble")
 
76
    
 
77
    def start(self, plugin):
 
78
        raise Exception("Not implemented")
 
79
    
 
80
    def stop(self):
 
81
        raise Exception("Not implemented")
 
82
    
 
83
    def get_current_channel(self):
 
84
        """
 
85
        Get the current channel
 
86
        """
 
87
        raise Exception("Not implemented")
 
88
    
 
89
    def get_talking(self):
 
90
        """
 
91
        Get who is talking
 
92
        """
 
93
        raise Exception("Not implemented")
 
94
    
 
95
    def get_me(self):
 
96
        """
 
97
        Get the local user's buddy entry
 
98
        """
 
99
        raise Exception("Not implemented")
 
100
    
 
101
    def get_channels(self):
 
102
        raise Exception("Not implemented")
 
103
    
 
104
    def get_buddies(self, current_channel=True):
 
105
        raise Exception("Not implemented")
 
106
    
 
107
    def get_icon(self):
 
108
        raise Exception("Not implemented")
 
109
    
 
110
    def set_audio_input(self, mute):
 
111
        raise Exception("Not implemented")
 
112
    
 
113
    def set_audio_output(self, mute):
 
114
        raise Exception("Not implemented")
 
115
    
 
116
    def away(self):
 
117
        raise Exception("Not implemented")
 
118
    
 
119
    def online(self):
 
120
        raise Exception("Not implemented")