libepp_nicbr
AsnUpdate.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: AsnUpdate.H 1086 2010-12-10 13:07:28Z eduardo $ */
7 #ifndef __ASNUPDATE_H__
8 #define __ASNUPDATE_H__
9 
10 #include "libepp_nicbr.H"
11 
12 #include "Action.H"
13 #include "AsnUpdateCmd.H"
14 
15 using std::auto_ptr;
16 
17 LIBEPP_NICBR_NS_BEGIN
18 
20 class AsnUpdate : public Action
21 {
22 public:
24  AsnUpdate(const ActionType type = ASN_UPDATE) : Action(type)
25  {
26  if (type == ASN_UPDATE) {
27  _command = auto_ptr<AsnUpdateCmd>(new AsnUpdateCmd());
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_update_rsp(xml_payload, get_response());
47  }
48 
50 
54  {
55  return (AsnUpdateCmd*) _command.get();
56  }
57 
59 
63  {
64  return (Response*) _response.get();
65  }
66 };
67 
68 LIBEPP_NICBR_NS_END
69 #endif // __ASNUPDATE_H__
EPP Response Class.
Definition: Response.H:24
EPP AsnUpdate Class.
Definition: AsnUpdate.H:20
Project defines.
AsnUpdateCmd * get_command()
Returns raw pointer to the command.
Definition: AsnUpdate.H:53
Response * get_response()
Returns raw pointer to the response.
Definition: AsnUpdate.H:62
EPP Action Class.
EPP AsnUpdate Class.
Definition: AsnUpdateCmd.H:25
EPP DomParser Class.
Definition: DomParser.H:62
EPP Action Class.
Definition: Action.H:24
AsnUpdate(const ActionType type=ASN_UPDATE)
Constructor.
Definition: AsnUpdate.H:24
void set_xml_template(const string &xml_template)
Sets XML template.
auto_ptr< Response > _response
Generic response.
Definition: Action.H:79
auto_ptr< Command > _command
Generic command.
Definition: Action.H:76
EPP AsnUpdateCmd Class.
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: AsnUpdate.H:43
void reset()
reset attributes
Definition: Response.H:161