SàT: multi-profile: memory & dbus bridge's methods profile management

/!\ profiles not managed yet for dbus signals
This commit is contained in:
Goffi 2010-01-31 15:57:03 +11:00
commit 54730cb077

View file

@ -40,29 +40,69 @@ class DBusBridgeFrontend(BridgeFrontend):
elif iface == "request":
self.db_req_iface.connect_to_signal(functionName, handler)
def connect(self):
return self.db_comm_iface.connect()
def connect(self, profile_key='@DEFAULT@'):
return self.db_comm_iface.connect(profile_key)
def disconnect(self):
return self.db_comm_iface.disconnect()
def getContacts(self):
return self.db_comm_iface.getContacts()
def disconnect(self, profile_key='@DEFAULT@'):
return self.db_comm_iface.disconnect(profile_key)
def getPresenceStatus(self):
return self.db_comm_iface.getPresenceStatus()
def isConnected(self, profile_key='@DEFAULT@'):
return self.db_comm_iface.isConnected(profile_key)
def getWaitingSub(self):
return self.db_comm_iface.getWaitingSub()
def sendMessage(self, to, message):
return self.db_comm_iface.sendMessage(to, message)
def getContacts(self, profile_key='@DEFAULT@'):
return self.db_comm_iface.getContacts(profile_key)
def getPresenceStatus(self, profile_key='@DEFAULT@'):
return self.db_comm_iface.getPresenceStatus(profile_key)
def getWaitingSub(self, profile_key='@DEFAULT@'):
return self.db_comm_iface.getWaitingSub(profile_key)
def sendMessage(self, to, message, profile_key='@DEFAULT@'):
return self.db_comm_iface.sendMessage(to, message, profile_key)
def setPresence(self, to="", show="", priority=0, statuses={}, profile_key='@DEFAULT@'):
return self.db_comm_iface.setPresence(to, show, priority, statuses, profile_key)
def subscription(self, type, entity, profile_key='@DEFAULT@'):
return self.db_comm_iface.subscription(type, entity, profile_key)
def setParam(self, name, value, category, profile_key='@DEFAULT@'):
return self.db_comm_iface.setParam(name, value, category, profile_key)
def getParamA(self, name, category, profile_key='@DEFAULT@'):
return self.db_comm_iface.getParamA(name, category, profile_key)
def getParams(self, profile_key='@DEFAULT@'):
return self.db_comm_iface.getParams(profile_key)
def getParamsForCategory(self, category, profile_key='@DEFAULT@'):
return self.db_comm_iface.getParamsForCategory(category, profile_key)
def getParamsCategories(self):
return self.db_comm_iface.getParamsCategories(profile_key)
def getHistory(self, from_jid, to_jid, size):
return self.db_comm_iface.getHistory(from_jid, to_jid, size)
def addContact(self, jid, profile_key='@DEFAULT@'):
return self.db_comm_iface.addContact(jid, profile_key)
def delContact(self, jid, profile_key='@DEFAULT@'):
return self.db_comm_iface.delContact(jid, profile_key)
def launchAction(self, type, data):
return self.db_req_iface.launchAction(type, data)
def confirmationAnswer(self, id, accepted, data):
return self.db_req_iface.confirmationAnswer(id, accepted, data)
#methods from plugins
def sendFile(self, to, path, profile_key='@DEFAULT@'):
return self.db_comm_iface.sendFile(to, path, profile_key)
def findGateways(self, target):
return self.db_comm_iface.findGateways(target)
def findGateways(self, target, profile_key='@DEFAULT@'):
return self.db_comm_iface.findGateways(target, profile_key)
def getCard(self, target, profile_key='@DEFAULT@'):
return self.db_comm_iface.getCard(target, profile_key)
@ -75,45 +115,6 @@ class DBusBridgeFrontend(BridgeFrontend):
def in_band_register(self, target, profile_key='@DEFAULT@'):
return self.db_comm_iface.in_band_register(target, profile_key)
def setPresence(self, to="", show="", priority=0, statuses={}):
return self.db_comm_iface.setPresence(to, show, priority, statuses)
def subscription(self, type, entity):
return self.db_comm_iface.subscription(type, entity)
def setParam(self, name, value, category):
return self.db_comm_iface.setParam(name, value, category)
def getParamA(self, name, category):
return self.db_comm_iface.getParamA(name, category)
def getParams(self):
return self.db_comm_iface.getParams()
def getParamsForCategory(self, category):
return self.db_comm_iface.getParamsForCategory(category)
def getParamsCategories(self):
return self.db_comm_iface.getParamsCategories()
def getHistory(self, from_jid, to_jid, size):
return self.db_comm_iface.getHistory(from_jid, to_jid, size)
def addContact(self, jid):
return self.db_comm_iface.addContact(jid)
def delContact(self, jid):
return self.db_comm_iface.delContact(jid)
def isConnected(self):
return self.db_comm_iface.isConnected()
def launchAction(self, type, data):
return self.db_req_iface.launchAction(type, data)
def confirmationAnswer(self, id, accepted, data):
return self.db_req_iface.confirmationAnswer(id, accepted, data)
def gatewayRegister(self, action, target, data):
if data == None: