00001
00002
00007 #ifndef __GREETING_H__
00008 #define __GREETING_H__
00009
00010 #include <string>
00011 #include <set>
00012
00013 #include "libepp_nicbr.H"
00014
00015 using std::string;
00016 using std::set;
00017
00018 LIBEPP_NICBR_NS_BEGIN
00019
00021 class Greeting
00022 {
00023 public:
00024
00026 enum Access {
00027 UNSET_AC = -1,
00028 ALL = 0,
00029 NONE_AC,
00030 NULL_AC,
00031 PERSONAL,
00032 PERSONAL_AND_OTHER,
00033 OTHER_AC
00034 };
00035
00037 enum Purpose {
00038 ADMIN = 0,
00039 CONTACT,
00040 PROV,
00041 OTHER_PR
00042 };
00043
00045 enum Recipient {
00046 OTHER_RC = 0,
00047 OURS,
00048 PUBLIC,
00049 SAME,
00050 UNRELATED
00051 };
00052
00054 enum Retention {
00055 UNSET_RT = -1,
00056 BUSINESS = 0,
00057 INDEFINITE,
00058 LEGAL,
00059 NONE_RT,
00060 STATED
00061 };
00062
00064
00067 void set_svID(const string &svID);
00068
00070
00073 void set_svDate(const string &svDate);
00074
00076
00079 void set_version(const string &version);
00080
00082
00085 void set_lang(const string &lang);
00086
00088
00091 void set_objURI(const string &objURI);
00092
00094
00097 void set_extURI(const string &extURI);
00098
00100
00103 void set_access(const Access &access);
00104
00106
00109 void set_purpose(const Purpose &purpose);
00110
00112
00115 void set_recipient(const Recipient &recipient);
00116
00118
00121 void set_recDesc(const string &recDesc);
00122
00124
00127 void set_retention(const Retention &retention);
00128
00130
00134 void set_expiry(const int &type, const string &expiry);
00135
00137
00140 string get_svID() const;
00141
00143
00146 string get_svDate() const;
00147
00149
00152 set<string> get_version() const;
00153
00155
00158 set<string> get_lang() const;
00159
00161
00164 set<string> get_objURI() const;
00165
00167
00170 set<string> get_extURI() const;
00171
00173
00176 Access get_access() const;
00177
00179
00182 set<Purpose> get_purpose() const;
00183
00185
00188 set<Recipient> get_recipient() const;
00189
00191
00194 string get_recDesc() const;
00195
00197
00200 Retention get_retention() const;
00201
00203
00206 int get_type_expiry() const;
00207
00209
00212 string get_expiry() const;
00213
00215 void reset()
00216 {
00217 _svID = "";
00218 _svDate = "";
00219 _version.clear();
00220 _lang.clear();
00221 _objURI.clear();
00222 _extURI.clear();
00223 _access = UNSET_AC;
00224 _purpose.clear();
00225 _recipient.clear();
00226 _recDesc = "";
00227 _retention = UNSET_RT;
00228 _type_expiry = -1;
00229 _expiry = "";
00230 }
00231
00232 protected:
00234 string _svID;
00235
00237 string _svDate;
00238
00240 set<string> _version;
00241
00243 set<string> _lang;
00244
00246 set<string> _objURI;
00247
00249 set<string> _extURI;
00250
00252 Access _access;
00253
00255 set<Purpose> _purpose;
00256
00258 set<Recipient> _recipient;
00259
00261 string _recDesc;
00262
00264 Retention _retention;
00265
00267 int _type_expiry;
00268
00270 string _expiry;
00271 };
00272
00273 LIBEPP_NICBR_NS_END
00274 #endif //__GREETING_H__