libepp_nicbr
DefRegRenew.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id$ */
7 #ifndef __DEF_REG_RENEW_H__
8 #define __DEF_REG_RENEW_H__
9 
10 #include <memory>
11 
12 #include "libepp_nicbr.H"
13 
14 #include "Action.H"
15 #include "DefRegRenewCmd.H"
16 #include "DefRegRenewRsp.H"
17 
18 LIBEPP_NICBR_NS_BEGIN
19 
21 class DefRegRenew : public Action
22 {
23 public:
24 
26  DefRegRenew(const ActionType type = DEF_REG_RENEW) : Action(type)
27  {
28  if (type == DEF_REG_RENEW) {
29  _command = auto_ptr<DefRegRenewCmd>(new DefRegRenewCmd());
30  _response = auto_ptr<DefRegRenewRsp>(new DefRegRenewRsp());
31  }
32  }
33 
35 
38  void set_xml_template(const string &xml_template);
39 
41 
45  void set_response(const string &xml_payload, DomParser *parser)
46  {
47  get_response()->reset();
48  parser->parse_def_reg_renew_rsp(xml_payload, get_response());
49  }
50 
52 
56 
58 
62 };
63 
64 LIBEPP_NICBR_NS_END
65 
66 #endif // __DEF_REG_RENEW_H__
EPP DefRegRenewCmd Class.
Project defines.
DefRegRenewRsp * get_response()
Returns raw pointer to the response.
Definition: DefRegRenew.H:61
EPP DefRegRenewRsp Class.
Definition: DefRegRenewRsp.H:23
EPP Action Class.
void set_response(const string &xml_payload, DomParser *parser)
Pure virtual method to set response from a XML document.
Definition: DefRegRenew.H:45
DefRegRenew(const ActionType type=DEF_REG_RENEW)
Constructor.
Definition: DefRegRenew.H:26
DefRegRenewCmd * get_command()
Returns raw pointer to the command.
Definition: DefRegRenew.H:55
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 DefRegRenewRsp Class.
void reset()
Resets object attributes.
Definition: DefRegRenewRsp.H:59
auto_ptr< Command > _command
Generic command.
Definition: Action.H:76
ActionType
Action Types.
Definition: CommonData.H:23
EPP DefRegRenew Class.
Definition: DefRegRenew.H:21
EPP DefRegRenewCmd Class.
Definition: DefRegRenewCmd.H:22
void parse_def_reg_renew_rsp(const string &xml_payload, DefRegRenewRsp *rsp)
Parse the response to a defensive registration renew command.
void set_xml_template(const string &xml_template)
Sets XML template.