diff frontends/sat_bridge_frontend/DBus.py @ 65:d35c5edab53f

SàT: multi-profile: memory & dbus bridge's methods profile management /!\ profiles not managed yet for dbus signals
author Goffi <goffi@goffi.org>
date Sun, 31 Jan 2010 15:57:03 +1100
parents d46f849664aa
children 8147b4f40809
line wrap: on
line diff
--- a/frontends/sat_bridge_frontend/DBus.py	Sat Jan 30 16:17:33 2010 +1100
+++ b/frontends/sat_bridge_frontend/DBus.py	Sun Jan 31 15:57:03 2010 +1100
@@ -40,29 +40,69 @@
         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, profile_key='@DEFAULT@'):
+        return self.db_comm_iface.disconnect(profile_key)
+    
+    def isConnected(self, profile_key='@DEFAULT@'):
+        return self.db_comm_iface.isConnected(profile_key)
 
-    def disconnect(self):
-        return self.db_comm_iface.disconnect()
+    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 getContacts(self):
-        return self.db_comm_iface.getContacts()
+    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 getPresenceStatus(self):
-        return self.db_comm_iface.getPresenceStatus()
+    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 getWaitingSub(self):
-        return self.db_comm_iface.getWaitingSub()
+    def getParamsCategories(self):
+        return self.db_comm_iface.getParamsCategories(profile_key)
 
-    def sendMessage(self, to, message):
-        return self.db_comm_iface.sendMessage(to, message)
+    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 @@
 
     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: