00001 /* ${copyright}$ */ 00002 /* $Id: DomainInfoRsp.H 888 2007-03-07 13:22:24Z eduardo $ */ 00007 #ifndef __DOMAIN_INFO_RSP_H__ 00008 #define __DOMAIN_INFO_RSP_H__ 00009 00010 #include <string> 00011 #include <vector> 00012 #include <map> 00013 00014 #include "libepp_nicbr.H" 00015 00016 #include "Response.H" 00017 #include "CommonData.H" // struct NameServer; AuthInfo 00018 #include "DSInfo.H" 00019 00020 using std::string; 00021 using std::set; 00022 using std::map; 00023 using std::less; 00024 00025 LIBEPP_NICBR_NS_BEGIN 00026 00028 class DomainInfoRsp : public Response 00029 { 00030 public: 00031 00033 DomainInfoRsp(bool reset = true) : Response(false) 00034 { 00035 if (reset) { 00036 this->reset(); 00037 } 00038 } 00039 00041 00044 void set_name(string name) { _name = name; } 00045 00047 00050 string get_name() { return _name; } 00051 00053 00056 void set_roid(string roid) { _roid = roid; } 00057 00059 00062 string get_roid() { return _roid; } 00063 00065 00068 void insert_status(string status) { _status_set.insert(status); } 00069 00071 00074 set<string> get_status_set() { return _status_set; } 00075 00077 00080 void set_registrant(string registrant) { _registrant = registrant; } 00081 00083 00086 string get_registrant() { return _registrant; } 00087 00089 00093 void insert_contact(string type, string identification) 00094 { 00095 _contacts[type] = identification; 00096 } 00097 00099 00102 map< string, string, less<string> > get_contacts() { return _contacts; } 00103 00105 00108 void insert_nameserver(const struct NameServer &nameserver) 00109 { 00110 _nameservers.push_back(nameserver); 00111 } 00112 00114 00117 vector<struct NameServer> get_nameservers() { return _nameservers; } 00118 00120 00123 void set_clID(string clID) 00124 { 00125 _clID = clID; 00126 } 00127 00129 00132 string get_clID() { return _clID; } 00133 00135 00138 void set_crID(string crID) { _crID = crID; } 00139 00141 00144 string get_crID() { return _crID; } 00145 00147 00150 void set_crDate(string crDate) { _crDate = crDate; } 00151 00153 00156 string get_crDate() { return _crDate; } 00157 00158 00160 00163 void set_upID(string upID) { _upID = upID; } 00164 00166 00169 string get_upID() { return _upID; } 00170 00172 00175 void set_exDate(string exDate) { _exDate = exDate; } 00176 00178 00181 string get_exDate() { return _exDate; } 00182 00184 00187 void set_upDate(string upDate) { _upDate = upDate; } 00188 00190 00193 string get_upDate() { return _upDate; } 00194 00196 00199 void set_trDate(string trDate) { _trDate = trDate; } 00200 00202 00205 string get_trDate() { return _trDate; } 00206 00208 00211 void set_authInfo(const AuthInfo &authInfo) 00212 { 00213 _authInfo = authInfo; 00214 } 00215 00217 00220 AuthInfo get_authInfo() { return _authInfo; } 00221 00222 //******************** RFC 4310 BEGIN ******************** 00224 00227 void add_dsInfo(const DSInfo &dsInfo) 00228 { 00229 _dsInfo.push_back(dsInfo); 00230 } 00231 00233 00236 list<DSInfo> get_dsInfo() { return _dsInfo; } 00237 //******************** RFC 4310 END ******************** 00238 00240 void reset() 00241 { 00242 Response::reset(); 00243 _name = ""; 00244 _roid = ""; 00245 _status_set.clear(); 00246 _registrant = ""; 00247 _contacts.clear(); 00248 _nameservers.clear(); 00249 _clID = ""; 00250 _crID = ""; 00251 _crDate = ""; 00252 _upID = ""; 00253 _exDate = ""; 00254 _upDate = ""; 00255 _trDate = ""; 00256 _authInfo.reset(); 00257 _dsInfo.clear(); 00258 } 00259 00260 protected: 00262 string _name; 00263 00266 string _roid; 00267 00269 set<string> _status_set; 00270 00272 string _registrant; 00273 00275 map< string, string, less<string> > _contacts; 00276 00278 vector<struct NameServer> _nameservers; 00279 00281 string _clID; 00282 00284 string _crID; 00285 00287 string _crDate; 00288 00290 string _upID; 00291 00293 string _exDate; 00294 00296 string _upDate; 00297 00299 string _trDate; 00300 00302 AuthInfo _authInfo; 00303 00305 list<DSInfo> _dsInfo; 00306 }; 00307 00308 LIBEPP_NICBR_NS_END 00309 #endif //__DOMAIN_INFO_RSP_H__