some work
authorMichal Voců <michal@ruk.cuni.cz>
Wed, 3 Oct 2007 07:23:46 +0000 (07:23 +0000)
committerMichal Voců <michal@ruk.cuni.cz>
Wed, 3 Oct 2007 07:23:46 +0000 (07:23 +0000)
org.glite.lb.logger/src-nt/InputChannel.cpp
org.glite.lb.logger/src-nt/Message.H
org.glite.lb.logger/src-nt/Transport.H

index aad201d..e3ac9c8 100644 (file)
@@ -19,7 +19,7 @@ InputChannel::onReady()
                // no new data read
        } else if(msg) {
                // we have a new message
-               //theEventManager.postEvent(new NewMessageEvent());
+               
        } else {
                // still need more data
                ThreadPool::instance()->queueWorkRead(this);
index 4303f14..f9b0f17 100644 (file)
@@ -1,23 +1,46 @@
 #ifndef _MESSAGE_H_
 #define _MESSAGE_H
 
+#include "Properties.H"
+
+#include <string>
+
 class Message {
 public:
        class ID {
        public:
        private:
-               unsigned char m_uuid[16];
        };
 
+       Message();
+
        Message(void * data, unsigned int length) 
                : m_length(length), 
                  m_data(data)
                {}
 
+
+       int getContent(void* &data) const
+               { data = m_data; return m_length; }
+
+       int getContentLength() const 
+               { return m_length; }
+
+       std::string getProperty(const std::string &name, std::string &val) const
+               { return m_properties.getProperty(name); }
+
+       void setProperty(const std::string &name, std::string &val) 
+               { m_properties.setProperty(name, val); }
+
+       Properties& getProperties() 
+               { return m_properties; }
+
 private:
        ID                      m_id;
        unsigned int            m_length;
        void *                  m_data;
+       Properties              m_properties;
 };
 
+
 #endif
index 67ac1ee..1b6516d 100644 (file)
@@ -2,7 +2,7 @@
 #define _TRANSPORT_H
 
 #include "Connection.H"
-#include "Properties.H"
+#include "Message.H"
 
 // Transport implements transport protocol 
 //  - reads/writes messages using Connection interface
@@ -19,23 +19,6 @@ public:
                        {}
        };
 
-
-       // 
-       class Message {
-       public:
-
-               Message();
-
-               int getContent(char* &data) const;
-               int getContentLength() const;
-               int getHeader(const char* name, char* &val) const;
-               Properties& getProperties();
-               char *path() const;
-
-       private:
-               
-       };
-
        //
        Transport() 
                {}