libepp_nicbr
DomainUpdate.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: DomainUpdate.H 1158 2013-06-20 13:34:09Z rafael $ */
7 #ifndef __DOMAIN_UPDATE_H__
8 #define __DOMAIN_UPDATE_H__
9 
10 #include <memory>
11 
12 #include "libepp_nicbr.H"
13 
14 #include "Action.H"
15 #include "DomainUpdateCmd.H"
16 #include "DomainUpdateRsp.H"
17 
18 using std::auto_ptr;
19 
20 LIBEPP_NICBR_NS_BEGIN
21 
23 class DomainUpdate : public Action
24 {
25 public:
27  DomainUpdate(const ActionType type = DOMAIN_UPDATE) : Action(type)
28  {
29  if (type == DOMAIN_UPDATE) {
30  _command = auto_ptr<DomainUpdateCmd>(new DomainUpdateCmd());
31  _response = auto_ptr<DomainUpdateRsp>(new DomainUpdateRsp());
32  }
33  }
34 
36 
39  void set_xml_template(const string &xml_template);
40 
42 
46  void set_response(const string &xml_payload, DomParser *parser)
47  {
48  get_response()->reset();
49  parser->parse_domain_update_rsp(xml_payload, get_response());
50  }
51 
53 
57  {
58  return (DomainUpdateCmd*) _command.get();
59  }
60 
62 
66  {
67  return (DomainUpdateRsp*) _response.get();
68  }
69 };
70 
71 LIBEPP_NICBR_NS_END
72 #endif //__DOMAIN_UPDATE_H__
EPP DomainUpdateCmd Class.
Project defines.
EPP Action Class.
DomainUpdate(const ActionType type=DOMAIN_UPDATE)
Constructor.
Definition: DomainUpdate.H:27
void parse_domain_update_rsp(const string &xml_payload, DomainUpdateRsp *rsp)
Parse the response to a domain update command.
void reset()
Reset object attributes.
Definition: DomainUpdateRsp.H:50
EPP DomParser Class.
Definition: DomParser.H:62
EPP Action Class.
Definition: Action.H:24
DomainUpdateRsp * get_response()
Returns raw pointer to the response.
Definition: DomainUpdate.H:65
EPP DomainUpdateRsp Class.
auto_ptr< Response > _response
Generic response.
Definition: Action.H:79
void set_response(const string &xml_payload, DomParser *parser)
Pure virtual method to set response from a XML document.
Definition: DomainUpdate.H:46
EPP DomainUpdateCmd Class.
Definition: DomainUpdateCmd.H:32
auto_ptr< Command > _command
Generic command.
Definition: Action.H:76
ActionType
Action Types.
Definition: CommonData.H:23
EPP DomainUpdateRsp Class.
Definition: DomainUpdateRsp.H:18
void set_xml_template(const string &xml_template)
Sets XML template and client transaction id.
EPP DomainUpdate Class.
Definition: DomainUpdate.H:23
DomainUpdateCmd * get_command()
Returns raw pointer to the command.
Definition: DomainUpdate.H:56