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