00001 /* ${copyright}$ */ 00002 /* $Id: DomainCreate.H 1061 2010-07-06 20:33:42Z eduardo $ */ 00007 #ifndef __DOMAIN_CREATE_H__ 00008 #define __DOMAIN_CREATE_H__ 00009 00010 #include <memory> 00011 00012 #include "libepp_nicbr.H" 00013 00014 #include "Action.H" 00015 #include "DomainCreateCmd.H" 00016 #include "DomainCreateRsp.H" 00017 00018 using std::auto_ptr; 00019 00020 LIBEPP_NICBR_NS_BEGIN 00021 00023 class DomainCreate : public Action 00024 { 00025 public: 00027 DomainCreate(const ActionType type = DOMAIN_CREATE) : Action(type) 00028 { 00029 if (type == DOMAIN_CREATE) { 00030 _command = auto_ptr<DomainCreateCmd>(new DomainCreateCmd()); 00031 _response = auto_ptr<DomainCreateRsp>(new DomainCreateRsp()); 00032 } 00033 } 00034 00036 00039 void set_xml_template(const string &xml_template); 00040 00042 00046 void set_response(const string &xml_payload, DomParser *parser) 00047 { 00048 get_response()->reset(); 00049 parser->parse_domain_create_rsp(xml_payload, get_response()); 00050 } 00051 00053 00056 DomainCreateCmd* get_command() 00057 { 00058 return (DomainCreateCmd*) _command.get(); 00059 } 00060 00062 00065 DomainCreateRsp* get_response() 00066 { 00067 return (DomainCreateRsp*) _response.get(); 00068 } 00069 }; 00070 00071 LIBEPP_NICBR_NS_END 00072 #endif //__DOMAIN_CREATE_H__