libepp_nicbr
IpNetworkInfo.H
1 #ifndef __IPNETWORKINFO_H__
2 #define __IPNETWORKINFO_H__
3 
4 #include "libepp_nicbr.H"
5 
6 #include "Action.H"
7 #include "IpNetworkInfoCmd.H"
8 #include "IpNetworkInfoRsp.H"
9 
10 using std::auto_ptr;
11 
12 LIBEPP_NICBR_NS_BEGIN
13 
15 class IpNetworkInfo : public Action
16 {
17 public:
19  IpNetworkInfo(const ActionType type = IP_NETWORK_INFO) : Action(type)
20  {
21  if (type == IP_NETWORK_INFO) {
22  _command = auto_ptr<IpNetworkInfoCmd>(new IpNetworkInfoCmd());
23  _response = auto_ptr<IpNetworkInfoRsp>(new IpNetworkInfoRsp());
24  }
25  }
26 
28 
31  void set_xml_template(const string &xml_template);
32 
34 
38  void set_response(const string &xml_payload, DomParser *parser)
39  {
40  get_response()->reset();
41  parser->parse_ipnetwork_info_rsp(xml_payload, get_response());
42  }
43 
45 
49  {
50  return (IpNetworkInfoCmd*) _command.get();
51  }
52 
54 
58  {
59  return (IpNetworkInfoRsp*) _response.get();
60  }
61 };
62 
63 LIBEPP_NICBR_NS_END
64 #endif // __IPNETWORKINFO_H__
IpNetworkInfoCmd * get_command()
Returns raw pointer to the command.
Definition: IpNetworkInfo.H:48
EPP IpNetworkInfo Class.
Definition: IpNetworkInfoCmd.H:11
Project defines.
void set_response(const string &xml_payload, DomParser *parser)
Pure virtual method to set response from a XML document.
Definition: IpNetworkInfo.H:38
EPP Action Class.
EPP DomParser Class.
Definition: DomParser.H:62
EPP Action Class.
Definition: Action.H:24
auto_ptr< Response > _response
Generic response.
Definition: Action.H:79
EPP IpNetworkInfoRsp Class.
Definition: IpNetworkInfoRsp.H:28
EPP IpNetworkInfoRsp Class.
void set_xml_template(const string &xml_template)
Sets XML template.
IpNetworkInfo(const ActionType type=IP_NETWORK_INFO)
Constructor.
Definition: IpNetworkInfo.H:19
auto_ptr< Command > _command
Generic command.
Definition: Action.H:76
ActionType
Action Types.
Definition: CommonData.H:23
EPP IpNetworkInfo Class.
Definition: IpNetworkInfo.H:15
IpNetworkInfoRsp * get_response()
Returns raw pointer to the response.
Definition: IpNetworkInfo.H:57