00001 #ifndef DOMAINPLUGINTYPES_H_
00002 #define DOMAINPLUGINTYPES_H_
00003
00004 #include <stlrt/atypes.h>
00005
00006 #include <pluginconfig.h>
00007
00008 struct PLUGINTOOLKIT_DECL DTIOTypeAbstract {};
00009
00014 struct PLUGINTOOLKIT_DECL DTNameServer {
00015 Str hostName;
00016 Str ipAddr;
00017
00021 DTNameServer () {};
00022
00028 DTNameServer (const Str & aHostName, const Str & aIPAddr)
00029 : hostName(aHostName), ipAddr(aIPAddr) {}
00030
00035 DTNameServer (const Str & aHostName)
00036 : hostName(aHostName), ipAddr(Str()) {}
00037 };
00038
00041 class PLUGINTOOLKIT_DECL DTNameServers {
00042 list<DTNameServer> nses;
00043 mutable list<DTNameServer>::const_iterator iCur;
00044 public:
00045 DTNameServers()
00046 { iCur = nses.end(); };
00047
00053 void add(const Str & aHostName, const Str & aIPAddr )
00054 { nses.push_back( DTNameServer(aHostName, aIPAddr) ); };
00055
00060 void add(const Str & aHostName )
00061 { nses.push_back( DTNameServer( aHostName ) ); };
00062
00066 void clear ()
00067 { nses.clear(); };
00068
00073 bool next() const {
00074 if ( nses.empty() ) return false;
00075
00076 if ( iCur == nses.end() ) {
00077 iCur = nses.begin();
00078 return true;
00079 } else
00080 return (nses.end() != ++iCur);
00081 }
00082
00087 const DTNameServer & get() const {
00088
00089 return *iCur;
00090 }
00091
00094 DTNameServers &operator= (const DTNameServers& t) {
00095 if(this==&t) return *this;
00096 nses = t.nses;
00097 iCur = nses.end();
00098 return *this;
00099 }
00100
00103 DTNameServers(const DTNameServers& t) {
00104 if(this!=&t) {
00105 nses = t.nses;
00106 iCur = nses.end();
00107 }
00108 }
00109
00110 friend class DTNameServersSerializer;
00111 };
00112
00115 struct PLUGINTOOLKIT_DECL DTPhone {
00116 Str cc;
00117 Str area;
00118 Str number;
00119 Str ext;
00120 DTPhone() : cc(), area(), number(), ext() {}
00121 DTPhone(const Str & aCc, const Str & aArea, const Str & aNumber, const Str & aExt)
00122 : cc(aCc), area(aArea), number(aNumber), ext(aExt) {}
00123
00127 Str toE164() const {
00128 if (cc.length() == 0 || number.length() == 0)
00129 return Str("");
00130
00131 Str e164= Str("+") << cc << "." << area << number;
00132 if ((e164.length() + ext.length()) < 17) {
00133 e164 << ext;
00134 } else {
00135
00136 }
00137 return e164;
00138 }
00139 };
00140
00142
00144 class PLUGINTOOLKIT_DECL DTExtData {
00145 map<Str, Str> pdata;
00146 mutable map<Str, Str>::const_iterator iCur;
00147 public:
00150 DTExtData() : iCur( pdata.end() ) {};
00151
00154 DTExtData(const map<Str, Str> & m) : pdata(m) { iCur = pdata.end(); };
00155
00160 const Str operator [] (const Str &key) const {
00161 map<Str, Str>::const_iterator it = pdata.find(key);
00162 return ( pdata.end() != it ) ? it->second : Str();
00163 }
00164
00169 bool isExist(const Str &key) {
00170 return pdata.find(key) != pdata.end();
00171 };
00172
00178 bool next() const {
00179 if ( pdata.empty() ) return false;
00180
00181 if ( iCur == pdata.end() ) {
00182 iCur = pdata.begin();
00183 return true;
00184 } else{
00185 return (pdata.end() != ++iCur);
00186 }
00187 };
00188
00193 const Str & getKey() const {
00194 return iCur->first;
00195 };
00196
00201 const Str & getValue() const {
00202 return iCur->second;
00203 };
00204
00210 void add(const Str& key, const Str& val) {
00211 pdata.insert( pair<Str, Str> (key, val) );
00212 iCur = pdata.end();
00213 };
00214
00220 void set(const Str& key, const Str& val) {
00221 pdata[key] = val;
00222 iCur = pdata.end();
00223 };
00224
00225
00226
00231 bool exists(const Str &key) const {
00232 map<Str, Str>::const_iterator it = pdata.find(key);
00233 return ( pdata.end() == it ) ? false : true;
00234 }
00235
00239 DTExtData &operator= (const DTExtData& t) {
00240 if(this==&t) return *this;
00241 pdata = t.pdata;
00242 iCur = pdata.end();
00243 return *this;
00244 }
00245
00249 DTExtData(const DTExtData& t) {
00250 if(this!=&t) {
00251 pdata = t.pdata;
00252 iCur = pdata.end();
00253 }
00254 }
00255
00256 friend class DTExtDataSerializer;
00257 };
00258
00262 struct PLUGINTOOLKIT_DECL DTContact {
00263 Int cID;
00264 Str orgName;
00265 Str fName; Str mName; Str lName;
00266 Str eMail;
00267 Str address1; Str address2;
00268 Str city; Str state; Str stateName; Str zip; Str country;
00269 DTPhone phone; DTPhone fax;
00270 DTExtData extData;
00271 Str handleID;
00272 Str birthday;
00273 DTContact() {}
00274 };
00275
00279 struct PLUGINTOOLKIT_DECL DTContacts {
00280 DTContact owner;
00281 DTContact admin;
00282 DTContact bill;
00283 DTContact tech;
00284 DTContacts() {}
00285 };
00286
00291 enum DTDomainOpType {
00292 TOP_REGISTER = 1,
00293 TOP_TRANSFER = 2,
00294 TOP_RENEW = 3,
00295 TOP_TERMINATE = 4
00296 };
00297
00302 enum DTDomainChkStatus {
00303 DOMAIN_AVAIL = 1,
00304 DOMAIN_NOTAVAIL = 2,
00305 DOMAIN_ERROR = 3
00306 };
00307
00312 enum DTDomainLock {
00313 DOMAIN_LOCK_SET = 1,
00314 DOMAIN_LOCK_NOTSET = 2
00315 };
00316
00321 enum DTDomainWhoisPrivacy {
00322 DOMAIN_WHOIS_PRIVACY_SET = 1,
00323 DOMAIN_WHOIS_PRIVACY_NOTSET = 2
00324 };
00325
00330 enum DTDomainOpStatus {
00331 OP_PROCESSING = 1,
00332 OP_OK = 2,
00333 OP_ERROR = 3,
00334 OP_WAITING_CALLBACK = 4
00335 };
00336
00340 struct PLUGINTOOLKIT_DECL DTDomainChk {
00341 DTDomainChkStatus status;
00342 Str msg;
00343 DTDomainChk() : status(DOMAIN_ERROR), msg( Str() ) {};
00344 DTDomainChk(const DTDomainChkStatus aStatus, const Str &aMsg)
00345 : status( aStatus ), msg( aMsg ) {};
00346 };
00347
00351 struct PLUGINTOOLKIT_DECL DTDomainTransferChk : public DTDomainChk {
00352 bool isRenewRequired;
00353 DTDomainTransferChk()
00354 : DTDomainChk( DOMAIN_ERROR, Str() ), isRenewRequired(false) {};
00355
00356 DTDomainTransferChk(const DTDomainChkStatus aStatus, const Str &aMsg)
00357 : DTDomainChk(aStatus , aMsg), isRenewRequired(false) {};
00358
00359 DTDomainTransferChk(const DTDomainChkStatus aStatus, const bool aIsRenewRequired, const Str &aMsg)
00360 : DTDomainChk(aStatus , aMsg), isRenewRequired(aIsRenewRequired) {};
00361 };
00362
00363 struct PLUGINTOOLKIT_DECL DTDomain {
00364 Str sld;
00365 Str tld;
00366
00370 Str domainName() const { return Str() << sld << "." << tld; };
00371
00377 DTDomain(const Str & aSld, const Str & aTld)
00378 : sld(aSld), tld(aTld) {};
00379 DTDomain() : sld(Str()), tld(Str()) {};
00380 };
00381
00382
00383 struct PLUGINTOOLKIT_DECL DTDomainTransfer : public DTDomain {
00384 Str transferKey;
00385 DTDomainTransfer() : DTDomain(), transferKey(Str()) {};
00386
00392 DTDomainTransfer(const Str & aSld, const Str & aTld) :
00393 DTDomain(aSld, aTld), transferKey( Str() ) {};
00394
00401 DTDomainTransfer(const Str & aSld, const Str & aTld, const Str & aTransferKey) :
00402 DTDomain(aSld, aTld), transferKey(aTransferKey) {};
00403 };
00404
00405 struct PLUGINTOOLKIT_DECL DTInDomainData : public DTDomain {
00410 DTExtData extData;
00411 DTInDomainData() {};
00412 };
00413
00414 struct PLUGINTOOLKIT_DECL DTInOperationDomain : public DTInDomainData {
00415 DTInOperationDomain() {};
00416 };
00417
00418
00419 struct PLUGINTOOLKIT_DECL DTOutGeneral : DTIOTypeAbstract {
00420 Str msg;
00421 Str log;
00422 DTOutGeneral() : msg( Str() ) {}
00423 };
00424
00425 struct PLUGINTOOLKIT_DECL DTOutOperationDomain : public DTOutGeneral {
00426 DTDomainOpStatus opStatus;
00427
00431 DTExtData extData;
00432
00433 DTOutOperationDomain() : opStatus(OP_ERROR) {};
00434 };
00435
00436 struct PLUGINTOOLKIT_DECL DTInSetLock : public DTInOperationDomain {
00437 DTDomainLock value;
00438 DTInSetLock() {};
00439 };
00440
00441 struct PLUGINTOOLKIT_DECL DTOutSetLock : public DTOutOperationDomain {
00442 DTOutSetLock() {};
00443 };
00444
00445 struct PLUGINTOOLKIT_DECL DTInSetWhoisPrivacy : public DTInOperationDomain {
00446 DTDomainWhoisPrivacy value;
00447 DTInSetWhoisPrivacy() {};
00448 };
00449
00450 struct PLUGINTOOLKIT_DECL DTOutSetWhoisPrivacy : public DTOutOperationDomain {
00451 DTOutSetWhoisPrivacy() {};
00452 };
00453
00458 enum DTExtDataItemStatus {
00459 EDIS_OK = 1,
00460 EDIS_FAILED = 2,
00461 EDIS_NEEDED = 3,
00462 EDIS_SAVENOTNEED = 4
00463 };
00464
00468 struct PLUGINTOOLKIT_DECL DTTypedExtDataItem {
00469
00470 Str paramID;
00471 Str type;
00472 Str title;
00473 Str descr;
00474 Str defValue;
00475 bool required;
00476 DTExtDataItemStatus status;
00477 Str msg;
00478 DTTypedExtDataItem() {};
00479 DTTypedExtDataItem(
00480 const Str& aKey,
00481 const Str& aType,
00482 const Str& aTitle,
00483 const Str& aDescr,
00484 const Str& aDefValue,
00485 const bool aRequired, const DTExtDataItemStatus aStatus)
00486 : paramID(aKey), type(aType), title(aTitle), descr(aDescr),
00487 defValue(aDefValue), required(aRequired), status(aStatus) {};
00488 };
00489
00490
00491
00493
00496 class DTInCheckAvailability : public DTIOTypeAbstract {
00497 list<DTDomain> listDomainName;
00498 mutable list<DTDomain>::const_iterator iCur;
00499 public:
00500 DTInCheckAvailability()
00501 { iCur = listDomainName.begin(); };
00502
00504
00508 void add(const Str & aSld, const Str & aTld)
00509 { listDomainName.push_back( DTDomain(aSld, aTld) ); };
00510
00512 void clear ()
00513 { listDomainName.clear(); };
00514
00515
00521 bool next() const {
00522 if ( listDomainName.empty() ) return false;
00523
00524 if ( iCur == listDomainName.end() ) {
00525 iCur = listDomainName.begin();
00526 return true;
00527 } else
00528 return (listDomainName.end() != ++iCur);
00529 };
00530
00535 const DTDomain & get() const {
00536
00537 return *iCur;
00538 };
00539
00540 DTInCheckAvailability &operator= (const DTInCheckAvailability& t) {
00541 if(this==&t) return *this;
00542 listDomainName = t.listDomainName;
00543 iCur = listDomainName.end();
00544 return *this;
00545 }
00546
00547 DTInCheckAvailability(const DTInCheckAvailability& t) {
00548 if(this!=&t) {
00549 listDomainName = t.listDomainName;
00550 iCur = listDomainName.end();
00551 }
00552 }
00553
00554 friend class DTInCheckAvailabilitySerializer;
00555 };
00556
00558
00561 class DTOutCheckAvailability : public DTIOTypeAbstract {
00562 map<Str, DTDomainChk> domainNameSt;
00563 mutable map<Str, DTDomainChk>::const_iterator iCur;
00564 public:
00565 DTOutCheckAvailability() : iCur( domainNameSt.end() ) {};
00566 const DTDomainChk operator [] (const Str& domainName) {
00567 return ( domainNameSt.end() != domainNameSt.find(domainName) )
00568 ? domainNameSt[domainName] : DTDomainChk();
00569 }
00570
00572
00577 void add(const Str& domainName, const DTDomainChkStatus status, const Str &msg) {
00578 domainNameSt.insert( pair<Str, DTDomainChk> (domainName, DTDomainChk(status, msg) ) );
00579 }
00580
00582
00586 void add(const Str& domainName, const DTDomainChkStatus status) {
00587 domainNameSt.insert(
00588 pair<Str, DTDomainChk> (domainName, DTDomainChk(status, Str()) ) );
00589 }
00590
00596 bool next() const {
00597 if ( domainNameSt.empty() ) return false;
00598
00599 if ( iCur == domainNameSt.end() ) {
00600 iCur = domainNameSt.begin();
00601 return true;
00602 } else
00603 return (domainNameSt.end() != ++iCur);
00604 };
00605
00610 const Str & getName() const {
00611 return iCur->first;
00612 }
00613
00618 const DTDomainChk & getStatus() const {
00619 return iCur->second;
00620 };
00621
00626 const DTDomainChk & get() const {
00627 return iCur->second;
00628 };
00629
00630 DTOutCheckAvailability &operator= (const DTOutCheckAvailability& t) {
00631 if(this==&t) return *this;
00632 domainNameSt = t.domainNameSt;
00633 iCur = domainNameSt.end();
00634 return *this;
00635 }
00636
00637 DTOutCheckAvailability(const DTOutCheckAvailability& t) {
00638 if(this!=&t) {
00639 domainNameSt = t.domainNameSt;
00640 iCur = domainNameSt.end();
00641 }
00642 }
00643
00644 friend class DTOutCheckAvailabilitySerializer;
00645 };
00646
00648
00649 class DTInCheckTransfer : public DTIOTypeAbstract {
00650 list<DTDomainTransfer> listDomainName;
00651 mutable list<DTDomainTransfer>::const_iterator iCur;
00652 public:
00653 DTInCheckTransfer()
00654 { iCur = listDomainName.begin(); };
00655
00657
00661 void add(const Str & sld, const Str & tld)
00662 { listDomainName.push_back( DTDomainTransfer (sld, tld) ); };
00663
00665
00670 void add(const Str & sld, const Str & tld, const Str & transferKey)
00671 { listDomainName.push_back( DTDomainTransfer (sld, tld, transferKey) ); };
00672
00676 void clear ()
00677 { listDomainName.clear(); };
00678
00683 bool next() const {
00684 if ( listDomainName.empty() ) return false;
00685
00686 if ( iCur == listDomainName.end() ) {
00687 iCur = listDomainName.begin();
00688 return true;
00689 } else {
00690 return (listDomainName.end() != ++iCur);
00691 }
00692 };
00693
00698 const DTDomainTransfer & get() const {
00699 return *iCur;
00700 };
00701
00702 DTInCheckTransfer &operator= (const DTInCheckTransfer& t) {
00703 if(this==&t) return *this;
00704 listDomainName = t.listDomainName;
00705 iCur = listDomainName.end();
00706 return *this;
00707 }
00708
00709 DTInCheckTransfer(const DTInCheckTransfer& t) {
00710 if(this!=&t) {
00711 listDomainName = t.listDomainName;
00712 iCur = listDomainName.end();
00713 }
00714 }
00715
00716
00717 friend class DTInCheckTransferSerializer;
00718 };
00719
00720
00721 class DTOutCheckTransfer : public DTIOTypeAbstract {
00722 map<Str, DTDomainTransferChk> domainNameSt;
00723 mutable map<Str, DTDomainTransferChk>::const_iterator iCur;
00724 public:
00725 DTOutCheckTransfer() : iCur( domainNameSt.end() ) {};
00726 const DTDomainTransferChk operator [] (const Str& domainName) {
00727 return ( domainNameSt.end() != domainNameSt.find(domainName) )
00728 ? domainNameSt[domainName] : DTDomainTransferChk();
00729 }
00730
00732
00737 void add(const Str& domainName, const DTDomainChkStatus status, const Str &msg) {
00738 domainNameSt.insert( pair<Str, DTDomainTransferChk> (domainName, DTDomainTransferChk(status, msg) ) );
00739 }
00740
00742
00746 void add(const Str& domainName, const DTDomainChkStatus status) {
00747 add( domainName, status, Str() );
00748 }
00749
00751
00757 void add(const Str& domainName, const DTDomainChkStatus status, const bool isRenewRequired, const Str &msg) {
00758 domainNameSt.insert(
00759 pair<Str, DTDomainTransferChk> (domainName, DTDomainTransferChk(status, isRenewRequired, msg) ) );
00760 }
00761
00763
00768 void add(const Str& domainName, const DTDomainChkStatus status, const bool isRenewRequired) {
00769 add( domainName, status, isRenewRequired, Str() );
00770 }
00771
00776 bool next() const {
00777 if ( domainNameSt.empty() ) return false;
00778
00779 if ( iCur == domainNameSt.end() ) {
00780 iCur = domainNameSt.begin();
00781 return true;
00782 } else
00783 return (domainNameSt.end() != ++iCur);
00784 };
00785
00790 const Str & getName() const {
00791 return iCur->first;
00792 }
00793
00798 const DTDomainTransferChk & getStatus() const {
00799 return iCur->second;
00800 };
00801
00805 const DTDomainChk & get() const {
00806 return iCur->second;
00807 };
00808
00809 DTOutCheckTransfer &operator= (const DTOutCheckTransfer& t) {
00810 if(this==&t) return *this;
00811 domainNameSt = t.domainNameSt;
00812 iCur = domainNameSt.end();
00813 return *this;
00814 }
00815
00816 DTOutCheckTransfer(const DTOutCheckTransfer& t) {
00817 if(this!=&t) {
00818 domainNameSt = t.domainNameSt;
00819 iCur = domainNameSt.end();
00820 }
00821 }
00822
00823 friend class DTOutCheckTransferSerializer;
00824 };
00825
00827 struct PLUGINTOOLKIT_DECL DTInRegisterDomain : public DTInOperationDomain {
00828 Int period;
00829 DTNameServers nameServers;
00830 DTContacts contacts;
00831 DTInRegisterDomain () {};
00832 };
00833
00835 struct PLUGINTOOLKIT_DECL DTOutRegisterDomain : public DTOutOperationDomain {
00836 Str expDate;
00837 DTOutRegisterDomain() : expDate( Str() ) {}
00838 };
00839
00841 struct PLUGINTOOLKIT_DECL DTInTransferDomain : public DTInOperationDomain {
00842 Str transferKey;
00843 Int period;
00844 DTNameServers nameServers;
00845 DTContacts contacts;
00846 DTInTransferDomain () {};
00847 };
00848
00850 struct PLUGINTOOLKIT_DECL DTOutTransferDomain : public DTOutOperationDomain {
00851 Str expDate;
00852 DTOutTransferDomain() : expDate( Str() ) {}
00853 };
00854
00856 struct PLUGINTOOLKIT_DECL DTInRenewDomain : public DTInOperationDomain {
00857 Int period;
00858 DTInRenewDomain () {};
00859 };
00860
00862 struct PLUGINTOOLKIT_DECL DTOutRenewDomain : public DTOutOperationDomain {
00863 Str expDate;
00864 DTOutRenewDomain() : expDate( Str() ) {}
00865 };
00866
00868 struct PLUGINTOOLKIT_DECL DTInTerminateDomain : public DTInOperationDomain {
00869 DTInTerminateDomain () {};
00870 };
00871
00873 struct PLUGINTOOLKIT_DECL DTOutTerminateDomain : public DTOutOperationDomain {
00874 DTOutTerminateDomain() {};
00875 };
00876
00878 struct PLUGINTOOLKIT_DECL DTInGetDomainStatus : public DTInOperationDomain {
00879 DTDomainOpType opType;
00880 DTInGetDomainStatus() {};
00881 };
00882
00884 struct PLUGINTOOLKIT_DECL DTOutGetDomainStatus : public DTOutOperationDomain {
00885 Str expDate;
00886 DTOutGetDomainStatus(): expDate( Str() ) {};
00887 };
00888
00890 struct PLUGINTOOLKIT_DECL DTInRegisterContacts : public DTInOperationDomain {
00891 DTContacts contacts;
00892 DTInRegisterContacts() {};
00893 };
00894
00896 struct PLUGINTOOLKIT_DECL DTOutRegisterContacts : public DTOutOperationDomain {
00897 DTOutRegisterContacts() {};
00898 };
00899
00901 struct PLUGINTOOLKIT_DECL DTInGetContactsStatus : public DTInOperationDomain {
00902 DTContacts contacts;
00903 DTInGetContactsStatus() {};
00904 };
00905
00907 struct PLUGINTOOLKIT_DECL DTOutGetContactsStatus : public DTOutOperationDomain {
00908 DTOutGetContactsStatus() {};
00909 };
00910
00912 struct PLUGINTOOLKIT_DECL DTInRegisterNameServers : public DTInOperationDomain {
00913 DTNameServers nameServers;
00914 DTInRegisterNameServers() {};
00915 };
00916
00918 struct PLUGINTOOLKIT_DECL DTOutRegisterNameServers : public DTOutOperationDomain {
00919 DTOutRegisterNameServers() {};
00920 };
00921
00923 struct PLUGINTOOLKIT_DECL DTInGetNameServersStatus : public DTInOperationDomain {
00924 DTNameServers nameServers;
00925 DTInGetNameServersStatus() {};
00926 };
00927
00929 struct PLUGINTOOLKIT_DECL DTOutGetNameServersStatus : public DTOutOperationDomain {
00930 DTOutGetNameServersStatus() {};
00931 };
00932
00934 struct PLUGINTOOLKIT_DECL DTInGetDomainDetails : public DTInDomainData {
00935 DTInGetDomainDetails() {};
00936 };
00937
00939 struct PLUGINTOOLKIT_DECL DTOutGetDomainDetails : public DTOutGeneral {
00940 Str regDate;
00941 Str expDate;
00942 DTOutGetDomainDetails() : regDate( Str() ), expDate( Str() ) {};
00943 };
00944
00946 struct PLUGINTOOLKIT_DECL DTInUpdateDomainNameServers : public DTInOperationDomain {
00947 DTNameServers nameServers;
00948 DTInUpdateDomainNameServers() {};
00949 };
00950
00952 struct PLUGINTOOLKIT_DECL DTOutUpdateDomainNameServers : public DTOutOperationDomain {
00953 DTOutUpdateDomainNameServers() {};
00954 };
00955
00957 struct PLUGINTOOLKIT_DECL DTInUpdateDomainContacts : public DTInOperationDomain {
00958 DTContacts contacts;
00959 DTInUpdateDomainContacts() {};
00960 };
00961
00963 struct PLUGINTOOLKIT_DECL DTOutUpdateDomainContacts : public DTOutOperationDomain {
00964 DTOutUpdateDomainContacts() {};
00965 };
00966
00968 struct PLUGINTOOLKIT_DECL DTInGetDomainNameServersStatus : public DTInOperationDomain {
00969 DTNameServers nameServers;
00970 DTInGetDomainNameServersStatus() {};
00971 };
00972
00974 struct PLUGINTOOLKIT_DECL DTOutGetDomainNameServersStatus : public DTOutOperationDomain {
00975 DTOutGetDomainNameServersStatus() {};
00976 };
00977
00979 struct PLUGINTOOLKIT_DECL DTInGetDomainContactsStatus : public DTInOperationDomain {
00980 DTContacts contacts;
00981 DTInGetDomainContactsStatus() {};
00982 };
00983
00985 struct PLUGINTOOLKIT_DECL DTOutGetDomainContactsStatus : public DTOutOperationDomain {
00986 DTOutGetDomainContactsStatus() {};
00987 };
00988
00990 struct PLUGINTOOLKIT_DECL DTInValidateExtData : public DTDomain {
00991 DTDomainOpType opType;
00992 DTExtData extData;
00993 DTInValidateExtData() : opType( TOP_REGISTER ) {};
00994 };
00995
00997 struct PLUGINTOOLKIT_DECL DTRegisteredDomainInfo : public DTInDomainData {
00998 DTNameServers nameServers;
00999 DTContacts contacts;
01000 DTRegisteredDomainInfo () {};
01001 };
01002
01003
01005
01008 class DTOutValidateExtData : public DTIOTypeAbstract {
01009 list<DTTypedExtDataItem> items;
01010 mutable list<DTTypedExtDataItem>::const_iterator iCur;
01011 public:
01012 DTOutValidateExtData() : iCur( items.end() ) {}
01014
01023 void add(
01024 const Str& key,
01025 const Str& type,
01026 const Str& title,
01027 const Str& descr,
01028 const Str& defValue,
01029 const bool required,
01030 const DTExtDataItemStatus status
01031 )
01032 {
01033 items.push_back(DTTypedExtDataItem(key, type, title, descr, defValue, required, status));
01034 }
01035 const DTTypedExtDataItem operator [] (const Str& key) {
01036 for(list<DTTypedExtDataItem>::const_iterator it = items.begin(); it != items.end(); ++it) {
01037 if (it->paramID == key)
01038 return *it;
01039 }
01040 return DTTypedExtDataItem();
01041 }
01042
01046 void clear ()
01047 { items.clear(); };
01048
01053 bool next() const {
01054 if ( items.empty() ) return false;
01055
01056 if ( iCur == items.end() ) {
01057 iCur = items.begin();
01058 return true;
01059 } else
01060 return (items.end() != ++iCur);
01061 };
01062
01063 const DTTypedExtDataItem & get() const {
01064
01065 return *iCur;
01066 };
01067 DTOutValidateExtData &operator= (const DTOutValidateExtData& t) {
01068 if(this==&t) return *this;
01069 items = t.items;
01070 iCur = items.end();
01071 return *this;
01072 }
01073
01074 DTOutValidateExtData(const DTOutValidateExtData& t) {
01075 if(this!=&t) {
01076 items = t.items;
01077 iCur = items.end();
01078 }
01079 }
01080
01081 friend class DTOutValidateExtDataSerializer;
01082 };
01083
01084
01085 struct PLUGINTOOLKIT_DECL DTInCallback {
01086 Str data;
01087 DTInCallback() {};
01088 };
01089
01093 enum DTCallbackItemStatus {
01094 CBIS_PROCESSING = 1,
01095 CBIS_OK = 2,
01096 CBIS_ERROR = 3,
01097 CBIS_NOT_CHANGED = 4
01098 };
01099
01103 enum DTCallbackItemType {
01104 CBIT_OPERATE_DOMAIN = 1,
01105 CBIT_UPDATE_DOMAIN = 2,
01106 CBIT_REG_NS = 3,
01107 CBIT_REG_CONTACT = 4,
01108 CBIT_NONE = 5
01109 };
01110
01112
01115 struct PLUGINTOOLKIT_DECL DTCallbackResult {
01116 Str domainName;
01117 Str expDate;
01118 DTCallbackItemType type;
01119 DTCallbackItemStatus status;
01120
01121 DTCallbackResult() {type = CBIT_NONE; status = CBIS_NOT_CHANGED;};
01122 };
01123
01124 struct PLUGINTOOLKIT_DECL DTOutCallback : DTOutGeneral {
01125 list<DTCallbackResult> results;
01126 DTOutCallback () {};
01127 };
01128
01129
01130 #endif