Move data module

portnov [2009-02-27 07:29:59]
Move data module
Filename
centrixd/cxproto.py
data.py
diff --git a/centrixd/cxproto.py b/centrixd/cxproto.py
index 7c78f8a..5a779d5 100644
--- a/centrixd/cxproto.py
+++ b/centrixd/cxproto.py
@@ -32,4 +32,4 @@ class CXFactory(Factory):

 reactor.usingThreads = True
 reactor.listenTCP(CXPORT, CXFactory())
-reactor.run(installSignalHandlers=0)
\ No newline at end of file
+reactor.run(installSignalHandlers=0)
diff --git a/data.py b/data.py
deleted file mode 100644
index 0951197..0000000
--- a/data.py
+++ /dev/null
@@ -1,36 +0,0 @@
-import xmlserialize as xml
-
-#####################################
-# Some classes
-
-class Service(object):
-    def __init__(self):
-        self.ip = ''
-        self.port = 0
-        self.proto = ''
-        self.stype = ''
-        self.name = ''
-
-    def __str__(self):
-        if self.port:
-            return "%s:%s" % (self.ip, self.port)
-        else:
-            return self.ip
-
-    def __repr__(self):
-        return "<Service %s on %s:%s>" % (self.name,self.ip,self.port)
-
-class Message(object):
-    def __init__(self,type=None,**kwargs):
-        self.type = type
-        self.__dict__.update(kwargs)
-
-    def __repr__(self):
-        return "<Message of type %s>" % self.type
-
-    def to_xml(self):
-        return xml.serialize(self)
-
-    @classmethod
-    def parse(cls, text):
-        return xml.deserialize(text,cls=cls)
ViewGit