Updated to current hg head of mumble-django

This commit is contained in:
2010-03-23 10:00:05 +00:00
parent edc5def1f3
commit d2b47da704
57 changed files with 6102 additions and 339 deletions

View File

@@ -17,89 +17,22 @@
import re
class MumbleCtlBase (object):
class MumbleCtlBase(object):
""" This class defines the base interface that the Mumble model expects. """
cache = {};
def getAllConf(self, srvid):
raise NotImplementedError( "mctl::getAllConf" );
def getVersion( self ):
raise NotImplementedError( "mctl::getVersion" );
def getConf(self, srvid, key):
raise NotImplementedError( "mctl::getConf" );
def setConf(self, srvid, key, value):
raise NotImplementedError( "mctl::setConf" );
def getDefaultConf(self):
raise NotImplementedError( "mctl::getDefaultConf" );
def newServer(self):
raise NotImplementedError( "mctl::newServer" );
def setSuperUserPassword(self, srvid, value):
raise NotImplementedError( "mctl::setSuperUserPassword" );
def start(self, srvid):
raise NotImplementedError( "mctl::start" );
def stop(self, srvid):
raise NotImplementedError( "mctl::stop" );
def isBooted(self, srvid):
raise NotImplementedError( "mctl::isBooted" );
def deleteServer(self, srvid):
raise NotImplementedError( "mctl::deleteServer" );
def getPlayers(self, srvid):
raise NotImplementedError( "mctl::getPlayers" );
def getRegisteredPlayers(self, srvid, filter):
raise NotImplementedError( "mctl::getRegisteredPlayers" );
def getChannels(self, srvid):
raise NotImplementedError( "mctl::getChannels" );
def registerPlayer(self, srvid, name, email, password):
raise NotImplementedError( "mctl::registerPlayer" );
def getRegistration(self, srvid, mumbleid):
raise NotImplementedError( "mctl::getRegistration" );
def setRegistration(self, srvid, mumbleid, name, email, password):
raise NotImplementedError( "mctl::setRegistration" );
def unregisterPlayer(self, srvid, mumbleid):
raise NotImplementedError( "mctl::unregisterPlayer" );
def getBootedServers(self):
raise NotImplementedError( "mctl::getBootedServers" );
def getAllServers(self):
raise NotImplementedError( "mctl::getAllServers" );
def getACL(self, srvid, channelid):
raise NotImplementedError( "mctl::getACL" );
def setACL(self, srvid, channelid, acl, groups, inherit):
raise NotImplementedError( "mctl::setACL" );
def getTexture(self, srvid, mumbleid):
raise NotImplementedError( "mctl::getTexture" );
def setTexture(self, srvid, mumbleid, infile):
raise NotImplementedError( "mctl::setTexture" );
def verifyPassword( self, srvid, username, password ):
raise NotImplementedError( "mctl::verifyPassword" );
@staticmethod
def newInstance( connstring, slicefile ):
""" Create a new CTL object for the given connstring. """
def newInstance( connstring, slicefile=None, icesecret=None ):
""" Create a new CTL object for the given connstring.
Optional parameters are the path to the slice file and the
Ice secret necessary to authenticate to Murmur.
The path can be omitted only if using DBus or running Murmur
1.2.3 or later, which exports a getSlice method to retrieve
the Slice from.
"""
# check cache
if connstring in MumbleCtlBase.cache:
@@ -115,7 +48,7 @@ class MumbleCtlBase (object):
ctl = MumbleCtlDbus( connstring )
else:
from MumbleCtlIce import MumbleCtlIce
ctl = MumbleCtlIce( connstring, slicefile )
ctl = MumbleCtlIce( connstring, slicefile, icesecret )
MumbleCtlBase.cache[connstring] = ctl;
return ctl;
@@ -123,6 +56,3 @@ class MumbleCtlBase (object):
@staticmethod
def clearCache():
MumbleCtlBase.cache = {};