libepp_nicbr
ContactDelete.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id$ */
7 #ifndef __CONTACT_DELETE_H__
8 #define __CONTACT_DELETE_H__
9 
10 #include <memory>
11 
12 #include "libepp_nicbr.H"
13 
14 #include "Action.H"
15 #include "ContactDeleteCmd.H"
16 
17 using std::auto_ptr;
18 
19 LIBEPP_NICBR_NS_BEGIN
20 
22 class ContactDelete : public Action
23 {
24 public:
25 
27  ContactDelete(const ActionType type = CONTACT_DELETE) : Action(type)
28  {
29  if (type == CONTACT_DELETE) {
30  _command = auto_ptr<ContactDeleteCmd>(new ContactDeleteCmd());
31  _response = auto_ptr<Response>(new Response());
32  }
33  }
34 
36 
39  void set_xml_template(const string &xml_template);
40 
42 
46  void set_response(const string &xml_payload, DomParser *parser)
47  {
48  get_response()->reset();
49  parser->parse_contact_delete_rsp(xml_payload, get_response());
50  }
51 
53 
57  {
58  return (ContactDeleteCmd*) _command.get();
59  }
60 
61 };
62 
63 LIBEPP_NICBR_NS_END
64 #endif // __CONTACT_DELETE_H__
EPP Response Class.
Definition: Response.H:24
void set_response(const string &xml_payload, DomParser *parser)
Pure virtual method to set response from a XML document.
Definition: ContactDelete.H:46
Project defines.
ContactDelete(const ActionType type=CONTACT_DELETE)
Constructor.
Definition: ContactDelete.H:27
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
void set_xml_template(const string &xml_template)
Sets XML template.
Response * get_response()
Returns raw pointer to the response.
Definition: Action.H:60
auto_ptr< Command > _command
Generic command.
Definition: Action.H:76
ActionType
Action Types.
Definition: CommonData.H:23
ContactDeleteCmd * get_command()
Returns raw pointer to the command.
Definition: ContactDelete.H:56
void parse_contact_delete_rsp(const string &xml_payload, Response *rsp)
Parse the response to a contact delete command.
EPP ContactDelete Class.
Definition: ContactDelete.H:22
EPP ContactDeleteCmd Class.
Definition: ContactDeleteCmd.H:21
void reset()
reset attributes
Definition: Response.H:161
EPP ContactDeleteCmd Class.