libepp_nicbr
ContactCreateCmd.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: ContactCreateCmd.H 1240 2014-11-13 11:36:52Z rafael $ */
7 #ifndef __CONTACT_CREATE_CMD_H__
8 #define __CONTACT_CREATE_CMD_H__
9 
10 #include <string>
11 #include <set>
12 #include <memory>
13 
14 #include "libepp_nicbr.H"
15 
16 #include "Command.H"
17 #include "CommonData.H"
18 
19 using std::string;
20 using std::set;
21 using std::auto_ptr;
22 
23 LIBEPP_NICBR_NS_BEGIN
24 
26 class ContactCreateCmd : public Command
27 {
28 public:
29 
31  ContactCreateCmd(bool reset = true) : Command(false)
32  {
33  if (reset) {
34  this->reset();
35  }
36  }
37 
39 
42  void set_common_data(const CommonData &common)
43  {
44  _common = common;
45  }
46 
48 
51  CommonData get_common_data() const { return _common; }
52 
54 
57  void set_authInfo(const AuthInfo &authInfo)
58  {
59  _authInfo = authInfo;
60  }
61 
63 
67 
69 
72  void set_password(const string &password)
73  {
74  _password = password;
75  }
76 
78 
81  string get_password() const
82  {
83  return _password;
84  }
85 
87 
90  void set_reminder(const string &reminder)
91  {
92  _reminder = reminder;
93  }
94 
96 
99  string get_reminder() const
100  {
101  return _reminder;
102  }
103 
105 
108  void set_language(const string &language)
109  {
110  _language = language;
111  }
112 
114 
117  string get_language() const
118  {
119  return _language;
120  }
121 
123  bool has_extension() const {
125  }
126 
129  return !_password.empty() || !_reminder.empty() || !_language.empty();
130  }
131 
133  void reset()
134  {
135  Command::reset();
136  _common.reset();
137  _authInfo.reset();
138  _password = "";
139  _reminder = "";
140  _language = "";
141  }
142 
143 protected:
146 
149 
151  string _password;
152 
154  string _reminder;
155 
157  string _language;
158 };
159 
160 LIBEPP_NICBR_NS_END
161 #endif //__CONTACT_CREATE_CMD_H__
Project defines.
void set_password(const string &password)
Sets password attribute.
Definition: ContactCreateCmd.H:72
EPP CommonData Class.
AuthInfo get_authInfo()
Returns authorization information.
Definition: ContactCreateCmd.H:66
AuthInfo _authInfo
authorization information
Definition: ContactCreateCmd.H:148
void set_authInfo(const AuthInfo &authInfo)
Sets authorization information.
Definition: ContactCreateCmd.H:57
void set_reminder(const string &reminder)
Sets reminder attribute.
Definition: ContactCreateCmd.H:90
bool has_lacnic_contact_extension() const
Check if there is lacnic contact extension.
Definition: ContactCreateCmd.H:128
EPP ContactCreateCmd Class.
Definition: ContactCreateCmd.H:26
string get_password() const
Returns the password.
Definition: ContactCreateCmd.H:81
void reset()
Reset all object attributes.
Definition: CommonData.H:152
string get_reminder() const
Returns the reminder.
Definition: ContactCreateCmd.H:99
ContactCreateCmd(bool reset=true)
Default constructor.
Definition: ContactCreateCmd.H:31
CommonData _common
Common data object.
Definition: ContactCreateCmd.H:145
void reset()
Resets object attributes.
Definition: ContactCreateCmd.H:133
CommonData get_common_data() const
Returns a common data object raw pointer.
Definition: ContactCreateCmd.H:51
EPP CommonData Class.
Definition: CommonData.H:487
string _password
contact's password (lacnic contact extension)
Definition: ContactCreateCmd.H:151
string _language
contact's preferred language (lacnic contact extension)
Definition: ContactCreateCmd.H:157
void reset()
Reset object attributes.
Definition: Command.H:33
EPP Command Class.
Definition: Command.H:18
void set_language(const string &language)
Sets language attribute.
Definition: ContactCreateCmd.H:108
void set_common_data(const CommonData &common)
Sets the common data object.
Definition: ContactCreateCmd.H:42
EPP Command Class.
string _reminder
contact's tip to remember the password (lacnic contact extension)
Definition: ContactCreateCmd.H:154
string get_language() const
Returns the language.
Definition: ContactCreateCmd.H:117
bool has_extension() const
Check if there is any extension.
Definition: ContactCreateCmd.H:123
AuthInfo Class.
Definition: CommonData.H:83
void reset()
reset attributes