00001 /* ${copyright}$ */ 00002 /* $Id: AsnUpdate.H 986 2008-12-30 12:32:38Z eduardo $ */ 00007 #ifndef __ASNUPDATE_H__ 00008 #define __ASNUPDATE_H__ 00009 00010 #include "libepp_nicbr.H" 00011 00012 #include "Action.H" 00013 #include "AsnUpdateCmd.H" 00014 00015 using std::auto_ptr; 00016 00017 LIBEPP_NICBR_NS_BEGIN 00018 00020 class AsnUpdate : public Action 00021 { 00022 public: 00024 AsnUpdate(const ActionType type = ASN_UPDATE) : Action(type) 00025 { 00026 if (type == ASN_UPDATE) { 00027 _command = auto_ptr<AsnUpdateCmd>(new AsnUpdateCmd()); 00028 _response = auto_ptr<Response>(new Response()); 00029 } 00030 } 00031 00033 00036 void set_xml_template(const string &xml_template); 00037 00039 00043 void set_response(const string &xml_payload, DomParser *parser) 00044 { 00045 get_response()->reset(); 00046 parser->parse_asn_update_rsp(xml_payload, get_response()); 00047 } 00048 00050 00053 AsnUpdateCmd* get_command() 00054 { 00055 return (AsnUpdateCmd*) _command.get(); 00056 } 00057 00059 00062 Response* get_response() 00063 { 00064 return (Response*) _response.get(); 00065 } 00066 }; 00067 00068 LIBEPP_NICBR_NS_END 00069 #endif // __ASNUPDATE_H__