libepp_nicbr
IpNetworkUpdate.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: IpNetworkUpdate.H 1086 2010-12-10 13:07:28Z eduardo $ */
7 #ifndef __IPNETWORKUPDATE_H__
8 #define __IPNETWORKUPDATE_H__
9 
10 #include "libepp_nicbr.H"
11 
12 #include "Action.H"
13 #include "IpNetworkUpdateCmd.H"
14 #include "Response.H"
15 
16 using std::auto_ptr;
17 
18 LIBEPP_NICBR_NS_BEGIN
19 
21 class IpNetworkUpdate : public Action
22 {
23 public:
25  IpNetworkUpdate(const ActionType type = IP_NETWORK_UPDATE) : Action(type)
26  {
27  if (type == IP_NETWORK_UPDATE) {
28  _command = auto_ptr<IpNetworkUpdateCmd>(new IpNetworkUpdateCmd());
29  _response = auto_ptr<Response>(new Response());
30  }
31  }
32 
34 
37  void set_xml_template(const string &xml_template);
38 
40 
44  void set_response(const string &xml_payload, DomParser *parser)
45  {
46  get_response()->reset();
47  parser->parse_ipnetwork_update_rsp(xml_payload, get_response());
48  }
49 
51 
55  {
56  return (IpNetworkUpdateCmd*) _command.get();
57  }
58 
60 
64  {
65  return (Response*) _response.get();
66  }
67 };
68 
69 LIBEPP_NICBR_NS_END
70 #endif // __IPNETWORKUPDATE_H__
EPP Response Class.
Definition: Response.H:24
IpNetworkUpdate(const ActionType type=IP_NETWORK_UPDATE)
Constructor.
Definition: IpNetworkUpdate.H:25
Project defines.
EPP Response Class.
EPP Action Class.
EPP DomParser Class.
Definition: DomParser.H:62
EPP Action Class.
Definition: Action.H:24
void set_response(const string &xml_payload, DomParser *parser)
Pure virtual method to set response from a XML document.
Definition: IpNetworkUpdate.H:44
auto_ptr< Response > _response
Generic response.
Definition: Action.H:79
EPP IpNetworkUpdateCmd Class.
Definition: IpNetworkUpdateCmd.H:26
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: IpNetworkUpdate.H:63
void set_xml_template(const string &xml_template)
Sets XML template.
EPP IpNetworkUpdateCmd Class.
void reset()
reset attributes
Definition: Response.H:161
EPP IpNetworkUpdate Class.
Definition: IpNetworkUpdate.H:21
IpNetworkUpdateCmd * get_command()
Returns raw pointer to the command.
Definition: IpNetworkUpdate.H:54