|
|
@ -98,8 +98,16 @@ class MumbleCtlBase (object): |
|
|
|
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 +123,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; |
|
|
|