libepp_nicbr
ContactInfoRsp.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: ContactInfoRsp.H 1260 2014-12-02 17:38:55Z rafael $ */
7 #ifndef __CONTACT_INFO_RSP_H__
8 #define __CONTACT_INFO_RSP_H__
9 
10 #include <string>
11 #include <vector>
12 #include <set>
13 #include <memory>
14 
15 #include "libepp_nicbr.H"
16 
17 #include "Response.H"
18 #include "CommonData.H"
19 
20 using std::string;
21 using std::vector;
22 using std::set;
23 using std::auto_ptr;
24 
25 LIBEPP_NICBR_NS_BEGIN
26 
28 class ContactInfoRsp : public Response
29 {
30 public:
32  ContactInfoRsp(bool reset = true) : Response(false)
33  {
34  if (reset) {
35  this->reset();
36  }
37  }
38 
40 
43  void set_roid(const string &roid) { _roid = roid; }
44 
46 
49  void insert_status(const string &status) { _status_set.insert(status); }
50 
52 
55  void set_clID(const string &clID) { _clID = clID; }
56 
58 
61  void set_crID(const string &crID) { _crID = crID; }
62 
64 
67  void set_crDate(const string &crDate) { _crDate = crDate; }
68 
70 
73  void set_upID(const string &upID) { _upID = upID; }
74 
76 
79  void set_upDate(const string &upDate) { _upDate = upDate; }
80 
82 
85  void set_trDate(const string &trDate) { _trDate = trDate; }
86 
88 
91  string get_roid() const { return _roid; }
92 
94 
97  set<string> get_status_set() const { return _status_set; }
98 
100 
103  string get_clID() const { return _clID; }
104 
106 
109  string get_crID() const { return _crID; }
110 
112 
115  string get_crDate() const { return _crDate; }
116 
118 
121  string get_upID() const { return _upID; }
122 
124 
127  string get_upDate() const { return _upDate; }
128 
130 
133  string get_trDate() const { return _trDate; }
134 
136 
139  void set_common_data(const CommonData &common)
140  {
141  _common = common;
142  }
143 
145 
148  CommonData get_common_data() const { return _common; }
149 
151 
154  void set_authInfo(const AuthInfo &authInfo)
155  {
156  _authInfo = authInfo;
157  }
158 
160 
163  AuthInfo get_authInfo() const { return _authInfo; }
164 
166 
169  void set_reminder(const string& reminder)
170  {
171  _reminder = reminder;
172  }
173 
175 
178  string get_reminder()
179  {
180  return _reminder;
181  }
182 
184 
187  void set_language(const string& language)
188  {
189  _language = language;
190  }
191 
193 
196  string get_language()
197  {
198  return _language;
199  }
200 
202 
205  void set_properties(const vector<string>& properties)
206  {
207  _properties = properties;
208  }
209 
211 
214  void add_property(const string& property)
215  {
216  _properties.push_back(property);
217  }
218 
220 
223  vector<string> get_properties()
224  {
225  return _properties;
226  }
227 
229  /*
230  @param legacy legacy flag
231  */
232  void set_legacy(const bool legacy)
233  {
234  _legacy = legacy;
235  }
236 
238  /*
239  @return legacy flag
240  */
241  bool is_legacy() const
242  {
243  return _legacy;
244  }
245 
247  void reset() {
248  Response::reset();
249  _roid = "";
250  _status_set.clear();
251  _clID = "";
252  _crID = "";
253  _crDate = "";
254  _upID = "";
255  _upDate = "";
256  _trDate = "";
257  _common.reset();
258  _authInfo.reset();
259  _reminder = "";
260  _language = "";
261  _properties.clear();
262  _legacy = false;
263  }
264 
265 protected:
267  string _roid;
268 
270  set<string> _status_set;
271 
273  string _clID;
274 
276  string _crID;
277 
279  string _crDate;
280 
282  string _upID;
283 
285  string _upDate;
286 
288  string _trDate;
289 
292 
295 
297  string _reminder;
298 
300  string _language;
301 
303  vector<string> _properties;
304 
307  bool _legacy;
308 };
309 
310 LIBEPP_NICBR_NS_END
311 #endif //__CONTACT_INFO_RSP_H__
bool _legacy
Definition: ContactInfoRsp.H:307
string _upDate
Last modification date and time.
Definition: ContactInfoRsp.H:285
EPP Response Class.
Definition: Response.H:24
string get_clID() const
Returns the client id.
Definition: ContactInfoRsp.H:103
AuthInfo _authInfo
authorization information
Definition: ContactInfoRsp.H:294
string _reminder
tip for the contact's password (lacnic contact extension)
Definition: ContactInfoRsp.H:297
EPP ContactInfoRsp Class.
Definition: ContactInfoRsp.H:28
string _upID
last client id that updated the object
Definition: ContactInfoRsp.H:282
string _trDate
Last transfer date and time.
Definition: ContactInfoRsp.H:288
Project defines.
EPP CommonData Class.
string _crDate
Creation date and time.
Definition: ContactInfoRsp.H:279
void set_crID(const string &crID)
Sets the creator client id.
Definition: ContactInfoRsp.H:61
string _clID
Sponsoring client id.
Definition: ContactInfoRsp.H:273
void set_crDate(const string &crDate)
Sets the creation date.
Definition: ContactInfoRsp.H:67
vector< string > get_properties()
Returns the vector of properties associated with the contact.
Definition: ContactInfoRsp.H:223
EPP Response Class.
string get_crDate() const
Returns the creation date.
Definition: ContactInfoRsp.H:115
void set_properties(const vector< string > &properties)
Sets the properties associated with the contact.
Definition: ContactInfoRsp.H:205
string get_roid() const
Returns the repository object id.
Definition: ContactInfoRsp.H:91
set< string > get_status_set() const
Returns the status list of the object.
Definition: ContactInfoRsp.H:97
void set_language(const string &language)
Sets the contact's language.
Definition: ContactInfoRsp.H:187
string get_trDate() const
Returns the last transfer date.
Definition: ContactInfoRsp.H:133
void set_reminder(const string &reminder)
Sets the reminder.
Definition: ContactInfoRsp.H:169
void set_common_data(const CommonData &common)
Sets the common data object.
Definition: ContactInfoRsp.H:139
string get_upDate() const
Returns the last update.
Definition: ContactInfoRsp.H:127
void insert_status(const string &status)
Inserts a status to the object.
Definition: ContactInfoRsp.H:49
void add_property(const string &property)
Adds a property to the vector of properties.
Definition: ContactInfoRsp.H:214
void reset()
Reset all object attributes.
Definition: CommonData.H:152
bool is_legacy() const
Returns the legacy flag of a contact.
Definition: ContactInfoRsp.H:241
string _roid
Repository id.
Definition: ContactInfoRsp.H:267
CommonData get_common_data() const
Returns the common data of the object.
Definition: ContactInfoRsp.H:148
string get_reminder()
Returns the reminder for the contact's password.
Definition: ContactInfoRsp.H:178
void reset()
reset attributes
Definition: ContactInfoRsp.H:247
EPP CommonData Class.
Definition: CommonData.H:487
ContactInfoRsp(bool reset=true)
Default constructor.
Definition: ContactInfoRsp.H:32
void set_authInfo(const AuthInfo &authInfo)
Sets authorization information.
Definition: ContactInfoRsp.H:154
void set_upDate(const string &upDate)
Sets the last update.
Definition: ContactInfoRsp.H:79
CommonData _common
Common data object.
Definition: ContactInfoRsp.H:291
set< string > _status_set
Status list.
Definition: ContactInfoRsp.H:270
string get_language()
Returns the contact's preferred language.
Definition: ContactInfoRsp.H:196
void set_legacy(const bool legacy)
Sets the legacy flag of a contact.
Definition: ContactInfoRsp.H:232
void set_trDate(const string &trDate)
Sets the last transfer date.
Definition: ContactInfoRsp.H:85
void reset()
reset attributes
Definition: Response.H:161
string _language
contact's preferred language (lacnic contact extension)
Definition: ContactInfoRsp.H:300
void set_roid(const string &roid)
Sets the repository object id.
Definition: ContactInfoRsp.H:43
string get_crID() const
Returns the creator client id.
Definition: ContactInfoRsp.H:109
string _crID
Creator client id.
Definition: ContactInfoRsp.H:276
void set_clID(const string &clID)
Sets the client id.
Definition: ContactInfoRsp.H:55
void set_upID(const string &upID)
Sets the last update client id.
Definition: ContactInfoRsp.H:73
string get_upID() const
Returns the last update client id.
Definition: ContactInfoRsp.H:121
AuthInfo get_authInfo() const
Returns authorization information.
Definition: ContactInfoRsp.H:163
vector< string > _properties
current properties associated with the contact (lacnic contact extension)
Definition: ContactInfoRsp.H:303
AuthInfo Class.
Definition: CommonData.H:83
void reset()
reset attributes