diff sat.tac @ 18:6928e3cb73a8

refactoring: using xml params part II
author Goffi <goffi@goffi.org>
date Fri, 06 Nov 2009 23:31:00 +0100
parents 74a39f40eb6d
children bb72c29f3432
line wrap: on
line diff
--- a/sat.tac	Fri Nov 06 19:48:57 2009 +0100
+++ b/sat.tac	Fri Nov 06 23:31:00 2009 +0100
@@ -86,6 +86,7 @@
         return self.__connected
     
     def connectionLost(self, connector, unused_reason):
+        self.__connected=False
         print "********** DISCONNECTED **********"
         try:
             self.keep_alife.stop()
@@ -258,8 +259,9 @@
         self.bridge.register("getPresenceStatus", self.memory.getPresenceStatus)
         self.bridge.register("sendMessage", self.sendMessage)
         self.bridge.register("setParam", self.setParam)
-        #self.bridge.register("getParam", self.memory.getParam)
+        self.bridge.register("getParamV", self.memory.getParamV)
         self.bridge.register("getParams", self.memory.getParams)
+        self.bridge.register("getParamsForCategory", self.memory.getParamsForCategory)
         self.bridge.register("getParamsCategories", self.memory.getParamsCategories)
         self.bridge.register("getHistory", self.memory.getHistory)
         self.bridge.register("setPresence", self.setPresence)
@@ -376,11 +378,11 @@
 
     ## Client management ##
 
-    def setParam(self, name, value, namespace):
+    def setParam(self, name, value, category):
         """set wanted paramater and notice observers"""
-        info ("setting param: %s=%s in namespace %s", name, value, namespace)
-        self.memory.setParam(name, value, namespace)
-        self.bridge.paramUpdate(name, value, namespace)
+        info ("setting param: %s=%s in category %s", name, value, category)
+        self.memory.setParam(name, value, category)
+        self.bridge.paramUpdate(name, value, category)
 
     def failed(self,xmlstream):
         debug("failed: %s", xmlstream.getErrorMessage())