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