libepp_nicbr
DomainDelete.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: DomainDelete.H 1086 2010-12-10 13:07:28Z eduardo $ */
7 #ifndef __DOMAIN_DELETE_H__
8 #define __DOMAIN_DELETE_H__
9 
10 #include <memory>
11 
12 #include "libepp_nicbr.H"
13 
14 #include "Action.H"
15 #include "DomainDeleteCmd.H"
16 #include "Response.H"
17 
18 using std::auto_ptr;
19 
20 LIBEPP_NICBR_NS_BEGIN
21 
23 class DomainDelete : public Action
24 {
25 public:
26 
28  DomainDelete(const ActionType type = DOMAIN_DELETE) : Action(type)
29  {
30  if (type == DOMAIN_DELETE) {
31  _command = auto_ptr<DomainDeleteCmd>(new DomainDeleteCmd());
32  _response = auto_ptr<Response>(new Response());
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_delete_rsp(xml_payload, get_response());
51  }
52 
54 
58  {
59  return (DomainDeleteCmd*) _command.get();
60  }
61 
63 
67  {
68  return (Response*) _response.get();
69  }
70 };
71 
72 LIBEPP_NICBR_NS_END
73 #endif // __DOMAIN_DELETE_H__
DomainDeleteCmd * get_command()
Returns raw pointer to the command.
Definition: DomainDelete.H:57
EPP Response Class.
Definition: Response.H:24
EPP DomainDelete Class.
Definition: DomainDelete.H:23
EPP DomainDeleteCmd Class.
Project defines.
EPP Response Class.
EPP Action Class.
void parse_domain_delete_rsp(const string &xml_payload, Response *rsp)
Parse the response to a domain delete command.
EPP DomParser Class.
Definition: DomParser.H:62
EPP Action Class.
Definition: Action.H:24
DomainDelete(const ActionType type=DOMAIN_DELETE)
Constructor.
Definition: DomainDelete.H:28
auto_ptr< Response > _response
Generic response.
Definition: Action.H:79
EPP DomainDeleteCmd Class.
Definition: DomainDeleteCmd.H:22
auto_ptr< Command > _command
Generic command.
Definition: Action.H:76
ActionType
Action Types.
Definition: CommonData.H:23
Response * get_response()
Returns raw pointer to the response.
Definition: DomainDelete.H:66
void set_response(const string &xml_payload, DomParser *parser)
Pure virtual method to set response from a XML document.
Definition: DomainDelete.H:47
void reset()
reset attributes
Definition: Response.H:161
void set_xml_template(const string &xml_template)
Sets XML template.