libepp_nicbr
DomainInfo.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: DomainInfo.H 1086 2010-12-10 13:07:28Z eduardo $ */
7 #ifndef __DOMAIN_INFO_H__
8 #define __DOMAIN_INFO_H__
9 
10 #include <memory>
11 
12 #include "libepp_nicbr.H"
13 
14 #include "Action.H"
15 #include "DomainInfoCmd.H"
16 #include "DomainInfoRsp.H"
17 
18 using std::auto_ptr;
19 
20 LIBEPP_NICBR_NS_BEGIN
21 
23 class DomainInfo : public Action
24 {
25 public:
26 
28  DomainInfo(const ActionType type = DOMAIN_INFO) : Action(type)
29  {
30  if (type == DOMAIN_INFO) {
31  _command = auto_ptr<DomainInfoCmd>(new DomainInfoCmd());
32  _response = auto_ptr<DomainInfoRsp>(new DomainInfoRsp());
33  }
34  }
35 
37 
40  void set_xml_template(const string &xml_template);
41 
43 
47  void set_response(const string &xml_payload, DomParser *parser)
48  {
49  get_response()->reset();
50  parser->parse_domain_info_rsp(xml_payload, get_response());
51  }
52 
54 
58 
60 
64 
65 };
66 
67 LIBEPP_NICBR_NS_END
68 #endif //__DOMAIN_INFO_H__
EPP DomainInfo Class.
Definition: DomainInfo.H:23
Project defines.
DomainInfoRsp * get_response()
Returns raw pointer to the response.
Definition: DomainInfo.H:63
EPP DomainInfoRsp Class.
EPP Action Class.
EPP DomParser Class.
Definition: DomParser.H:62
EPP Action Class.
Definition: Action.H:24
void parse_domain_info_rsp(const string &xml_payload, DomainInfoRsp *rsp)
Parse the response to a domain info command.
void set_response(const string &xml_payload, DomParser *parser)
Pure virtual method to set response from a XML document.
Definition: DomainInfo.H:47
auto_ptr< Response > _response
Generic response.
Definition: Action.H:79
EPP DomainInfoRsp Class.
Definition: DomainInfoRsp.H:29
void set_xml_template(const string &xml_template)
Sets XML template.
EPP DomainInfoCmd Class.
DomainInfoCmd * get_command()
Returns raw pointer to the command.
Definition: DomainInfo.H:57
void reset()
Reset object attributes.
Definition: DomainInfoRsp.H:311
auto_ptr< Command > _command
Generic command.
Definition: Action.H:76
ActionType
Action Types.
Definition: CommonData.H:23
DomainInfo(const ActionType type=DOMAIN_INFO)
Constructor.
Definition: DomainInfo.H:28
EPP DomainInfoCmd Class.
Definition: DomainInfoCmd.H:23