libepp_nicbr
AsnReserveDelete.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: AsnReserveDelete.H 1264 2014-12-02 20:48:10Z mendelson $ */
7 #ifndef __ASNRESERVEDELETE_H__
8 #define __ASNRESERVEDELETE_H__
9 
10 #include "libepp_nicbr.H"
11 
12 #include "Action.H"
13 #include "AsnReserveDeleteCmd.H"
14 
15 using std::auto_ptr;
16 
17 LIBEPP_NICBR_NS_BEGIN
18 
20 class AsnReserveDelete : public Action
21 {
22 public:
24  AsnReserveDelete(const ActionType type = ASN_RESERVE_DELETE) : Action(type)
25  {
26  if (type == ASN_RESERVE_DELETE) {
27  _command = auto_ptr<AsnReserveDeleteCmd>(new AsnReserveDeleteCmd());
28  _response = auto_ptr<Response>(new Response());
29  }
30  }
31 
33 
36  void set_xml_template(const string &xml_template);
37 
39 
43  void set_response(const string &xml_payload, DomParser *parser)
44  {
45  get_response()->reset();
46  parser->parse_asn_delete_rsp(xml_payload, get_response());
47  }
48 
50 
54  {
55  return (AsnReserveDeleteCmd*) _command.get();
56  }
57 
59 
63  {
64  return (Response*) _response.get();
65  }
66 };
67 
68 LIBEPP_NICBR_NS_END
69 #endif // __ASNRESERVEDELETE_H__
EPP Response Class.
Definition: Response.H:24
void set_xml_template(const string &xml_template)
Sets XML template.
Project defines.
Response * get_response()
Returns raw pointer to the response.
Definition: AsnReserveDelete.H:62
EPP Action Class.
EPP AsnReserveDelete Class.
Definition: AsnReserveDeleteCmd.H:17
EPP DomParser Class.
Definition: DomParser.H:62
EPP Action Class.
Definition: Action.H:24
AsnReserveDelete(const ActionType type=ASN_RESERVE_DELETE)
Constructor.
Definition: AsnReserveDelete.H:24
auto_ptr< Response > _response
Generic response.
Definition: Action.H:79
auto_ptr< Command > _command
Generic command.
Definition: Action.H:76
ActionType
Action Types.
Definition: CommonData.H:23
void set_response(const string &xml_payload, DomParser *parser)
Pure virtual method to set response from a XML document.
Definition: AsnReserveDelete.H:43
AsnReserveDeleteCmd * get_command()
Returns raw pointer to the command.
Definition: AsnReserveDelete.H:53
EPP AsnReserveDelete Class.
Definition: AsnReserveDelete.H:20
void reset()
reset attributes
Definition: Response.H:161
EPP AsnReserveDeleteCmd Class.