SàT: multi-profile, plugins updated

- core: 2 new convenient methods: getJidNStream and getClient
- new param in plugin info: "handler" to know if there is a handler to plug on profiles clients
- plugins with handler now use an other class which is returned to profile client with the new method "getHandler" and pluged when connecting
This commit is contained in:
Goffi 2010-01-30 16:17:33 +11:00
commit 656bea30dd

View file

@ -224,7 +224,10 @@ class Param():
error('Requesting a param for an non-existant profile')
return None
return self.__getParam(profile, category, name) or node[1].getAttribute(attr)
if attr == "value":
return self.__getParam(profile, category, name) or node[1].getAttribute(attr)
else:
return node[1].getAttribute(attr)
def __getParam(self, profile, category, name, type='individual'):
@ -550,8 +553,8 @@ class Memory:
debug ("Memory getPresenceStatus (%s)", self.presenceStatus)
return self.presenceStatus
def getParamA(self, name, category, attr="value"):
return self.params.getParamA(name, category, attr)
def getParamA(self, name, category, attr="value", profile_key="@DEFAULT@"):
return self.params.getParamA(name, category, attr, profile_key)
def getParams(self):
return self.params.getParams()