libepp_nicbr
Greeting.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: Greeting.H 1086 2010-12-10 13:07:28Z eduardo $ */
7 #ifndef __GREETING_H__
8 #define __GREETING_H__
9 
10 #include <string>
11 #include <set>
12 
13 #include "libepp_nicbr.H"
14 
15 using std::string;
16 using std::set;
17 
18 LIBEPP_NICBR_NS_BEGIN
19 
21 class Greeting
22 {
23 public:
24 
26  enum Access {
27  UNSET_AC = -1,
28  ALL = 0,
29  NONE_AC,
30  NULL_AC,
31  PERSONAL,
32  PERSONAL_AND_OTHER,
33  OTHER_AC
34  };
35 
37  enum Purpose {
38  ADMIN = 0,
39  CONTACT,
40  PROV,
41  OTHER_PR
42  };
43 
45  enum Recipient {
46  OTHER_RC = 0,
47  OURS,
48  PUBLIC,
49  SAME,
50  UNRELATED
51  };
52 
54  enum Retention {
55  UNSET_RT = -1,
56  BUSINESS = 0,
57  INDEFINITE,
58  LEGAL,
59  NONE_RT,
60  STATED
61  };
62 
64 
67  void set_svID(const string &svID);
68 
70 
73  void set_svDate(const string &svDate);
74 
76 
79  void set_version(const string &version);
80 
82 
85  void set_lang(const string &lang);
86 
88 
91  void set_objURI(const string &objURI);
92 
94 
97  void set_extURI(const string &extURI);
98 
100 
103  void set_access(const Access &access);
104 
106 
109  void set_purpose(const Purpose &purpose);
110 
112 
115  void set_recipient(const Recipient &recipient);
116 
118 
121  void set_recDesc(const string &recDesc);
122 
124 
127  void set_retention(const Retention &retention);
128 
130 
134  void set_expiry(const int &type, const string &expiry);
135 
137 
140  string get_svID() const;
141 
143 
146  string get_svDate() const;
147 
149 
152  set<string> get_version() const;
153 
155 
158  set<string> get_lang() const;
159 
161 
164  set<string> get_objURI() const;
165 
167 
170  set<string> get_extURI() const;
171 
173 
176  Access get_access() const;
177 
179 
182  set<Purpose> get_purpose() const;
183 
185 
188  set<Recipient> get_recipient() const;
189 
191 
194  string get_recDesc() const;
195 
197 
200  Retention get_retention() const;
201 
203 
206  int get_type_expiry() const;
207 
209 
212  string get_expiry() const;
213 
215  void reset()
216  {
217  _svID = "";
218  _svDate = "";
219  _version.clear();
220  _lang.clear();
221  _objURI.clear();
222  _extURI.clear();
223  _access = UNSET_AC;
224  _purpose.clear();
225  _recipient.clear();
226  _recDesc = "";
227  _retention = UNSET_RT;
228  _type_expiry = -1;
229  _expiry = "";
230  }
231 
232 protected:
234  string _svID;
235 
237  string _svDate;
238 
240  set<string> _version;
241 
243  set<string> _lang;
244 
246  set<string> _objURI;
247 
249  set<string> _extURI;
250 
253 
255  set<Purpose> _purpose;
256 
258  set<Recipient> _recipient;
259 
261  string _recDesc;
262 
265 
268 
270  string _expiry;
271 };
272 
273 LIBEPP_NICBR_NS_END
274 #endif //__GREETING_H__
set< string > get_lang() const
Returns the language supported by the server.
set< string > _lang
Languages known by the server.
Definition: Greeting.H:243
string _recDesc
Recipient description (optional)
Definition: Greeting.H:261
string _svDate
Server Current Date and Time (UTC)
Definition: Greeting.H:237
set< string > _extURI
Object extensions supported by the server (optional)
Definition: Greeting.H:249
void set_svDate(const string &svDate)
Sets the server's current date and time.
Purpose
For details about the following codes, see RFC 3730 - Session 2.4.
Definition: Greeting.H:37
int _type_expiry
Expiry type (absolute = 0, relative = 1) (optional)
Definition: Greeting.H:267
Recipient
For details about the following codes, see RFC 3730 - Session 2.4.
Definition: Greeting.H:45
void set_expiry(const int &type, const string &expiry)
Sets the server's policy expiry.
set< Recipient > _recipient
Data recipients (optional)
Definition: Greeting.H:258
Project defines.
string get_recDesc() const
Returns the server's Recipient description.
Retention get_retention() const
Returns the server's Retention parameter.
void set_version(const string &version)
Sets the protocol version.
set< string > get_extURI() const
Returns the object extensions the server supports.
Retention _retention
Data retention (optional)
Definition: Greeting.H:264
string _expiry
Policy lifetime (optional)
Definition: Greeting.H:270
set< Purpose > _purpose
Data collection purposes (optional)
Definition: Greeting.H:255
void set_lang(const string &lang)
Sets the language supported by the server.
set< string > _objURI
Objects that the server is capable of managing.
Definition: Greeting.H:246
Retention
For details about the following codes, see RFC 3730 - Session 2.4.
Definition: Greeting.H:54
void set_purpose(const Purpose &purpose)
Sets the server's Purpose parameter.
Access get_access() const
Returns the server's Access parameter.
void set_objURI(const string &objURI)
Sets the object the server supports.
Access _access
Access provided by the server (optional)
Definition: Greeting.H:252
void set_retention(const Retention &retention)
Sets the server's Retention parameter.
void set_access(const Access &access)
Sets the server's Access parameter.
string get_svID() const
Returns the svID.
set< string > get_version() const
Returns the protocol version.
string get_svDate() const
Returns the server's current date and time.
void set_extURI(const string &extURI)
Sets object extensions the server supports.
Access
For details about the following codes, see RFC 3730 - Session 2.4.
Definition: Greeting.H:26
EPP Greeting Class.
Definition: Greeting.H:21
set< Purpose > get_purpose() const
Returns the server's Purpose parameter.
string _svID
Server Name.
Definition: Greeting.H:234
string get_expiry() const
Returns the server's policy expiry.
void set_svID(const string &svID)
Sets the svID.
void set_recDesc(const string &recDesc)
Sets the server's Recipient description.
set< string > _version
Protocol versions supported by the server.
Definition: Greeting.H:240
void set_recipient(const Recipient &recipient)
Sets the server's Recipient parameter.
set< Recipient > get_recipient() const
Returns the server's Recipient parameter.
void reset()
reset attributes
Definition: Greeting.H:215
int get_type_expiry() const
Returns the server's policy expiry type.
set< string > get_objURI() const
Returns the object the server supports.