00001 #ifndef OTMESSAGEGET_H 00002 #define OTMESSAGEGET_H 00003 00004 #include "ot_lib.h" 00005 00006 00007 00008 // ------------------------------------------------------ 00009 class ot_messageGET : public ot_messageRequest 00010 { 00011 private: 00012 00013 ot_path m_aPath; 00014 00015 00016 public: 00017 00018 ot_messageGET(const ot_path &aPath) : 00019 ot_messageRequest(GET), 00020 m_aPath(aPath) 00021 { 00022 } 00023 00024 ~ot_messageGET(void) {} 00025 00026 const ot_path getAttrPath(void) const {return(m_aPath);} 00027 00028 static ot_messageBase * decode(const ot_map &input); 00029 void encode(ot_map &msg) const; 00030 00031 static const string m_messageCode; 00032 const string getMessageCode(void) const {return(m_messageCode);} 00033 00034 auto_ptr<ot_messageResponse> exec(ot_functionManager &fm); 00035 }; 00036 00037 00038 // ------------------------------------------------------ 00039 class ot_messageGETRESP : public ot_messageResponse 00040 { 00041 private: 00042 00043 auto_ptr<ot_obj> m_data; 00044 00045 00046 public: 00047 00048 ot_messageGETRESP(const ot_obj *data) : 00049 ot_messageResponse(GETRESP), 00050 m_data(data->dup()) {} 00051 00052 ~ot_messageGETRESP(void) {} 00053 00054 const ot_obj * getData(void) const {return(m_data.get());} 00055 00056 static ot_messageBase * decode(const ot_map &input); 00057 void encode(ot_map &msg) const; 00058 00059 static const string m_messageCode; 00060 const string getMessageCode(void) const {return(m_messageCode);} 00061 00062 const ot_obj * getOutput(void) const {return(m_data.get());} 00063 }; 00064 00065 #endif