You can subscribe to this list here.
2002 |
Jan
|
Feb
(44) |
Mar
(51) |
Apr
(11) |
May
(5) |
Jun
(1) |
Jul
(19) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(3) |
Feb
|
Mar
|
Apr
(24) |
May
(37) |
Jun
(23) |
Jul
(14) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(17) |
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
2005 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(3) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
(1) |
Mar
(3) |
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
(7) |
Dec
|
From: Asbjorn M. <ste...@us...> - 2002-04-25 09:52:03
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src/transport In directory usw-pr-cvs1:/tmp/cvs-serv6707 Modified Files: epp_TransportSSL.cc epp_TransportTCP.cc Log Message: Changed datatype from "unsigned long" to "string::size_type" after string::find(). Index: epp_TransportSSL.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/transport/epp_TransportSSL.cc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** epp_TransportSSL.cc 14 Mar 2002 18:37:50 -0000 1.13 --- epp_TransportSSL.cc 25 Apr 2002 09:52:00 -0000 1.14 *************** *** 63,67 **** // Deleting trailing whitespace from request: ! unsigned long lastNotWhite = send_xml.find_last_not_of(" \t\r\n"); if(lastNotWhite != (send_xml.length()-1) && lastNotWhite != 0) { send_xml.erase(lastNotWhite+1, send_xml.length()); --- 63,67 ---- // Deleting trailing whitespace from request: ! string::size_type lastNotWhite = send_xml.find_last_not_of(" \t\r\n"); if(lastNotWhite != (send_xml.length()-1) && lastNotWhite != 0) { send_xml.erase(lastNotWhite+1, send_xml.length()); Index: epp_TransportTCP.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/transport/epp_TransportTCP.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_TransportTCP.cc 14 Mar 2002 18:37:50 -0000 1.4 --- epp_TransportTCP.cc 25 Apr 2002 09:52:00 -0000 1.5 *************** *** 146,150 **** // Deleting trailing whitespace from request: ! unsigned long lastNotWhite = send_xml.find_last_not_of(" \t\r\n"); if(lastNotWhite != (send_xml.length()-1) && lastNotWhite != 0) { send_xml.erase(lastNotWhite+1, send_xml.length()); --- 146,150 ---- // Deleting trailing whitespace from request: ! string::size_type lastNotWhite = send_xml.find_last_not_of(" \t\r\n"); if(lastNotWhite != (send_xml.length()-1) && lastNotWhite != 0) { send_xml.erase(lastNotWhite+1, send_xml.length()); |
From: Asbjorn M. <ste...@us...> - 2002-04-25 09:48:38
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv5083 Modified Files: main_hostcreate.cc main_hostupdate.cc Log Message: Changed datatype from "int" to "string::size_type" after string::find(). Index: main_hostcreate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostcreate.cc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main_hostcreate.cc 17 Apr 2002 11:54:36 -0000 1.10 --- main_hostcreate.cc 25 Apr 2002 09:48:34 -0000 1.11 *************** *** 129,133 **** for(unsigned int n = 3; n <= testDataMap.size(); n++) { ! int space = testDataMap[n].find(" "); if(space != string::npos) { --- 129,133 ---- for(unsigned int n = 3; n <= testDataMap.size(); n++) { ! string::size_type space = testDataMap[n].find(" "); if(space != string::npos) { Index: main_hostupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostupdate.cc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main_hostupdate.cc 17 Apr 2002 11:54:36 -0000 1.10 --- main_hostupdate.cc 25 Apr 2002 09:48:34 -0000 1.11 *************** *** 168,172 **** if(toadd->m_addresses == NULL) toadd->m_addresses.ref(new epp_host_address_seq); ! int space = testDataMap[thisEl].find(" "); if(space != string::npos) { --- 168,172 ---- if(toadd->m_addresses == NULL) toadd->m_addresses.ref(new epp_host_address_seq); ! string::size_type space = testDataMap[thisEl].find(" "); if(space != string::npos) { *************** *** 212,216 **** if(torem->m_addresses == NULL) torem->m_addresses.ref(new epp_host_address_seq); ! int space = testDataMap[thisEl].find(" "); if(space != string::npos) { --- 212,216 ---- if(torem->m_addresses == NULL) torem->m_addresses.ref(new epp_host_address_seq); ! string::size_type space = testDataMap[thisEl].find(" "); if(space != string::npos) { |
From: Asbjorn M. <ste...@us...> - 2002-04-24 15:03:19
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv31883/src Modified Files: main_domainupdate.cc Log Message: Closing "}" was placed in the wrong place in an if-statement. Index: main_domainupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domainupdate.cc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main_domainupdate.cc 17 Apr 2002 14:02:56 -0000 1.10 --- main_domainupdate.cc 24 Apr 2002 15:03:15 -0000 1.11 *************** *** 167,207 **** } ! if(testDataMap[10] != "-1") { ! string statuses = testDataMap[10]; ! l_req->m_add->m_status.ref(new epp_domain_status_seq()); ! int begin = 0; ! int end = 0; ! while(end != string::npos) { ! end = statuses.find(' ', begin); ! string tmp = statuses.substr(begin,end-begin); ! ! epp_DomainStatus status; ! status.m_type.ref(new epp_DomainStatusType(returnStatusEnumType(tmp))); ! l_req->m_add->m_status->push_back(status); ! ! begin = end+1; ! } } ! if(testDataMap[11] != "-1") { ! string hosts = testDataMap[11]; ! l_req->m_add->m_name_servers.ref(new epp_string_seq()); ! ! int begin = 0; ! int end = 0; ! while(end != string::npos) { ! end = hosts.find(' ', begin); ! string tmp = hosts.substr(begin,end-begin); ! ! l_req->m_add->m_name_servers->push_back(tmp); ! begin = end+1; ! } } - } --- 167,206 ---- } + } ! if(testDataMap[10] != "-1") { ! string statuses = testDataMap[10]; ! l_req->m_add->m_status.ref(new epp_domain_status_seq()); ! ! int begin = 0; ! int end = 0; ! ! while(end != string::npos) { ! end = statuses.find(' ', begin); ! string tmp = statuses.substr(begin,end-begin); ! epp_DomainStatus status; ! status.m_type.ref(new epp_DomainStatusType(returnStatusEnumType(tmp))); ! l_req->m_add->m_status->push_back(status); ! begin = end+1; } + } + + if(testDataMap[11] != "-1") { + string hosts = testDataMap[11]; + l_req->m_add->m_name_servers.ref(new epp_string_seq()); ! int begin = 0; ! int end = 0; ! ! while(end != string::npos) { ! end = hosts.find(' ', begin); ! string tmp = hosts.substr(begin,end-begin); ! l_req->m_add->m_name_servers->push_back(tmp); ! begin = end+1; } } *************** *** 233,273 **** } ! if(testDataMap[16] != "-1") { ! string statuses = testDataMap[16]; ! l_req->m_remove->m_status.ref(new epp_domain_status_seq()); ! int begin = 0; ! int end = 0; ! while(end != string::npos) { ! end = statuses.find(' ', begin); ! string tmp = statuses.substr(begin,end-begin); ! ! epp_DomainStatus status; ! status.m_type.ref(new epp_DomainStatusType(returnStatusEnumType(tmp))); ! l_req->m_remove->m_status->push_back(status); ! ! begin = end+1; ! } } ! if(testDataMap[17] != "-1") { ! string hosts = testDataMap[17]; ! l_req->m_remove->m_name_servers.ref(new epp_string_seq()); ! ! int begin = 0; ! int end = 0; ! while(end != string::npos) { ! end = hosts.find(' ', begin); ! string tmp = hosts.substr(begin,end-begin); ! ! l_req->m_remove->m_name_servers->push_back(tmp); ! begin = end+1; ! } } - } --- 232,271 ---- } + } ! if(testDataMap[16] != "-1") { ! string statuses = testDataMap[16]; ! l_req->m_remove->m_status.ref(new epp_domain_status_seq()); ! ! int begin = 0; ! int end = 0; ! ! while(end != string::npos) { ! end = statuses.find(' ', begin); ! string tmp = statuses.substr(begin,end-begin); ! epp_DomainStatus status; ! status.m_type.ref(new epp_DomainStatusType(returnStatusEnumType(tmp))); ! l_req->m_remove->m_status->push_back(status); ! begin = end+1; } + } + + if(testDataMap[17] != "-1") { + string hosts = testDataMap[17]; + l_req->m_remove->m_name_servers.ref(new epp_string_seq()); ! int begin = 0; ! int end = 0; ! ! while(end != string::npos) { ! end = hosts.find(' ', begin); ! string tmp = hosts.substr(begin,end-begin); ! l_req->m_remove->m_name_servers->push_back(tmp); ! begin = end+1; } } |
From: Asbjorn M. <ste...@us...> - 2002-04-24 14:43:29
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv25028/src Modified Files: epp_Session.cc Log Message: Now using string::size_type instead of unsigned long in a string::find(...) (Thanks kfroyn). Index: epp_Session.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_Session.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** epp_Session.cc 13 Mar 2002 16:15:06 -0000 1.6 --- epp_Session.cc 24 Apr 2002 14:43:25 -0000 1.7 *************** *** 51,55 **** // Deleting leading whitespace from response: ! unsigned long firstNotWhite = xml.find_first_not_of(" \t\r\n"); if(firstNotWhite != string::npos && firstNotWhite != 0) { xml.erase(0, firstNotWhite); --- 51,55 ---- // Deleting leading whitespace from response: ! string::size_type firstNotWhite = xml.find_first_not_of(" \t\r\n"); if(firstNotWhite != string::npos && firstNotWhite != 0) { xml.erase(0, firstNotWhite); |
From: Asbjorn M. <ste...@us...> - 2002-04-24 14:42:06
|
Update of /cvsroot/epp-rtk/epp-rtk/c++ In directory usw-pr-cvs1:/tmp/cvs-serv24082 Modified Files: debug.sh final.sh Log Message: Now possible to pass parameters to configure (Thanks kfroyn). Index: debug.sh =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/debug.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** debug.sh 28 Jun 2001 16:39:55 -0000 1.2 --- debug.sh 24 Apr 2002 14:42:01 -0000 1.3 *************** *** 1,3 **** #!/bin/bash ! automake && autoconf && ./configure && make clean && make CXXFLAGS=" -ggdb -Wall --ansi" --- 1,3 ---- #!/bin/bash ! automake && autoconf && ./configure $* && make clean && make CXXFLAGS=" -ggdb -Wall --ansi" Index: final.sh =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/final.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** final.sh 12 Mar 2002 14:21:04 -0000 1.3 --- final.sh 24 Apr 2002 14:42:02 -0000 1.4 *************** *** 1,3 **** #!/bin/bash ! automake && autoconf && ./configure && make clean && make CXXFLAGS="--ansi -O2 -DRELEASE" && make install --- 1,3 ---- #!/bin/bash ! automake && autoconf && ./configure $* && make clean && make CXXFLAGS="--ansi -O2 -DRELEASE" && make install |
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv14909 Modified Files: main_domaincheck.cc main_domaincreate.cc main_domaindelete.cc main_domaininfo.cc main_domainrenew.cc main_domainupdate.cc Log Message: Added -testdata option to provide data to test programs. Index: main_domaincheck.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domaincheck.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_domaincheck.cc 15 Mar 2002 16:34:22 -0000 1.8 --- main_domaincheck.cc 17 Apr 2002 14:02:56 -0000 1.9 *************** *** 92,95 **** --- 92,107 ---- return 1; + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } + testLogIn(test, username, password); *************** *** 97,110 **** epp_DomainCheckReq_ref l_req(new epp_DomainCheckReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); epp_string_seq_ref names(new epp_string_seq()); ! names->push_back("example1.com"); ! names->push_back("example2.com"); ! names->push_back("example3.com"); l_req->m_names = names; --- 109,134 ---- epp_DomainCheckReq_ref l_req(new epp_DomainCheckReq()); + + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); epp_string_seq_ref names(new epp_string_seq()); ! if(testDataMap.empty()) { ! names->push_back("example1.com"); ! names->push_back("example2.com"); ! names->push_back("example3.com"); ! } ! else { ! for(unsigned int n = 2; n <= testDataMap.size(); n++) { ! names->push_back(testDataMap[n]); ! } ! } ! l_req->m_names = names; Index: main_domaincreate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domaincreate.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main_domaincreate.cc 15 Mar 2002 16:34:22 -0000 1.9 --- main_domaincreate.cc 17 Apr 2002 14:02:56 -0000 1.10 *************** *** 77,80 **** --- 77,92 ---- return 1; + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } + testLogIn(test, username, password); *************** *** 82,108 **** epp_DomainCreateReq_ref l_req(new epp_DomainCreateReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); ! ! l_req->m_name.ref(new epp_string("example.com")); ! l_req->m_period.ref(new epp_DomainPeriod(YEAR, 2)); ! l_req->m_name_servers.ref(new epp_string_seq()); ! l_req->m_name_servers->push_back("ns1.example.com"); ! l_req->m_name_servers->push_back("ns2.example.com"); ! l_req->m_registrant.ref(new epp_string("jd1234")); ! ! l_req->m_contacts.ref(new epp_domain_contact_seq()); ! epp_DomainContact Cont1(ADMIN, epp_string("sh8013")); ! epp_DomainContact Cont2(TECH, epp_string ("sh8013")); ! ! l_req->m_contacts->push_back(Cont1); ! l_req->m_contacts->push_back(Cont2); ! ! l_req->m_auth_info.ref(new epp_AuthInfo()); ! l_req->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! l_req->m_auth_info->m_value.ref(new epp_string("2fooBAR")); epp_DomainCreate_ref l_obj(new epp_DomainCreate()); --- 94,154 ---- epp_DomainCreateReq_ref l_req(new epp_DomainCreateReq()); + + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); + if(testDataMap.empty()) { + l_req->m_name.ref(new epp_string("example.com")); + l_req->m_period.ref(new epp_DomainPeriod(YEAR, 2)); + l_req->m_name_servers.ref(new epp_string_seq()); + l_req->m_name_servers->push_back("ns1.example.com"); + l_req->m_name_servers->push_back("ns2.example.com"); + l_req->m_registrant.ref(new epp_string("jd1234")); + + l_req->m_contacts.ref(new epp_domain_contact_seq()); + epp_DomainContact Cont1(ADMIN, epp_string("sh8013")); + epp_DomainContact Cont2(TECH, epp_string ("sh8013")); + + l_req->m_contacts->push_back(Cont1); + l_req->m_contacts->push_back(Cont2); + + l_req->m_auth_info.ref(new epp_AuthInfo()); + l_req->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); + l_req->m_auth_info->m_value.ref(new epp_string("2fooBAR")); + } + else { + if(testDataMap[2] != "-1") l_req->m_name.ref(new epp_string(testDataMap[2])); + + if(testDataMap[3] != "-1") l_req->m_period.ref(new epp_DomainPeriod(YEAR, atol(testDataMap[3].c_str()))); + + if(testDataMap[4] != "-1") { + l_req->m_auth_info.ref(new epp_AuthInfo()); + l_req->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); + l_req->m_auth_info->m_value.ref(new epp_string(testDataMap[4])); + } + + if(testDataMap[5] != "-1") l_req->m_registrant.ref(new epp_string(testDataMap[5])); + + l_req->m_contacts.ref(new epp_domain_contact_seq()); + + if(testDataMap[6] != "-1") l_req->m_contacts->push_back(epp_DomainContact(ADMIN, epp_string(testDataMap[6]))); + if(testDataMap[7] != "-1") l_req->m_contacts->push_back(epp_DomainContact(TECH, epp_string(testDataMap[7]))); + if(testDataMap[8] != "-1") l_req->m_contacts->push_back(epp_DomainContact(BILLING, epp_string(testDataMap[8]))); + + if(!testDataMap[9].empty()) { + l_req->m_name_servers.ref(new epp_string_seq()); + + for(unsigned int n = 9; n <= testDataMap.size(); n++) { + l_req->m_name_servers->push_back(testDataMap[n]); + } + } + + + } epp_DomainCreate_ref l_obj(new epp_DomainCreate()); Index: main_domaindelete.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domaindelete.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_domaindelete.cc 15 Mar 2002 16:34:22 -0000 1.8 --- main_domaindelete.cc 17 Apr 2002 14:02:56 -0000 1.9 *************** *** 61,64 **** --- 61,76 ---- return 1; + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } + testLogIn(test, username, password); *************** *** 66,75 **** epp_DomainDeleteReq_ref l_req(new epp_DomainDeleteReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); ! l_req->m_name.ref(new epp_string("example.com")); epp_DomainDelete_ref l_obj(new epp_DomainDelete()); --- 78,96 ---- epp_DomainDeleteReq_ref l_req(new epp_DomainDeleteReq()); + + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); ! if(testDataMap.empty()) { ! l_req->m_name.ref(new epp_string("example.com")); ! } ! else { ! l_req->m_name.ref(new epp_string(testDataMap[2])); ! } epp_DomainDelete_ref l_obj(new epp_DomainDelete()); Index: main_domaininfo.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domaininfo.cc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main_domaininfo.cc 15 Mar 2002 16:34:22 -0000 1.10 --- main_domaininfo.cc 17 Apr 2002 14:02:56 -0000 1.11 *************** *** 183,186 **** --- 183,198 ---- if(!handleArgs(test, argc, argv, username, password)) return 1; + + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } testLogIn(test, username, password); *************** *** 190,198 **** epp_DomainInfoReq_ref l_req(new epp_DomainInfoReq()); l_req->m_cmd.ref(new eppobject::epp::epp_Command(NULL, NULL, ! eppobject::epp::epp_trid("ABC-12345"))); ! l_req->m_name.ref(new eppobject::epp::epp_string("example.com")); l_req->m_hosts_type.ref(new epp_DomainHostsType(ALL)); --- 202,219 ---- epp_DomainInfoReq_ref l_req(new epp_DomainInfoReq()); + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; + l_req->m_cmd.ref(new eppobject::epp::epp_Command(NULL, NULL, ! eppobject::epp::epp_trid(trID))); ! if(testDataMap.empty()) { ! l_req->m_name.ref(new eppobject::epp::epp_string("example.com")); ! } ! else { ! l_req->m_name.ref(new eppobject::epp::epp_string(testDataMap[2])); ! } l_req->m_hosts_type.ref(new epp_DomainHostsType(ALL)); Index: main_domainrenew.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domainrenew.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main_domainrenew.cc 15 Mar 2002 16:34:22 -0000 1.9 --- main_domainrenew.cc 17 Apr 2002 14:02:56 -0000 1.10 *************** *** 72,75 **** --- 72,87 ---- if(!handleArgs(test, argc, argv, username, password)) return 1; + + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } testLogIn(test, username, password); *************** *** 79,89 **** epp_DomainRenewReq_ref l_req(new epp_DomainRenewReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); ! l_req->m_name.ref(new epp_string("example.com")); ! l_req->m_current_expiration_date.ref(new epp_date("2000-04-03")); ! l_req->m_period.ref(new epp_DomainPeriod(YEAR, 5)); epp_DomainRenew_ref l_obj(new epp_DomainRenew()); --- 91,114 ---- epp_DomainRenewReq_ref l_req(new epp_DomainRenewReq()); + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; + l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); ! if(testDataMap.empty()) { ! l_req->m_name.ref(new epp_string("example.com")); ! l_req->m_current_expiration_date.ref(new epp_date("2000-04-03")); ! l_req->m_period.ref(new epp_DomainPeriod(YEAR, 5)); ! } ! else { ! if(testDataMap[2] != "-1") l_req->m_name.ref(new epp_string(testDataMap[2])); ! ! if(testDataMap[3] != "-1") l_req->m_period.ref(new epp_DomainPeriod(YEAR, atol(testDataMap[3].c_str()))); ! ! if(testDataMap[4] != "-1") l_req->m_current_expiration_date.ref(new epp_date(testDataMap[4])); ! } epp_DomainRenew_ref l_obj(new epp_DomainRenew()); Index: main_domainupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domainupdate.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main_domainupdate.cc 15 Mar 2002 16:34:22 -0000 1.9 --- main_domainupdate.cc 17 Apr 2002 14:02:56 -0000 1.10 *************** *** 33,36 **** --- 33,37 ---- #include "data/epp_XMLException.h" #include "data/epp_Exception.h" + #include "data/epp_domainXMLbase.h" #include "epp_Action.h" #include "epp_DomainUpdate.h" *************** *** 64,109 **** testLogIn(test, username, password); try { epp_DomainUpdateReq_ref l_req(new epp_DomainUpdateReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); ! ! l_req->m_name.ref(new epp_string("example.com")); ! ! l_req->m_add.ref(new epp_DomainUpdateAddRemove()); ! l_req->m_add->m_name_servers.ref(new epp_string_seq()); ! l_req->m_add->m_name_servers->push_back("ns1.example2.com"); ! ! l_req->m_add->m_contacts.ref(new epp_domain_contact_seq()); ! epp_DomainContact Cont1(TECH, epp_string("mak21")); ! l_req->m_add->m_contacts->push_back(Cont1); ! ! l_req->m_add->m_status.ref(new epp_domain_status_seq()); ! epp_DomainStatus stat; ! stat.m_type.ref(new epp_DomainStatusType(CLIENT_HOLD)); ! stat.m_lang.ref(new epp_string("en")); ! stat.m_value.ref(new epp_string("Payment overdue.")); ! l_req->m_add->m_status->push_back(stat); ! ! l_req->m_remove.ref(new epp_DomainUpdateAddRemove()); ! l_req->m_remove->m_name_servers.ref(new epp_string_seq()); ! l_req->m_remove->m_name_servers->push_back("ns2.example.com"); ! l_req->m_remove->m_contacts.ref(new epp_domain_contact_seq()); ! epp_DomainContact Cont2(TECH, epp_string("sh8013")); ! l_req->m_remove->m_contacts->push_back(Cont2); ! l_req->m_remove->m_status.ref(new epp_domain_status_seq()); ! epp_DomainStatus stat2; ! stat2.m_type.ref(new epp_DomainStatusType(CLIENT_UPDATE_PROHIBITED)); ! l_req->m_remove->m_status->push_back(stat2); ! ! l_req->m_change.ref(new epp_DomainUpdateChange()); ! l_req->m_change->m_registrant.ref(new epp_string("sh8013")); ! l_req->m_change->m_auth_info.ref(new epp_AuthInfo()); ! l_req->m_change->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! l_req->m_change->m_auth_info->m_value.ref(new epp_string("2BARfoo")); epp_DomainUpdate_ref l_obj(new epp_DomainUpdate()); --- 65,278 ---- testLogIn(test, username, password); + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } + try { epp_DomainUpdateReq_ref l_req(new epp_DomainUpdateReq()); + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; + l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); ! if(testDataMap.empty()) { ! l_req->m_name.ref(new epp_string("example.com")); ! ! l_req->m_add.ref(new epp_DomainUpdateAddRemove()); ! l_req->m_add->m_name_servers.ref(new epp_string_seq()); ! l_req->m_add->m_name_servers->push_back("ns1.example2.com"); ! ! l_req->m_add->m_contacts.ref(new epp_domain_contact_seq()); ! epp_DomainContact Cont1(TECH, epp_string("mak21")); ! l_req->m_add->m_contacts->push_back(Cont1); ! ! l_req->m_add->m_status.ref(new epp_domain_status_seq()); ! epp_DomainStatus stat; ! stat.m_type.ref(new epp_DomainStatusType(CLIENT_HOLD)); ! stat.m_lang.ref(new epp_string("en")); ! stat.m_value.ref(new epp_string("Payment overdue.")); ! l_req->m_add->m_status->push_back(stat); ! ! l_req->m_remove.ref(new epp_DomainUpdateAddRemove()); ! l_req->m_remove->m_name_servers.ref(new epp_string_seq()); ! l_req->m_remove->m_name_servers->push_back("ns2.example.com"); ! l_req->m_remove->m_contacts.ref(new epp_domain_contact_seq()); ! epp_DomainContact Cont2(TECH, epp_string("sh8013")); ! l_req->m_remove->m_contacts->push_back(Cont2); ! l_req->m_remove->m_status.ref(new epp_domain_status_seq()); ! epp_DomainStatus stat2; ! stat2.m_type.ref(new epp_DomainStatusType(CLIENT_UPDATE_PROHIBITED)); ! l_req->m_remove->m_status->push_back(stat2); ! ! ! l_req->m_change.ref(new epp_DomainUpdateChange()); ! l_req->m_change->m_registrant.ref(new epp_string("sh8013")); ! l_req->m_change->m_auth_info.ref(new epp_AuthInfo()); ! l_req->m_change->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! l_req->m_change->m_auth_info->m_value.ref(new epp_string("2BARfoo")); ! } ! else { ! if(testDataMap[2] != "-1") l_req->m_name.ref(new epp_string(testDataMap[2])); ! ! if(testDataMap[3] == "chg") { ! ! l_req->m_change.ref(new epp_DomainUpdateChange()); ! ! if(testDataMap[4] != "-1") l_req->m_change->m_registrant.ref(new epp_string(testDataMap[4])); ! ! if(testDataMap[5] != "-1") { ! l_req->m_change->m_auth_info.ref(new epp_AuthInfo()); ! l_req->m_change->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! l_req->m_change->m_auth_info->m_value.ref(new epp_string(testDataMap[5])); ! } ! ! } ! ! if(testDataMap[6] == "add") { ! ! l_req->m_add.ref(new epp_DomainUpdateAddRemove()); ! ! if(testDataMap[7] != "-1" || testDataMap[8] != "-1" || testDataMap[9] != "-1") { ! ! l_req->m_add->m_contacts.ref(new epp_domain_contact_seq()); ! ! if(testDataMap[7] != "-1") { ! epp_DomainContact Cont1(ADMIN, epp_string(testDataMap[7])); ! l_req->m_add->m_contacts->push_back(Cont1); ! ! } ! ! if(testDataMap[8] != "-1") { ! epp_DomainContact Cont1(TECH, epp_string(testDataMap[8])); ! l_req->m_add->m_contacts->push_back(Cont1); ! ! } ! ! if(testDataMap[9] != "-1") { ! epp_DomainContact Cont1(BILLING, epp_string(testDataMap[9])); ! l_req->m_add->m_contacts->push_back(Cont1); ! ! } ! ! if(testDataMap[10] != "-1") { ! string statuses = testDataMap[10]; ! l_req->m_add->m_status.ref(new epp_domain_status_seq()); ! ! int begin = 0; ! int end = 0; ! ! while(end != string::npos) { ! end = statuses.find(' ', begin); ! string tmp = statuses.substr(begin,end-begin); ! ! epp_DomainStatus status; ! status.m_type.ref(new epp_DomainStatusType(returnStatusEnumType(tmp))); ! l_req->m_add->m_status->push_back(status); ! ! begin = end+1; ! } ! } ! ! if(testDataMap[11] != "-1") { ! string hosts = testDataMap[11]; ! l_req->m_add->m_name_servers.ref(new epp_string_seq()); ! ! int begin = 0; ! int end = 0; ! ! while(end != string::npos) { ! end = hosts.find(' ', begin); ! string tmp = hosts.substr(begin,end-begin); ! ! l_req->m_add->m_name_servers->push_back(tmp); ! ! begin = end+1; ! } ! } ! ! } ! ! } ! ! if(testDataMap[12] == "rem") { ! ! l_req->m_remove.ref(new epp_DomainUpdateAddRemove()); ! ! if(testDataMap[13] != "-1" || testDataMap[14] != "-1" || testDataMap[15] != "-1") { ! ! l_req->m_remove->m_contacts.ref(new epp_domain_contact_seq()); ! ! if(testDataMap[13] != "-1") { ! epp_DomainContact Cont1(ADMIN, epp_string(testDataMap[13])); ! l_req->m_remove->m_contacts->push_back(Cont1); ! ! } ! ! if(testDataMap[14] != "-1") { ! epp_DomainContact Cont1(TECH, epp_string(testDataMap[14])); ! l_req->m_remove->m_contacts->push_back(Cont1); ! ! } ! ! if(testDataMap[15] != "-1") { ! epp_DomainContact Cont1(BILLING, epp_string(testDataMap[15])); ! l_req->m_remove->m_contacts->push_back(Cont1); ! ! } ! ! if(testDataMap[16] != "-1") { ! string statuses = testDataMap[16]; ! l_req->m_remove->m_status.ref(new epp_domain_status_seq()); ! ! int begin = 0; ! int end = 0; ! ! while(end != string::npos) { ! end = statuses.find(' ', begin); ! string tmp = statuses.substr(begin,end-begin); ! ! epp_DomainStatus status; ! status.m_type.ref(new epp_DomainStatusType(returnStatusEnumType(tmp))); ! l_req->m_remove->m_status->push_back(status); ! ! begin = end+1; ! } ! } ! ! if(testDataMap[17] != "-1") { ! string hosts = testDataMap[17]; ! l_req->m_remove->m_name_servers.ref(new epp_string_seq()); ! ! int begin = 0; ! int end = 0; ! ! while(end != string::npos) { ! end = hosts.find(' ', begin); ! string tmp = hosts.substr(begin,end-begin); ! ! l_req->m_remove->m_name_servers->push_back(tmp); ! ! begin = end+1; ! } ! } ! ! } ! ! } ! ! } epp_DomainUpdate_ref l_obj(new epp_DomainUpdate()); |
From: Asbjorn M. <ste...@us...> - 2002-04-17 11:54:44
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv2639 Modified Files: main_hostcheck.cc main_hostcreate.cc main_hostdelete.cc main_hostinfo.cc main_hostupdate.cc Log Message: Added -testdata option to provide data to test programs. (The update code is a bit messy). Index: main_hostcheck.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostcheck.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_hostcheck.cc 15 Mar 2002 16:34:22 -0000 1.8 --- main_hostcheck.cc 17 Apr 2002 11:54:36 -0000 1.9 *************** *** 91,97 **** if(!handleArgs(test, argc, argv, username, password)) return 1; testLogIn(test, username, password); - try { --- 91,108 ---- if(!handleArgs(test, argc, argv, username, password)) return 1; + + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } testLogIn(test, username, password); try { *************** *** 99,111 **** epp_HostCheckReq_ref l_req(new epp_HostCheckReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); epp_string_seq_ref names(new epp_string_seq()); ! names->push_back("ns1.example.com"); ! names->push_back("ns2.example.com"); ! names->push_back("ns3.example.com"); l_req->m_names = names; --- 110,133 ---- epp_HostCheckReq_ref l_req(new epp_HostCheckReq()); + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; + l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); epp_string_seq_ref names(new epp_string_seq()); ! if(testDataMap.empty()) { ! names->push_back("ns1.example.com"); ! names->push_back("ns2.example.com"); ! names->push_back("ns3.example.com"); ! } ! else { ! for(unsigned int n = 2; n <= testDataMap.size(); n++) { ! names->push_back(testDataMap[n]); ! } ! } l_req->m_names = names; Index: main_hostcreate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostcreate.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main_hostcreate.cc 15 Mar 2002 16:34:22 -0000 1.9 --- main_hostcreate.cc 17 Apr 2002 11:54:36 -0000 1.10 *************** *** 33,36 **** --- 33,37 ---- #include "data/epp_XMLException.h" #include "data/epp_Exception.h" + #include "data/epp_hostXMLbase.h" #include "epp_Action.h" #include "epp_HostCreate.h" *************** *** 77,80 **** --- 78,93 ---- return 1; + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } + testLogIn(test, username, password); *************** *** 82,105 **** epp_HostCreateReq_ref l_req(new epp_HostCreateReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); ! ! epp_HostAddress host1(IPV4, epp_string("192.1.2.3")); ! epp_HostAddress host2(IPV4, epp_string("198.1.2.3")); ! epp_HostAddress host3(IPV6, epp_string("1080:0:0:0:8:800:200C:417A")); ! epp_HostAddress host4(IPV6, epp_string("::FFFF:129.144.52.38")); ! ! epp_host_address_seq_ref ipadr(new epp_host_address_seq); ! ! ipadr->push_back(host1); ! ipadr->push_back(host2); ! ipadr->push_back(host3); ! ipadr->push_back(host4); ! ! l_req->m_name.ref(new epp_string("ns1.example.com")); ! l_req->m_addresses = ipadr; epp_HostCreate_ref l_obj(new epp_HostCreate()); --- 95,148 ---- epp_HostCreateReq_ref l_req(new epp_HostCreateReq()); + + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); + if(testDataMap.empty()) { + epp_HostAddress host1(IPV4, epp_string("192.1.2.3")); + epp_HostAddress host2(IPV4, epp_string("198.1.2.3")); + epp_HostAddress host3(IPV6, epp_string("1080:0:0:0:8:800:200C:417A")); + epp_HostAddress host4(IPV6, epp_string("::FFFF:129.144.52.38")); + + epp_host_address_seq_ref ipadr(new epp_host_address_seq); + + ipadr->push_back(host1); + ipadr->push_back(host2); + ipadr->push_back(host3); + ipadr->push_back(host4); + + l_req->m_name.ref(new epp_string("ns1.example.com")); + l_req->m_addresses = ipadr; + } + else { + + if(testDataMap[2] != "-1") l_req->m_name.ref(new epp_string(testDataMap[2])); + + if(!testDataMap[3].empty()) { + epp_host_address_seq_ref ipadr(new epp_host_address_seq); + + for(unsigned int n = 3; n <= testDataMap.size(); n++) { + + int space = testDataMap[n].find(" "); + + if(space != string::npos) { + string ip = testDataMap[n].substr(0,space); + string iptype = testDataMap[n].substr(space+1, testDataMap[n].length()); + + epp_HostAddress host(returnIPTypeEnum(epp_string(iptype)), epp_string(ip)); + ipadr->push_back(host); + } + } + + l_req->m_addresses = ipadr; + } + + } + epp_HostCreate_ref l_obj(new epp_HostCreate()); Index: main_hostdelete.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostdelete.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_hostdelete.cc 15 Mar 2002 16:34:22 -0000 1.8 --- main_hostdelete.cc 17 Apr 2002 11:54:36 -0000 1.9 *************** *** 61,64 **** --- 61,76 ---- if(!handleArgs(test, argc, argv, username, password)) return 1; + + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } testLogIn(test, username, password); *************** *** 68,76 **** epp_HostDeleteReq_ref l_req(new epp_HostDeleteReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); ! l_req->m_name.ref(new epp_string("ns1.example.com")); epp_HostDelete_ref l_obj(new epp_HostDelete()); --- 80,97 ---- epp_HostDeleteReq_ref l_req(new epp_HostDeleteReq()); + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; + l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); ! if(testDataMap.empty()) { ! l_req->m_name.ref(new epp_string("ns1.example.com")); ! } ! else { ! l_req->m_name.ref(new epp_string(testDataMap[2])); ! } epp_HostDelete_ref l_obj(new epp_HostDelete()); Index: main_hostinfo.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostinfo.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main_hostinfo.cc 15 Mar 2002 16:34:22 -0000 1.9 --- main_hostinfo.cc 17 Apr 2002 11:54:36 -0000 1.10 *************** *** 133,136 **** --- 133,148 ---- return 1; + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } + testLogIn(test, username, password); *************** *** 139,147 **** epp_HostInfoReq_ref l_req(new epp_HostInfoReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); ! l_req->m_name.ref(new epp_string("ns1.example.com")); epp_HostInfo_ref l_obj(new epp_HostInfo()); --- 151,168 ---- epp_HostInfoReq_ref l_req(new epp_HostInfoReq()); + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; + l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); ! if(testDataMap.empty()) { ! l_req->m_name.ref(new epp_string("ns1.example.com")); ! } ! else { ! l_req->m_name.ref(new epp_string(testDataMap[2])); ! } epp_HostInfo_ref l_obj(new epp_HostInfo()); Index: main_hostupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostupdate.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main_hostupdate.cc 15 Mar 2002 16:34:22 -0000 1.9 --- main_hostupdate.cc 17 Apr 2002 11:54:36 -0000 1.10 *************** *** 33,36 **** --- 33,37 ---- #include "data/epp_XMLException.h" #include "data/epp_Exception.h" + #include "data/epp_hostXMLbase.h" #include "epp_Action.h" #include "epp_HostUpdate.h" *************** *** 62,65 **** --- 63,78 ---- return 1; + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } + testLogIn(test, username, password); *************** *** 67,106 **** epp_HostUpdateReq_ref l_req(new epp_HostUpdateReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); ! ! // Data to add: ! epp_HostAddress host1(IPV4, epp_string("192.1.2.3")); ! ! epp_host_address_seq_ref hosts1(new epp_host_address_seq); ! hosts1->push_back(host1); ! ! epp_HostStatus singlestatus; ! singlestatus.m_type.ref(new epp_HostStatusType(CLIENT_UPDATE_PROHIBITED)); ! epp_host_status_seq_ref hosts1status(new epp_host_status_seq); ! hosts1status->push_back(singlestatus); ! epp_HostUpdateAddRemove_ref toadd(new epp_HostUpdateAddRemove()); ! ! toadd->m_addresses = hosts1; ! toadd->m_status = hosts1status; ! ! // Data to rem: ! epp_HostAddress host2(IPV6, epp_string("1080:0:0:0:8:800:200C:417A")); ! ! epp_host_address_seq_ref hosts2(new epp_host_address_seq()); ! hosts2->push_back(host2); ! ! epp_HostUpdateAddRemove_ref torem(new epp_HostUpdateAddRemove()); ! torem->m_addresses = hosts2; ! ! l_req->m_name.ref(new epp_string("ns1.example.com")); ! l_req->m_add = toadd; ! l_req->m_remove = torem; ! l_req->m_change.ref(new epp_HostUpdateChange()); ! l_req->m_change->m_name.ref(new epp_string("ns2.example.com")); epp_HostUpdate_ref l_obj(new epp_HostUpdate()); --- 80,231 ---- epp_HostUpdateReq_ref l_req(new epp_HostUpdateReq()); + + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); ! if(testDataMap.empty()) { ! // Data to add: ! epp_HostAddress host1(IPV4, epp_string("192.1.2.3")); ! ! epp_host_address_seq_ref hosts1(new epp_host_address_seq); ! hosts1->push_back(host1); ! ! epp_HostStatus singlestatus; ! singlestatus.m_type.ref(new epp_HostStatusType(CLIENT_UPDATE_PROHIBITED)); ! ! epp_host_status_seq_ref hosts1status(new epp_host_status_seq); ! hosts1status->push_back(singlestatus); ! ! epp_HostUpdateAddRemove_ref toadd(new epp_HostUpdateAddRemove()); ! ! toadd->m_addresses = hosts1; ! toadd->m_status = hosts1status; ! ! // Data to rem: ! epp_HostAddress host2(IPV6, epp_string("1080:0:0:0:8:800:200C:417A")); ! ! epp_host_address_seq_ref hosts2(new epp_host_address_seq()); ! hosts2->push_back(host2); ! ! epp_HostUpdateAddRemove_ref torem(new epp_HostUpdateAddRemove()); ! torem->m_addresses = hosts2; ! ! l_req->m_name.ref(new epp_string("ns1.example.com")); ! l_req->m_add = toadd; ! l_req->m_remove = torem; ! l_req->m_change.ref(new epp_HostUpdateChange()); ! l_req->m_change->m_name.ref(new epp_string("ns2.example.com")); ! } ! else { ! if(testDataMap[2] != "-1") l_req->m_name.ref(new epp_string(testDataMap[2])); ! ! if(testDataMap[3] == "chg") { ! ! l_req->m_change.ref(new epp_HostUpdateChange()); ! ! if(testDataMap[4] != "-1") l_req->m_change->m_name.ref(new epp_string(testDataMap[4])); ! } ! ! unsigned int thisEl = 6; ! unsigned int remEl = 1; ! unsigned int mapSize = testDataMap.size(); ! ! while(remEl <= mapSize) { ! if(testDataMap[remEl] == "rem") break; ! remEl++; ! } ! ! if(testDataMap[5] == "add") { ! ! epp_HostUpdateAddRemove_ref toadd(new epp_HostUpdateAddRemove()); ! ! if(testDataMap[6] != "-1") { ! string statuses = testDataMap[6]; ! toadd->m_status.ref(new epp_host_status_seq()); ! ! int begin = 0; ! int end = 0; ! ! while(end != string::npos) { ! end = statuses.find(' ', begin); ! string tmp = statuses.substr(begin,end-begin); ! ! epp_HostStatus status; ! status.m_type.ref(new epp_HostStatusType(returnStatusEnumType(tmp))); ! toadd->m_status->push_back(status); ! ! begin = end+1; ! } ! } ! ! while(thisEl <= mapSize && testDataMap[++thisEl] != "rem") { ! if(toadd->m_addresses == NULL) toadd->m_addresses.ref(new epp_host_address_seq); ! ! int space = testDataMap[thisEl].find(" "); ! ! if(space != string::npos) { ! string ip = testDataMap[thisEl].substr(0,space); ! string iptype = testDataMap[thisEl].substr(space+1, testDataMap[thisEl].length()); ! ! epp_HostAddress host(returnIPTypeEnum(epp_string(iptype)), epp_string(ip)); ! toadd->m_addresses->push_back(host); ! } ! } ! ! l_req->m_add = toadd; ! ! } ! ! thisEl = remEl; ! ! if(testDataMap[thisEl] == "rem") { ! ! epp_HostUpdateAddRemove_ref torem(new epp_HostUpdateAddRemove()); ! ! if(testDataMap[++thisEl] != "-1") { ! string statuses = testDataMap[thisEl]; ! torem->m_status.ref(new epp_host_status_seq()); ! ! int begin = 0; ! int end = 0; ! ! while(end != string::npos) { ! end = statuses.find(' ', begin); ! string tmp = statuses.substr(begin,end-begin); ! ! epp_HostStatus status; ! status.m_type.ref(new epp_HostStatusType(returnStatusEnumType(tmp))); ! torem->m_status->push_back(status); ! ! begin = end+1; ! } ! } ! ! while(thisEl++ <= mapSize) { ! ! if(torem->m_addresses == NULL) torem->m_addresses.ref(new epp_host_address_seq); ! ! int space = testDataMap[thisEl].find(" "); ! ! if(space != string::npos) { ! string ip = testDataMap[thisEl].substr(0,space); ! string iptype = testDataMap[thisEl].substr(space+1, testDataMap[thisEl].length()); ! ! epp_HostAddress host(returnIPTypeEnum(epp_string(iptype)), epp_string(ip)); ! torem->m_addresses->push_back(host); ! } ! } ! ! l_req->m_remove = torem; ! ! } ! ! } epp_HostUpdate_ref l_obj(new epp_HostUpdate()); |
From: Asbjorn M. <ste...@us...> - 2002-04-16 19:51:49
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv27701 Modified Files: main_contactcheck.cc main_contactcreate.cc main_contactdelete.cc main_contactinfo.cc main_contactupdate.cc Log Message: Added -testdata option to provide data to test programs. Index: main_contactcheck.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactcheck.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main_contactcheck.cc 15 Mar 2002 16:34:22 -0000 1.9 --- main_contactcheck.cc 16 Apr 2002 19:51:02 -0000 1.10 *************** *** 94,97 **** --- 94,109 ---- if(!handleArgs(test, argc, argv, username, password)) return 1; + + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } testLogIn(test, username, password); *************** *** 101,113 **** epp_ContactCheckReq_ref l_req(new epp_ContactCheckReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); epp_string_seq_ref names(new epp_string_seq); ! names->push_back("sh8013"); ! names->push_back("sah8013"); ! names->push_back("8013sah"); l_req->m_ids = names; --- 113,136 ---- epp_ContactCheckReq_ref l_req(new epp_ContactCheckReq()); + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; + l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); epp_string_seq_ref names(new epp_string_seq); ! if(testDataMap.empty()) { ! names->push_back("sh8013"); ! names->push_back("sah8013"); ! names->push_back("8013sah"); ! } ! else { ! for(unsigned int n = 2; n <= testDataMap.size(); n++) { ! names->push_back(testDataMap[n]); ! } ! } l_req->m_ids = names; Index: main_contactcreate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactcreate.cc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main_contactcreate.cc 15 Mar 2002 16:34:22 -0000 1.10 --- main_contactcreate.cc 16 Apr 2002 19:51:02 -0000 1.11 *************** *** 75,78 **** --- 75,90 ---- return 1; + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } + testLogIn(test, username, password); *************** *** 80,113 **** epp_ContactCreateReq_ref l_req(new epp_ContactCreateReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); ! ! l_req->m_id.ref(new epp_string("sh8013")); ! ! epp_ContactNameAddress_ref addr(new epp_ContactNameAddress()); ! ! addr->m_name.ref(new epp_string("John Doe")); ! addr->m_org.ref(new epp_string("Example Inc.")); ! addr->m_address.ref(new epp_ContactAddress()); ! addr->m_address->m_street1.ref(new epp_string("123 Example Dr.")); ! addr->m_address->m_street2.ref(new epp_string( "Suite 100")); ! addr->m_address->m_city.ref(new epp_string( "Dulles")); ! addr->m_address->m_state_province.ref(new epp_string( "VA")); ! addr->m_address->m_postal_code.ref(new epp_string( "20166-6503")); ! addr->m_address->m_country_code.ref(new epp_string( "US")); ! ! ! l_req->m_ascii_address = addr; ! l_req->m_voice.ref(new epp_ContactPhone(epp_string("1234"), ! epp_string("+1.7035555555"))); ! l_req->m_fax.ref(new epp_ContactPhone()); ! l_req->m_fax->m_value.ref(new epp_string("+1.7035555556")); ! ! l_req->m_email.ref(new epp_string("jd...@ex...")); ! l_req->m_auth_info.ref(new epp_AuthInfo()); ! l_req->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! l_req->m_auth_info->m_value.ref(new epp_string("2fooBAR")); epp_ContactCreate_ref l_obj(new epp_ContactCreate()); --- 92,171 ---- epp_ContactCreateReq_ref l_req(new epp_ContactCreateReq()); + + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); ! ! if(testDataMap.empty()) { ! l_req->m_id.ref(new epp_string("sh8013")); ! ! epp_ContactNameAddress_ref addr(new epp_ContactNameAddress()); ! addr->m_name.ref(new epp_string("John Doe")); ! addr->m_org.ref(new epp_string("Example Inc.")); ! ! addr->m_address.ref(new epp_ContactAddress()); ! addr->m_address->m_street1.ref(new epp_string("123 Example Dr.")); ! addr->m_address->m_street2.ref(new epp_string("Suite 100")); ! addr->m_address->m_city.ref(new epp_string("Dulles")); ! addr->m_address->m_state_province.ref(new epp_string("VA")); ! addr->m_address->m_postal_code.ref(new epp_string("20166-6503")); ! addr->m_address->m_country_code.ref(new epp_string("US")); ! ! l_req->m_ascii_address = addr; ! ! l_req->m_voice.ref(new epp_ContactPhone(epp_string("1234"), ! epp_string("+1.7035555555"))); ! l_req->m_fax.ref(new epp_ContactPhone()); ! l_req->m_fax->m_value.ref(new epp_string("+1.7035555556")); ! ! l_req->m_email.ref(new epp_string("jd...@ex...")); ! l_req->m_auth_info.ref(new epp_AuthInfo()); ! l_req->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! l_req->m_auth_info->m_value.ref(new epp_string("2fooBAR")); ! ! } ! else { ! if(testDataMap[2] != "-1") l_req->m_id.ref(new epp_string(testDataMap[2])); ! ! if(testDataMap[3] != "-1") { ! l_req->m_auth_info.ref(new epp_AuthInfo()); ! l_req->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! l_req->m_auth_info->m_value.ref(new epp_string(testDataMap[3])); ! } ! ! epp_ContactNameAddress_ref addr(new epp_ContactNameAddress()); ! if(testDataMap[4] != "-1") addr->m_name.ref(new epp_string(testDataMap[4])); ! if(testDataMap[5] != "-1") addr->m_org.ref(new epp_string(testDataMap[5])); ! ! addr->m_address.ref(new epp_ContactAddress()); ! if(testDataMap[6] != "-1") addr->m_address->m_street1.ref(new epp_string(testDataMap[6])); ! if(testDataMap[7] != "-1") addr->m_address->m_street2.ref(new epp_string(testDataMap[7])); ! if(testDataMap[8] != "-1") addr->m_address->m_street3.ref(new epp_string(testDataMap[8])); ! if(testDataMap[9] != "-1") addr->m_address->m_city.ref(new epp_string(testDataMap[9])); ! if(testDataMap[10] != "-1") addr->m_address->m_state_province.ref(new epp_string(testDataMap[10])); ! if(testDataMap[11] != "-1") addr->m_address->m_country_code.ref(new epp_string(testDataMap[11])); ! if(testDataMap[12] != "-1") addr->m_address->m_postal_code.ref(new epp_string(testDataMap[12])); ! ! l_req->m_ascii_address = addr; ! ! if(testDataMap[13] != "-1" || testDataMap[14] != "-1") { ! l_req->m_voice.ref(new epp_ContactPhone()); ! if(testDataMap[13] != "-1") l_req->m_voice->m_value.ref(new epp_string(testDataMap[13])); ! if(testDataMap[14] != "-1") l_req->m_voice->m_extension.ref(new epp_string(testDataMap[14])); ! } ! ! if(testDataMap[15] != "-1") l_req->m_email.ref(new epp_string(testDataMap[15])); ! ! if(testDataMap[16] != "-1" || testDataMap[17] != "-1") { ! l_req->m_fax.ref(new epp_ContactPhone()); ! if(testDataMap[16] != "-1") l_req->m_fax->m_value.ref(new epp_string(testDataMap[16])); ! if(testDataMap[17] != "-1") l_req->m_fax->m_extension.ref(new epp_string(testDataMap[17])); ! } ! ! } epp_ContactCreate_ref l_obj(new epp_ContactCreate()); Index: main_contactdelete.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactdelete.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main_contactdelete.cc 15 Mar 2002 16:34:22 -0000 1.9 --- main_contactdelete.cc 16 Apr 2002 19:51:02 -0000 1.10 *************** *** 60,63 **** --- 60,75 ---- if(!handleArgs(test, argc, argv, username, password)) return 1; + + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } testLogIn(test, username, password); *************** *** 66,76 **** epp_ContactDeleteReq_ref l_req(new epp_ContactDeleteReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); ! l_req->m_id.ref(new epp_string("sh8013")); epp_ContactDelete_ref l_obj(new epp_ContactDelete()); --- 78,97 ---- epp_ContactDeleteReq_ref l_req(new epp_ContactDeleteReq()); + + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); ! if(testDataMap.empty()) { ! l_req->m_id.ref(new epp_string("sh8013")); ! } ! else { ! l_req->m_id.ref(new epp_string(testDataMap[2])); ! } epp_ContactDelete_ref l_obj(new epp_ContactDelete()); Index: main_contactinfo.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactinfo.cc,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** main_contactinfo.cc 15 Mar 2002 16:34:22 -0000 1.11 --- main_contactinfo.cc 16 Apr 2002 19:51:02 -0000 1.12 *************** *** 224,227 **** --- 224,239 ---- if(!handleArgs(test, argc, argv, username, password)) return 1; + + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } testLogIn(test, username, password); *************** *** 231,239 **** epp_ContactInfoReq_ref l_req(new epp_ContactInfoReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); ! l_req->m_id.ref(new epp_string("sh8013")); epp_ContactInfo_ref l_obj(new epp_ContactInfo()); --- 243,260 ---- epp_ContactInfoReq_ref l_req(new epp_ContactInfoReq()); + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; + l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); ! if(testDataMap.empty()) { ! l_req->m_id.ref(new epp_string("sh8013")); ! } ! else { ! l_req->m_id.ref(new epp_string(testDataMap[2])); ! } epp_ContactInfo_ref l_obj(new epp_ContactInfo()); Index: main_contactupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactupdate.cc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main_contactupdate.cc 15 Mar 2002 16:34:22 -0000 1.10 --- main_contactupdate.cc 16 Apr 2002 19:51:03 -0000 1.11 *************** *** 33,36 **** --- 33,37 ---- #include "data/epp_XMLException.h" #include "data/epp_Exception.h" + #include "data/epp_contactXMLbase.h" #include "epp_Action.h" #include "epp_ContactUpdate.h" *************** *** 62,65 **** --- 63,78 ---- return 1; + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } + testLogIn(test, username, password); *************** *** 67,105 **** epp_ContactUpdateReq_ref l_req(new epp_ContactUpdateReq()); l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid("ABC-12345"))); ! ! epp_ContactNameAddress_ref addr(new epp_ContactNameAddress()); ! ! addr->m_org.ref(new epp_string("")); ! addr->m_address.ref(new epp_ContactAddress()); ! addr->m_address->m_street1.ref(new epp_string("124 Example Dr.")); ! addr->m_address->m_street2.ref(new epp_string("Suite 200")); ! addr->m_address->m_city.ref(new epp_string("Dulles")); ! addr->m_address->m_state_province.ref(new epp_string("VA")); ! addr->m_address->m_postal_code.ref(new epp_string("20166-6503")); ! addr->m_address->m_country_code.ref(new epp_string("US")); ! ! epp_ContactUpdateChange_ref chg(new epp_ContactUpdateChange()); ! chg->m_ascii_address = addr; ! chg->m_voice.ref(new epp_ContactPhone()); ! chg->m_voice->m_value.ref(new epp_string("+1.7034444444")); ! ! chg->m_fax.ref(new epp_ContactPhone()); ! chg->m_fax->m_value.ref(new epp_string("")); ! chg->m_auth_info.ref(new epp_AuthInfo()); ! chg->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! chg->m_auth_info->m_value.ref(new epp_string("2BARfoo")); ! ! epp_ContactStatus status; ! status.m_type.ref(new epp_ContactStatusType(CLIENT_DELETE_PROHIBITED)); ! l_req->m_id.ref(new epp_string("sh8013")); ! l_req->m_change = chg; ! l_req->m_add.ref(new epp_ContactUpdateAddRemove()); ! l_req->m_add->m_status.ref(new epp_contact_status_seq()); ! l_req->m_add->m_status->push_back(status); epp_ContactUpdate_ref l_obj(new epp_ContactUpdate()); --- 80,223 ---- epp_ContactUpdateReq_ref l_req(new epp_ContactUpdateReq()); + + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(NULL, NULL, ! epp_trid(trID))); ! if(testDataMap.empty()) { ! epp_ContactNameAddress_ref addr(new epp_ContactNameAddress()); ! ! addr->m_org.ref(new epp_string("")); ! addr->m_address.ref(new epp_ContactAddress()); ! addr->m_address->m_street1.ref(new epp_string("124 Example Dr.")); ! addr->m_address->m_street2.ref(new epp_string("Suite 200")); ! addr->m_address->m_city.ref(new epp_string("Dulles")); ! addr->m_address->m_state_province.ref(new epp_string("VA")); ! addr->m_address->m_postal_code.ref(new epp_string("20166-6503")); ! addr->m_address->m_country_code.ref(new epp_string("US")); ! ! epp_ContactUpdateChange_ref chg(new epp_ContactUpdateChange()); ! chg->m_ascii_address = addr; ! chg->m_voice.ref(new epp_ContactPhone()); ! chg->m_voice->m_value.ref(new epp_string("+1.7034444444")); ! ! chg->m_fax.ref(new epp_ContactPhone()); ! chg->m_fax->m_value.ref(new epp_string("")); ! chg->m_auth_info.ref(new epp_AuthInfo()); ! chg->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! chg->m_auth_info->m_value.ref(new epp_string("2BARfoo")); ! ! epp_ContactStatus status; ! status.m_type.ref(new epp_ContactStatusType(CLIENT_DELETE_PROHIBITED)); ! ! l_req->m_id.ref(new epp_string("sh8013")); ! l_req->m_change = chg; ! l_req->m_add.ref(new epp_ContactUpdateAddRemove()); ! l_req->m_add->m_status.ref(new epp_contact_status_seq()); ! l_req->m_add->m_status->push_back(status); ! } ! else { ! if(testDataMap[2] != "-1") l_req->m_id.ref(new epp_string(testDataMap[2])); ! ! if(testDataMap[3] == "add") { ! l_req->m_add.ref(new epp_ContactUpdateAddRemove()); ! ! if(testDataMap[4] != "-1") { ! string statuses = testDataMap[4]; ! l_req->m_add->m_status.ref(new epp_contact_status_seq()); ! ! int begin = 0; ! int end = 0; ! ! while(end != string::npos) { ! end = statuses.find(' ', begin); ! string tmp = statuses.substr(begin,end-begin); ! ! epp_ContactStatus status; ! status.m_type.ref(new epp_ContactStatusType(returnStatusEnumType(tmp))); ! l_req->m_add->m_status->push_back(status); ! ! begin = end+1; ! } ! } ! } ! ! if(testDataMap[5] == "rem") { ! l_req->m_remove.ref(new epp_ContactUpdateAddRemove()); ! ! if(testDataMap[6] != "-1") { ! string statuses = testDataMap[6]; ! l_req->m_remove->m_status.ref(new epp_contact_status_seq()); ! ! int begin = 0; ! int end = 0; ! ! while(end != string::npos) { ! end = statuses.find(' ', begin); ! string tmp = statuses.substr(begin,end-begin); ! ! epp_ContactStatus status; ! status.m_type.ref(new epp_ContactStatusType(returnStatusEnumType(tmp))); ! l_req->m_remove->m_status->push_back(status); ! ! begin = end+1; ! } ! } ! } ! ! if(testDataMap[7] == "chg") { ! ! epp_ContactUpdateChange_ref chg(new epp_ContactUpdateChange()); ! ! if(testDataMap[8] != "-1") { ! chg->m_auth_info.ref(new epp_AuthInfo()); ! chg->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! chg->m_auth_info->m_value.ref(new epp_string(testDataMap[8])); ! } ! ! epp_ContactNameAddress_ref addr(new epp_ContactNameAddress()); ! addr->m_address.ref(new epp_ContactAddress()); ! ! if(testDataMap[9] != "-1") addr->m_name.ref(new epp_string(testDataMap[9])); ! ! if(testDataMap[10] != "-1") addr->m_org.ref(new epp_string(testDataMap[10])); ! ! if(testDataMap[11] != "-1") addr->m_address->m_street1.ref(new epp_string(testDataMap[11])); ! ! if(testDataMap[12] != "-1") addr->m_address->m_street2.ref(new epp_string(testDataMap[12])); ! ! if(testDataMap[13] != "-1") addr->m_address->m_street3.ref(new epp_string(testDataMap[13])); ! ! if(testDataMap[14] != "-1") addr->m_address->m_city.ref(new epp_string(testDataMap[14])); ! ! if(testDataMap[15] != "-1") addr->m_address->m_state_province.ref(new epp_string(testDataMap[15])); ! ! if(testDataMap[16] != "-1") addr->m_address->m_country_code.ref(new epp_string(testDataMap[16])); ! ! if(testDataMap[17] != "-1") addr->m_address->m_postal_code.ref(new epp_string(testDataMap[17])); ! ! if(testDataMap[18] != "-1" || testDataMap[19] != "-1") { ! chg->m_voice.ref(new epp_ContactPhone()); ! if(testDataMap[18] != "-1") chg->m_voice->m_value.ref(new epp_string(testDataMap[18])); ! if(testDataMap[19] != "-1") chg->m_voice->m_extension.ref(new epp_string(testDataMap[19])); ! } ! ! if(testDataMap[20] != "-1") chg->m_email.ref(new epp_string(testDataMap[20])); ! ! if(testDataMap[21] != "-1" || testDataMap[22] != "-1") { ! chg->m_fax.ref(new epp_ContactPhone()); ! if(testDataMap[21] != "-1") chg->m_fax->m_value.ref(new epp_string(testDataMap[21])); ! if(testDataMap[22] != "-1") chg->m_fax->m_extension.ref(new epp_string(testDataMap[22])); ! } ! ! chg->m_ascii_address = addr; ! l_req->m_change = chg; ! } ! ! } epp_ContactUpdate_ref l_obj(new epp_ContactUpdate()); |
From: Asbjorn M. <ste...@us...> - 2002-04-16 19:32:15
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv4683 Modified Files: main_logout.cc main_login.cc Log Message: Added -testdata option to provide data to test programs. Index: main_logout.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_logout.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** main_logout.cc 15 Mar 2002 16:34:22 -0000 1.6 --- main_logout.cc 16 Apr 2002 17:10:15 -0000 1.7 *************** *** 60,63 **** --- 60,75 ---- return 1; + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } + testLogIn(test, username, password); *************** *** 65,70 **** epp_LogoutReq_ref l_req(new epp_LogoutReq()); ! l_req->m_client_trid.ref(new epp_trid("ABC-12345")); epp_Logout_ref l_obj(new epp_Logout()); --- 77,86 ---- epp_LogoutReq_ref l_req(new epp_LogoutReq()); + + string trID; + if(testDataMap.empty()) trID = "ABC-12345"; + else trID = testDataMap[1]; ! l_req->m_client_trid.ref(new epp_trid(trID)); epp_Logout_ref l_obj(new epp_Logout()); Index: main_login.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_login.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main_login.cc 15 Mar 2002 14:53:47 -0000 1.9 --- main_login.cc 16 Apr 2002 17:10:15 -0000 1.10 *************** *** 73,76 **** --- 73,88 ---- if(!handleArgs(test, argc, argv, username, password)) return 1; + + map<int,string> testDataMap; + + if(argc > 1) { + for(int parm = 1; parm < argc; parm++) { + + if (!strncmp(argv[parm], "-testdata=", 10)) { + string td = &argv[parm][10]; + testDataMap = getTestDataMap(td); + } + } + } try { *************** *** 84,88 **** creds->m_client_id.ref(new epp_string(username)); creds->m_password.ref(new epp_string(password)); ! creds->m_new_password.ref(new epp_string("bar-FOO2")); creds->m_options = ops; --- 96,107 ---- creds->m_client_id.ref(new epp_string(username)); creds->m_password.ref(new epp_string(password)); ! if(testDataMap.empty()) { ! creds->m_new_password.ref(new epp_string("bar-FOO2")); ! } ! else { ! if(testDataMap[2] != "-1") { ! creds->m_new_password.ref(new epp_string(testDataMap[2])); ! } ! } creds->m_options = ops; *************** *** 90,94 **** epp_Command_ref cmd(new epp_Command()); cmd->m_creds = creds; ! cmd->m_client_trid.ref(new epp_trid("ABC-12345")); // Fill in services part of request --- 109,117 ---- epp_Command_ref cmd(new epp_Command()); cmd->m_creds = creds; ! ! string trID; ! if(testDataMap.empty()) trID = "ABC-12345"; ! else trID = testDataMap[1]; ! cmd->m_client_trid.ref(new epp_trid(trID)); // Fill in services part of request |
From: Asbjorn M. <ste...@us...> - 2002-04-16 15:57:15
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv10238 Modified Files: testTools.cc testTools.h Log Message: Added function getTestDataMap, which converts a "testdata string" to a map of test data elements. This will be used in the test programs so they can take object data from the command line when it operates on objects. This makes the test programs much more useful since you can operate on new objects without recompiling. Index: testTools.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/testTools.cc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** testTools.cc 22 Mar 2002 11:33:08 -0000 1.13 --- testTools.cc 16 Apr 2002 15:57:11 -0000 1.14 *************** *** 1,28 **** /************************************************************************ ! * EPP RTK C++ ! * Copyright (C) 2001, 2002 The Global Name Registry, Limited ! * ! * This library is free software; you can redistribute it and/or modify it ! * under the terms of the GNU Lesser General Public License as published ! * by the Free Software Foundation; either version 2.1 of the License, or ! * (at your option) any later version. ! * ! * This library is distributed in the hope that it will be useful, but ! * WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this library; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! * Contact information: ep...@gn... ! * ! * EPP RTK ! * The Global Name Registry, Limited ! * 125 High Holborn ! * London WC1V 6QA ! * United Kingdom ! ************************************************************************/ --- 1,28 ---- /************************************************************************ ! * EPP RTK C++ ! * Copyright (C) 2001, 2002 The Global Name Registry, Limited ! * ! * This library is free software; you can redistribute it and/or modify it ! * under the terms of the GNU Lesser General Public License as published ! * by the Free Software Foundation; either version 2.1 of the License, or ! * (at your option) any later version. ! * ! * This library is distributed in the hope that it will be useful, but ! * WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this library; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! * Contact information: ep...@gn... ! * ! * EPP RTK ! * The Global Name Registry, Limited ! * 125 High Holborn ! * London WC1V 6QA ! * United Kingdom ! ************************************************************************/ *************** *** 428,429 **** --- 428,458 ---- cerr << "</resData>" << endl; } // printResDataFooter + + + map<int,string> getTestDataMap(const string & testdata) + { + map<int,string> dataMap; + + if(testdata.length() > 0) { + + if(testdata.at(0) != '\"') { + cout << "Error: Invalid data..." << endl; + return dataMap; + } + + int begin = 1; + int end = 1; + unsigned int argc = 1; + while((end = testdata.find('\"', begin)) != string::npos) { + + string tmp = testdata.substr(begin,end-begin); + if(tmp != " ") { + dataMap[argc] = tmp; + argc++; + } + begin = end+1; + } // while + } // if "testdata" + return dataMap; + + } // getTestDataMap Index: testTools.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/testTools.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** testTools.h 15 Mar 2002 14:53:48 -0000 1.10 --- testTools.h 16 Apr 2002 15:57:11 -0000 1.11 *************** *** 1,28 **** /************************************************************************ ! * EPP RTK C++ ! * Copyright (C) 2001, 2002 The Global Name Registry, Limited ! * ! * This library is free software; you can redistribute it and/or modify it ! * under the terms of the GNU Lesser General Public License as published ! * by the Free Software Foundation; either version 2.1 of the License, or ! * (at your option) any later version. ! * ! * This library is distributed in the hope that it will be useful, but ! * WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this library; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! * Contact information: ep...@gn... ! * ! * EPP RTK ! * The Global Name Registry, Limited ! * 125 High Holborn ! * London WC1V 6QA ! * United Kingdom ! ************************************************************************/ #ifndef __EPP_TESTTOOLS_H --- 1,28 ---- /************************************************************************ ! * EPP RTK C++ ! * Copyright (C) 2001, 2002 The Global Name Registry, Limited ! * ! * This library is free software; you can redistribute it and/or modify it ! * under the terms of the GNU Lesser General Public License as published ! * by the Free Software Foundation; either version 2.1 of the License, or ! * (at your option) any later version. ! * ! * This library is distributed in the hope that it will be useful, but ! * WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this library; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! * Contact information: ep...@gn... ! * ! * EPP RTK ! * The Global Name Registry, Limited ! * 125 High Holborn ! * London WC1V 6QA ! * United Kingdom ! ************************************************************************/ #ifndef __EPP_TESTTOOLS_H *************** *** 36,39 **** --- 36,40 ---- #include <string> + #include <map> #include <iostream.h> *************** *** 90,94 **** /** Function that handles the command line arguments sent to the program ! * and initializes the transport accordingly * @param sess Session to use when communicating with server * @param argc Count of command line arguments --- 91,95 ---- /** Function that handles the command line arguments sent to the program ! * and initializes the transport accordingly * @param sess Session to use when communicating with server * @param argc Count of command line arguments *************** *** 103,107 **** /** Function that tries to login to a server using information in the ! * eppobject::epp::epp_Session object. * @param mySession Session data to use when communication with server * @param username Login name on server --- 104,108 ---- /** Function that tries to login to a server using information in the ! * eppobject::epp::epp_Session object * @param mySession Session data to use when communication with server * @param username Login name on server *************** *** 112,115 **** --- 113,122 ---- const string & password); + /** Function that takes a testdata string and puts each quoted element + * into a map + * @param testdata String with test data + * @return Map of testdata elements + */ + map<int,string> getTestDataMap(const string & testdata); #endif |
From: Asbjorn M. <ste...@us...> - 2002-03-22 11:33:11
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv24009 Modified Files: testTools.cc Log Message: Changed default transport here back to SSL. Index: testTools.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/testTools.cc,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** testTools.cc 15 Mar 2002 16:34:23 -0000 1.12 --- testTools.cc 22 Mar 2002 11:33:08 -0000 1.13 *************** *** 206,210 **** { // CHANGE TRANSPORT HERE: ! typedef epp_TransportTCP myTransport; // The transport handling in this function is a bit more --- 206,210 ---- { // CHANGE TRANSPORT HERE: ! typedef epp_TransportSSL myTransport; // The transport handling in this function is a bit more |
From: Asbjorn M. <ste...@us...> - 2002-03-19 17:51:52
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv19218 Modified Files: epp_ContactCheck.h epp_ContactCreate.h epp_ContactDelete.h epp_ContactInfo.h epp_ContactTransfer.h epp_ContactUpdate.h epp_DomainCheck.h epp_DomainCreate.h epp_DomainDelete.h epp_DomainRenew.h epp_DomainTransfer.h epp_DomainUpdate.h epp_HostCheck.h epp_HostUpdate.h Log Message: Some of the destructors were not virtual, fixed... Index: epp_ContactCheck.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactCheck.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** epp_ContactCheck.h 15 Mar 2002 13:20:13 -0000 1.5 --- epp_ContactCheck.h 19 Mar 2002 17:51:48 -0000 1.6 *************** *** 53,57 **** /// Destructor ! ~epp_ContactCheck() {}; /** Function setting the object's request element --- 53,57 ---- /// Destructor ! virtual ~epp_ContactCheck() {}; /** Function setting the object's request element Index: epp_ContactCreate.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactCreate.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** epp_ContactCreate.h 15 Mar 2002 13:20:13 -0000 1.5 --- epp_ContactCreate.h 19 Mar 2002 17:51:48 -0000 1.6 *************** *** 53,57 **** /// Destructor ! ~epp_ContactCreate() {}; /** Function setting the object's request element --- 53,57 ---- /// Destructor ! virtual ~epp_ContactCreate() {}; /** Function setting the object's request element Index: epp_ContactDelete.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactDelete.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** epp_ContactDelete.h 15 Mar 2002 13:20:13 -0000 1.5 --- epp_ContactDelete.h 19 Mar 2002 17:51:48 -0000 1.6 *************** *** 53,57 **** /// Destructor ! ~epp_ContactDelete() {}; /** Function setting the object's request element --- 53,57 ---- /// Destructor ! virtual ~epp_ContactDelete() {}; /** Function setting the object's request element Index: epp_ContactInfo.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactInfo.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** epp_ContactInfo.h 15 Mar 2002 13:20:13 -0000 1.5 --- epp_ContactInfo.h 19 Mar 2002 17:51:48 -0000 1.6 *************** *** 54,58 **** /// Destructor ! ~epp_ContactInfo() {}; /** Function setting the object's request element --- 54,58 ---- /// Destructor ! virtual ~epp_ContactInfo() {}; /** Function setting the object's request element Index: epp_ContactTransfer.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactTransfer.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** epp_ContactTransfer.h 15 Mar 2002 13:20:13 -0000 1.5 --- epp_ContactTransfer.h 19 Mar 2002 17:51:48 -0000 1.6 *************** *** 54,58 **** /// Destructor ! ~epp_ContactTransfer() {}; /** Function setting the object's request element --- 54,58 ---- /// Destructor ! virtual ~epp_ContactTransfer() {}; /** Function setting the object's request element Index: epp_ContactUpdate.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactUpdate.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** epp_ContactUpdate.h 15 Mar 2002 13:20:13 -0000 1.6 --- epp_ContactUpdate.h 19 Mar 2002 17:51:48 -0000 1.7 *************** *** 70,74 **** /// Destructor ! ~epp_ContactUpdate() {}; /** Function setting the object's request element --- 70,74 ---- /// Destructor ! virtual ~epp_ContactUpdate() {}; /** Function setting the object's request element Index: epp_DomainCheck.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_DomainCheck.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** epp_DomainCheck.h 15 Mar 2002 13:20:13 -0000 1.5 --- epp_DomainCheck.h 19 Mar 2002 17:51:48 -0000 1.6 *************** *** 54,58 **** /// Destructor ! ~epp_DomainCheck() {}; /** Function setting the object's request element --- 54,58 ---- /// Destructor ! virtual ~epp_DomainCheck() {}; /** Function setting the object's request element Index: epp_DomainCreate.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_DomainCreate.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** epp_DomainCreate.h 15 Mar 2002 13:20:13 -0000 1.5 --- epp_DomainCreate.h 19 Mar 2002 17:51:48 -0000 1.6 *************** *** 45,49 **** private: ! epp_DomainCreateReq_ref m_request; /**< Request to send to the server */ epp_DomainCreateRsp_ref m_response; /**< Response received from server */ --- 45,49 ---- private: ! epp_DomainCreateReq_ref m_request; /**< Request to send to the server */ epp_DomainCreateRsp_ref m_response; /**< Response received from server */ *************** *** 54,58 **** /// Destructor ! ~epp_DomainCreate() {}; /** Function setting the object's request element --- 54,58 ---- /// Destructor ! virtual ~epp_DomainCreate() {}; /** Function setting the object's request element Index: epp_DomainDelete.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_DomainDelete.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** epp_DomainDelete.h 15 Mar 2002 13:20:13 -0000 1.5 --- epp_DomainDelete.h 19 Mar 2002 17:51:48 -0000 1.6 *************** *** 61,66 **** /** Function returning the object's response element ! * @return Response element of object ! */ epp_DomainDeleteRsp_ref getResponseData(); --- 61,66 ---- /** Function returning the object's response element ! * @return Response element of object ! */ epp_DomainDeleteRsp_ref getResponseData(); *************** *** 81,85 **** }; ! /// Typedef for the ref to the epp_DomainCreate class typedef refcnt_ptr<epp_DomainDelete> epp_DomainDelete_ref; --- 81,85 ---- }; ! /// Typedef for the ref to the epp_DomainDelete class typedef refcnt_ptr<epp_DomainDelete> epp_DomainDelete_ref; Index: epp_DomainRenew.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_DomainRenew.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** epp_DomainRenew.h 15 Mar 2002 13:20:13 -0000 1.5 --- epp_DomainRenew.h 19 Mar 2002 17:51:48 -0000 1.6 *************** *** 53,57 **** /// Destructor ! ~epp_DomainRenew() {}; /** Function setting the object's request element --- 53,57 ---- /// Destructor ! virtual ~epp_DomainRenew() {}; /** Function setting the object's request element Index: epp_DomainTransfer.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_DomainTransfer.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** epp_DomainTransfer.h 15 Mar 2002 13:20:13 -0000 1.5 --- epp_DomainTransfer.h 19 Mar 2002 17:51:48 -0000 1.6 *************** *** 53,57 **** /// Destructor ! ~epp_DomainTransfer() {}; /** Function setting the object's request element --- 53,57 ---- /// Destructor ! virtual ~epp_DomainTransfer() {}; /** Function setting the object's request element Index: epp_DomainUpdate.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_DomainUpdate.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** epp_DomainUpdate.h 15 Mar 2002 13:20:13 -0000 1.6 --- epp_DomainUpdate.h 19 Mar 2002 17:51:48 -0000 1.7 *************** *** 70,74 **** /// Destructor ! ~epp_DomainUpdate() {}; /** Function setting the object's request element --- 70,74 ---- /// Destructor ! virtual ~epp_DomainUpdate() {}; /** Function setting the object's request element Index: epp_HostCheck.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_HostCheck.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** epp_HostCheck.h 15 Mar 2002 13:20:13 -0000 1.5 --- epp_HostCheck.h 19 Mar 2002 17:51:48 -0000 1.6 *************** *** 53,57 **** /// Destructor ! ~epp_HostCheck() {}; /** Function setting the object's request element --- 53,57 ---- /// Destructor ! virtual ~epp_HostCheck() {}; /** Function setting the object's request element Index: epp_HostUpdate.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_HostUpdate.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** epp_HostUpdate.h 15 Mar 2002 13:20:13 -0000 1.7 --- epp_HostUpdate.h 19 Mar 2002 17:51:48 -0000 1.8 *************** *** 70,74 **** /// Destructor ! ~epp_HostUpdate() {}; /** Function setting the object's request element --- 70,74 ---- /// Destructor ! virtual ~epp_HostUpdate() {}; /** Function setting the object's request element |
From: Asbjorn M. <ste...@us...> - 2002-03-19 15:12:05
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv805 Modified Files: main_loginunspec.cc Log Message: Now checks for transport exceptions. Index: main_loginunspec.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_loginunspec.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** main_loginunspec.cc 8 Mar 2002 12:11:51 -0000 1.6 --- main_loginunspec.cc 19 Mar 2002 15:12:01 -0000 1.7 *************** *** 139,142 **** --- 139,145 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; |
From: Asbjorn M. <ste...@us...> - 2002-03-19 10:47:46
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv1723 Modified Files: main_hello.cc Log Message: There can only be one retention element in the statement element, and this has changed in the the IDL-files. Index: main_hello.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hello.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_hello.cc 15 Mar 2002 14:53:47 -0000 1.8 --- main_hello.cc 19 Mar 2002 10:47:43 -0000 1.9 *************** *** 167,188 **** } // if "m_recipients" ! if(j->m_retentions != NULL) { cerr << "<retention>"; - for(epp_dcpRetention_seq::iterator i = j->m_retentions->begin(); - i != j->m_retentions->end(); i++) { - - string retention; - switch(*i) { - case BUSINESS: retention = "business"; break; - case FUNCTIONAL: retention = "functional"; break; - case INDEFINITE: retention = "indefinite"; break; - case LEGAL: retention = "legal"; break; - case NONE: retention = "none"; break; - default: retention = "**UNKNOWN**"; - } ! cerr << "<" << retention << "/>"; ! } // for cerr << "</retention>" << endl; } // if "retentions" --- 167,185 ---- } // if "m_recipients" ! if(j->m_retention != NULL) { cerr << "<retention>"; ! string retention; ! switch(*j->m_retention) { ! case BUSINESS: retention = "business"; break; ! case FUNCTIONAL: retention = "functional"; break; ! case INDEFINITE: retention = "indefinite"; break; ! case LEGAL: retention = "legal"; break; ! case NONE: retention = "none"; break; ! default: retention = "**UNKNOWN**"; ! } ! ! cerr << "<" << retention << "/>"; cerr << "</retention>" << endl; } // if "retentions" |
From: Asbjorn M. <ste...@us...> - 2002-03-19 10:47:46
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src/data In directory usw-pr-cvs1:/tmp/cvs-serv1723/data Modified Files: epp_dcpStatement.h epp_eppXMLbase.cc epp_eppdata.h Log Message: There can only be one retention element in the statement element, and this has changed in the the IDL-files. Index: epp_dcpStatement.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_dcpStatement.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** epp_dcpStatement.h 14 Mar 2002 16:45:17 -0000 1.3 --- epp_dcpStatement.h 19 Mar 2002 10:47:43 -0000 1.4 *************** *** 45,50 **** epp_dcpPurpose_seq_ref m_purposes; /**< Data collection purpose */ epp_dcpRecipient_seq_ref m_recipients; /**< Data recipient */ ! epp_dcpRetention_seq_ref m_retentions; /**< Data retention */ ! /// Null constructor --- 45,49 ---- epp_dcpPurpose_seq_ref m_purposes; /**< Data collection purpose */ epp_dcpRecipient_seq_ref m_recipients; /**< Data recipient */ ! epp_dcpRetentionType_ref m_retention; /**< Data retention */ /// Null constructor *************** *** 57,65 **** epp_dcpStatement(epp_dcpPurpose_seq_ref _m_purposes, epp_dcpRecipient_seq_ref _m_recipients, ! epp_dcpRetention_seq_ref _m_retentions) { m_purposes = _m_purposes; m_recipients = _m_recipients; ! m_retentions = _m_retentions; }; }; --- 56,64 ---- epp_dcpStatement(epp_dcpPurpose_seq_ref _m_purposes, epp_dcpRecipient_seq_ref _m_recipients, ! epp_dcpRetentionType_ref _m_retention) { m_purposes = _m_purposes; m_recipients = _m_recipients; ! m_retention = _m_retention; }; }; Index: epp_eppXMLbase.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_eppXMLbase.cc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** epp_eppXMLbase.cc 8 Mar 2002 11:41:27 -0000 1.13 --- epp_eppXMLbase.cc 19 Mar 2002 10:47:43 -0000 1.14 *************** *** 672,693 **** else if(statementName == "retention") { ! if(dcpS.m_retentions == NULL) { ! dcpS.m_retentions.ref(new epp_dcpRetention_seq); ! } ! dom_ptr retentionNode = dom_ptr(statementNode->getFirstChildElement()); ! while(!retentionNode->isNull()) { string retention = retentionNode->getNodeName(); ! if(retention == "business") dcpS.m_retentions->push_back(BUSINESS); ! else if(retention =="functional") dcpS.m_retentions->push_back(FUNCTIONAL); ! else if(retention =="indefinite") dcpS.m_retentions->push_back(INDEFINITE); ! else if(retention =="legal") dcpS.m_retentions->push_back(LEGAL); ! else if(retention =="none") dcpS.m_retentions->push_back(NONE); else throw epp_XMLException(__FILE__, __LINE__, "Unknown retention-type in greeting"); ! retentionNode = dom_ptr(retentionNode->getNextSiblingElement()); ! } // while "retentionNode" } // if "retention" --- 672,690 ---- else if(statementName == "retention") { ! dom_ptr retentionNode = dom_ptr(statementNode->getFirstChildElement()); ! if(!retentionNode->isNull()) { ! string retention = retentionNode->getNodeName(); ! if(retention == "business") dcpS.m_retention.ref(new epp_dcpRetentionType(BUSINESS)); ! else if(retention == "functional") dcpS.m_retention.ref(new epp_dcpRetentionType(FUNCTIONAL)); ! else if(retention == "indefinite") dcpS.m_retention.ref(new epp_dcpRetentionType(INDEFINITE)); ! else if(retention == "legal") dcpS.m_retention.ref(new epp_dcpRetentionType(LEGAL)); ! else if(retention == "none") dcpS.m_retention.ref(new epp_dcpRetentionType(NONE)); else throw epp_XMLException(__FILE__, __LINE__, "Unknown retention-type in greeting"); ! } // if "retentionNode" } // if "retention" Index: epp_eppdata.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_eppdata.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** epp_eppdata.h 14 Mar 2002 16:45:17 -0000 1.8 --- epp_eppdata.h 19 Mar 2002 10:47:43 -0000 1.9 *************** *** 179,189 **** /// Typedef for the ref to the #epp_dcpRecipient_seq element typedef refcnt_ptr<epp_dcpRecipient_seq> epp_dcpRecipient_seq_ref; ! ! /// Typedef for a sequence of #epp_dcpRetentionType elements ! typedef vector<epp_dcpRetentionType> epp_dcpRetention_seq; ! ! /// Typedef for the ref to the #epp_dcpRetention_seq element ! typedef refcnt_ptr<epp_dcpRetention_seq> epp_dcpRetention_seq_ref; ! /****************************************** --- 179,183 ---- /// Typedef for the ref to the #epp_dcpRecipient_seq element typedef refcnt_ptr<epp_dcpRecipient_seq> epp_dcpRecipient_seq_ref; ! /****************************************** |
From: Asbjorn M. <ste...@us...> - 2002-03-19 09:32:45
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src/transport In directory usw-pr-cvs1:/tmp/cvs-serv15713 Modified Files: epp_TransportConn.h Log Message: Changed default server name to "127.0.0.1" Index: epp_TransportConn.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/transport/epp_TransportConn.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** epp_TransportConn.h 14 Mar 2002 18:37:50 -0000 1.6 --- epp_TransportConn.h 19 Mar 2002 09:32:40 -0000 1.7 *************** *** 54,58 **** { m_type = "epp_TransportConn"; ! m_serverName = "epp.nic.name"; m_serverPort = 3121; }; --- 54,58 ---- { m_type = "epp_TransportConn"; ! m_serverName = "127.0.0.1"; m_serverPort = 3121; }; |
From: Asbjorn M. <ste...@us...> - 2002-03-18 16:30:51
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src/data In directory usw-pr-cvs1:/tmp/cvs-serv28997 Modified Files: epp_DomainInfoRsp.h epp_DomainRenewRsp.h epp_DomainTrnData.h epp_DomainUpdateAddRemove.h Log Message: Minor JavaDocs-changes... Index: epp_DomainInfoRsp.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_DomainInfoRsp.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** epp_DomainInfoRsp.h 12 Mar 2002 20:38:32 -0000 1.9 --- epp_DomainInfoRsp.h 18 Mar 2002 16:30:43 -0000 1.10 *************** *** 50,55 **** eppobject::epp::epp_roid_ref m_roid; /**< Repository Object IDentifier assigned to the domain */ epp_domain_status_seq_ref m_status; /**< Status of the domain object */ ! eppobject::epp::epp_string_ref m_registrant; /**< ID for the contact object associated with the ! * domain object as the object registrant */ epp_domain_contact_seq_ref m_contacts; /**< IDs for other contact objects associated with the domain object */ eppobject::epp::epp_string_seq_ref m_name_servers; /**< Fully qualified names of the delegated host objects --- 50,55 ---- eppobject::epp::epp_roid_ref m_roid; /**< Repository Object IDentifier assigned to the domain */ epp_domain_status_seq_ref m_status; /**< Status of the domain object */ ! eppobject::epp::epp_string_ref m_registrant; /**< ID for the contact object associated with the ! * domain object as the object registrant */ epp_domain_contact_seq_ref m_contacts; /**< IDs for other contact objects associated with the domain object */ eppobject::epp::epp_string_seq_ref m_name_servers; /**< Fully qualified names of the delegated host objects Index: epp_DomainRenewRsp.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_DomainRenewRsp.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** epp_DomainRenewRsp.h 12 Mar 2002 20:38:32 -0000 1.9 --- epp_DomainRenewRsp.h 18 Mar 2002 16:30:43 -0000 1.10 *************** *** 44,48 **** public: ! eppobject::epp::epp_string_ref m_name; /**< Fully qualified name of the created domain object */ eppobject::epp::epp_datetime_ref m_expiration_date; /**< Date and time identifying the end of the * domain object's registration period */ --- 44,48 ---- public: ! eppobject::epp::epp_string_ref m_name; /**< Fully qualified name of the renewed domain object */ eppobject::epp::epp_datetime_ref m_expiration_date; /**< Date and time identifying the end of the * domain object's registration period */ Index: epp_DomainTrnData.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_DomainTrnData.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** epp_DomainTrnData.h 12 Mar 2002 20:38:33 -0000 1.2 --- epp_DomainTrnData.h 18 Mar 2002 16:30:43 -0000 1.3 *************** *** 47,51 **** eppobject::epp::epp_TransferStatusType_ref m_transfer_status; /**< State of the most recent transfer request */ eppobject::epp::epp_string_ref m_request_client_id; /**< ID of the client that requested the object transfer */ ! eppobject::epp::epp_string_ref m_action_client_id; /**< ID of the client that should act upon the transfer request */ eppobject::epp::epp_datetime_ref m_request_date; /**< Date and time that the transfer was requested */ eppobject::epp::epp_datetime_ref m_action_date; /**< Date and time of a required or completed response */ --- 47,51 ---- eppobject::epp::epp_TransferStatusType_ref m_transfer_status; /**< State of the most recent transfer request */ eppobject::epp::epp_string_ref m_request_client_id; /**< ID of the client that requested the object transfer */ ! eppobject::epp::epp_string_ref m_action_client_id; /**< ID of the client that should act upon the transfer request */ eppobject::epp::epp_datetime_ref m_request_date; /**< Date and time that the transfer was requested */ eppobject::epp::epp_datetime_ref m_action_date; /**< Date and time of a required or completed response */ Index: epp_DomainUpdateAddRemove.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_DomainUpdateAddRemove.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** epp_DomainUpdateAddRemove.h 14 Mar 2002 16:45:16 -0000 1.8 --- epp_DomainUpdateAddRemove.h 18 Mar 2002 16:30:43 -0000 1.9 *************** *** 46,51 **** eppobject::epp::epp_string_seq_ref m_name_servers; /**< Fully qualified names of known host objects to * provide resolution services for the domain */ ! epp_domain_contact_seq_ref m_contacts;/**< IDs for other contact objects (to be) associated with the ! * domain object */ epp_domain_status_seq_ref m_status; /**< Status of the domain object */ --- 46,51 ---- eppobject::epp::epp_string_seq_ref m_name_servers; /**< Fully qualified names of known host objects to * provide resolution services for the domain */ ! epp_domain_contact_seq_ref m_contacts; /**< IDs for other contact objects (to be) associated with the ! * domain object */ epp_domain_status_seq_ref m_status; /**< Status of the domain object */ |
From: Asbjorn M. <ste...@us...> - 2002-03-18 11:10:43
|
Update of /cvsroot/epp-rtk/epp-rtk/c++ In directory usw-pr-cvs1:/tmp/cvs-serv12056 Modified Files: configure.in Log Message: Now checking for domtools during configure... Index: configure.in =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/configure.in,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** configure.in 12 Mar 2002 14:21:04 -0000 1.6 --- configure.in 18 Mar 2002 11:08:56 -0000 1.7 *************** *** 20,24 **** --- 20,28 ---- dnl Checks for header files. AC_HEADER_DIRENT + #If the following line does not work, try AC_LANG(C) instead + AC_LANG_C AC_HEADER_STDC + #If the following line does not work, try AC_LANG(C++) instead + AC_LANG_CPLUSPLUS CPPFLAGS="-I/usr/include -I/usr/local/include/ -I/usr/local/xerces" CXXFLAGS="--ansi -Wall -g -O2" *************** *** 26,30 **** AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h openssl/x509.h,, AC_MSG_ERROR("Missing header - probably missing openssl")) AC_CHECK_HEADERS(parsers/DOMParser.hpp util/PlatformUtils.hpp,, AC_MSG_ERROR("Missing header - probably missing Xerces")) ! #AC_CHECK_HEADERS(domtools/domtools.h,, AC_MSG_ERROR("Missing header - probably missing domtools")) #Only here for deprecated functions: AC_CHECK_HEADERS(dom/DOM.hpp,, AC_MSG_ERROR("Missing header - probably missing Xerces")) --- 30,34 ---- AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h openssl/x509.h,, AC_MSG_ERROR("Missing header - probably missing openssl")) AC_CHECK_HEADERS(parsers/DOMParser.hpp util/PlatformUtils.hpp,, AC_MSG_ERROR("Missing header - probably missing Xerces")) ! AC_CHECK_HEADERS(domtools/domtools.h,, AC_MSG_ERROR("Missing header - probably missing domtools")) #Only here for deprecated functions: AC_CHECK_HEADERS(dom/DOM.hpp,, AC_MSG_ERROR("Missing header - probably missing Xerces")) |
From: Asbjorn M. <ste...@us...> - 2002-03-15 17:03:07
|
Update of /cvsroot/epp-rtk/epp-rtk/c++ In directory usw-pr-cvs1:/tmp/cvs-serv18753/c++ Modified Files: README Log Message: Added comment about the -? option in test programs. Index: README =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/README,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** README 15 Mar 2002 14:53:47 -0000 1.6 --- README 15 Mar 2002 17:03:03 -0000 1.7 *************** *** 14,18 **** ¤ domtools (Available from http://sourceforge.net/projects/epp-rtk/) ! * openssl (Available from http://www.openssl.org/) ¤ Xerces-C (Available from http://xml.apache.org/xerces-c/) --- 14,18 ---- ¤ domtools (Available from http://sourceforge.net/projects/epp-rtk/) ! ¤ openssl (Available from http://www.openssl.org/) ¤ Xerces-C (Available from http://xml.apache.org/xerces-c/) *************** *** 39,43 **** In the files main_hello.cc, main_login.cc, and testTools.cc, you find ! detailed comments in the code describing how to use the toolkit. --- 39,46 ---- In the files main_hello.cc, main_login.cc, and testTools.cc, you find ! detailed comments in the code describing usage of the toolkit. ! ! For information about command line parameters (like server name/port) ! for the test programs, please run e.g., "./hello -?" after compile. |
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv7367/src Modified Files: main_contactcheck.cc main_contactcreate.cc main_contactdelete.cc main_contactinfo.cc main_contacttransfer.cc main_contactupdate.cc main_domaincheck.cc main_domaincreate.cc main_domaindelete.cc main_domaininfo.cc main_domainrenew.cc main_domaintransfer.cc main_domainupdate.cc main_hostcheck.cc main_hostcreate.cc main_hostdelete.cc main_hostinfo.cc main_hostupdate.cc main_logout.cc main_poll.cc main_status.cc testTools.cc Log Message: Test programs now catching transport exceptions... Index: main_contactcheck.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactcheck.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_contactcheck.cc 8 Mar 2002 12:11:51 -0000 1.8 --- main_contactcheck.cc 15 Mar 2002 16:34:22 -0000 1.9 *************** *** 139,142 **** --- 139,145 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_contactcreate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactcreate.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main_contactcreate.cc 8 Mar 2002 12:11:51 -0000 1.9 --- main_contactcreate.cc 15 Mar 2002 16:34:22 -0000 1.10 *************** *** 137,140 **** --- 137,143 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_contactdelete.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactdelete.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_contactdelete.cc 8 Mar 2002 12:11:51 -0000 1.8 --- main_contactdelete.cc 15 Mar 2002 16:34:22 -0000 1.9 *************** *** 100,103 **** --- 100,106 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_contactinfo.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactinfo.cc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main_contactinfo.cc 8 Mar 2002 12:11:51 -0000 1.10 --- main_contactinfo.cc 15 Mar 2002 16:34:22 -0000 1.11 *************** *** 263,266 **** --- 263,269 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_contacttransfer.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contacttransfer.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_contacttransfer.cc 8 Mar 2002 12:11:51 -0000 1.8 --- main_contacttransfer.cc 15 Mar 2002 16:34:22 -0000 1.9 *************** *** 152,155 **** --- 152,158 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_contactupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactupdate.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main_contactupdate.cc 8 Mar 2002 12:11:51 -0000 1.9 --- main_contactupdate.cc 15 Mar 2002 16:34:22 -0000 1.10 *************** *** 130,133 **** --- 130,136 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_domaincheck.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domaincheck.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** main_domaincheck.cc 8 Mar 2002 12:11:51 -0000 1.7 --- main_domaincheck.cc 15 Mar 2002 16:34:22 -0000 1.8 *************** *** 136,139 **** --- 136,142 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_domaincreate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domaincreate.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_domaincreate.cc 8 Mar 2002 12:11:51 -0000 1.8 --- main_domaincreate.cc 15 Mar 2002 16:34:22 -0000 1.9 *************** *** 131,134 **** --- 131,137 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_domaindelete.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domaindelete.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** main_domaindelete.cc 8 Mar 2002 12:11:51 -0000 1.7 --- main_domaindelete.cc 15 Mar 2002 16:34:22 -0000 1.8 *************** *** 99,102 **** --- 99,105 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_domaininfo.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domaininfo.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main_domaininfo.cc 8 Mar 2002 12:11:51 -0000 1.9 --- main_domaininfo.cc 15 Mar 2002 16:34:22 -0000 1.10 *************** *** 224,227 **** --- 224,230 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_domainrenew.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domainrenew.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_domainrenew.cc 8 Mar 2002 12:11:51 -0000 1.8 --- main_domainrenew.cc 15 Mar 2002 16:34:22 -0000 1.9 *************** *** 113,116 **** --- 113,119 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_domaintransfer.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domaintransfer.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_domaintransfer.cc 8 Mar 2002 12:11:51 -0000 1.8 --- main_domaintransfer.cc 15 Mar 2002 16:34:22 -0000 1.9 *************** *** 160,163 **** --- 160,166 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_domainupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domainupdate.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_domainupdate.cc 8 Mar 2002 12:11:51 -0000 1.8 --- main_domainupdate.cc 15 Mar 2002 16:34:22 -0000 1.9 *************** *** 133,136 **** --- 133,139 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_hostcheck.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostcheck.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** main_hostcheck.cc 8 Mar 2002 12:11:51 -0000 1.7 --- main_hostcheck.cc 15 Mar 2002 16:34:22 -0000 1.8 *************** *** 137,140 **** --- 137,143 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_hostcreate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostcreate.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_hostcreate.cc 8 Mar 2002 12:11:51 -0000 1.8 --- main_hostcreate.cc 15 Mar 2002 16:34:22 -0000 1.9 *************** *** 128,131 **** --- 128,134 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_hostdelete.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostdelete.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** main_hostdelete.cc 8 Mar 2002 12:11:51 -0000 1.7 --- main_hostdelete.cc 15 Mar 2002 16:34:22 -0000 1.8 *************** *** 100,103 **** --- 100,106 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_hostinfo.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostinfo.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_hostinfo.cc 8 Mar 2002 12:11:51 -0000 1.8 --- main_hostinfo.cc 15 Mar 2002 16:34:22 -0000 1.9 *************** *** 171,174 **** --- 171,177 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_hostupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostupdate.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_hostupdate.cc 8 Mar 2002 12:11:51 -0000 1.8 --- main_hostupdate.cc 15 Mar 2002 16:34:22 -0000 1.9 *************** *** 130,133 **** --- 130,136 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_logout.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_logout.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** main_logout.cc 8 Mar 2002 12:11:51 -0000 1.5 --- main_logout.cc 15 Mar 2002 16:34:22 -0000 1.6 *************** *** 94,97 **** --- 94,100 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_poll.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_poll.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_poll.cc 9 Mar 2002 11:58:01 -0000 1.8 --- main_poll.cc 15 Mar 2002 16:34:22 -0000 1.9 *************** *** 190,193 **** --- 190,196 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: main_status.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_status.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main_status.cc 8 Mar 2002 11:45:35 -0000 1.1 --- main_status.cc 15 Mar 2002 16:34:23 -0000 1.2 *************** *** 100,103 **** --- 100,106 ---- #endif } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + } catch(...) { cout << "Something else went wrong...\n"; Index: testTools.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/testTools.cc,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** testTools.cc 15 Mar 2002 14:53:47 -0000 1.11 --- testTools.cc 15 Mar 2002 16:34:23 -0000 1.12 *************** *** 402,405 **** --- 402,409 ---- } } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; + exit(1); + } catch(...) { cout << "Not able to login...\n"; |
From: Asbjorn M. <ste...@us...> - 2002-03-15 14:53:53
|
Update of /cvsroot/epp-rtk/epp-rtk/c++ In directory usw-pr-cvs1:/tmp/cvs-serv17718 Modified Files: README Log Message: -Added JavaDocs and explanatory comments to test programs/methods -Updated text in README file Index: README =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/README,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** README 12 Mar 2002 16:59:16 -0000 1.5 --- README 15 Mar 2002 14:53:47 -0000 1.6 *************** *** 38,40 **** ! 2002.03.12: ep...@gn... --- 38,44 ---- ! In the files main_hello.cc, main_login.cc, and testTools.cc, you find ! detailed comments in the code describing how to use the toolkit. ! ! ! 2002.03.15: ep...@gn... |
From: Asbjorn M. <ste...@us...> - 2002-03-15 14:53:52
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv17718/src Modified Files: main_hello.cc main_login.cc testTools.cc testTools.h Log Message: -Added JavaDocs and explanatory comments to test programs/methods -Updated text in README file Index: main_hello.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hello.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** main_hello.cc 9 Mar 2002 11:58:01 -0000 1.7 --- main_hello.cc 15 Mar 2002 14:53:47 -0000 1.8 *************** *** 26,29 **** --- 26,34 ---- ************************************************************************/ + /** @file main_hello.cc + * @brief Test program for the <hello> command + * @author Asbjorn Steira Mikkelsen + */ + #include <string> #include <iostream.h> *************** *** 40,43 **** --- 45,51 ---- using namespace eppobject::epp; + /** Function that write the server response to cerr + * @param req Greeting returned from the server + */ void printRsp(const epp_Greeting_ref req) { *************** *** 194,203 **** int main(int argc, char * argv[]) { ! epp_Session test; string username, password; if(!handleArgs(test, argc, argv, username, password)) return 1; --- 202,215 ---- + /// Main part of test program for the <hello> command int main(int argc, char * argv[]) { ! // Initialize session object ! epp_Session test; string username, password; + // Handle arguments. This function might change the session object + // and username/password if(!handleArgs(test, argc, argv, username, password)) return 1; *************** *** 205,219 **** try { epp_Hello_ref l_obj(new epp_Hello()); epp_Greeting_ref myGr = test.connectAndGetGreeting(); test.processAction(l_obj); ! epp_Greeting_ref l_rsp = l_obj->getResponseData(); #ifndef TEST_IO_REQUEST2CERR printRsp(l_rsp); ! #endif return 0; --- 217,245 ---- try { + // Initialize <hello> command object epp_Hello_ref l_obj(new epp_Hello()); + // Connect to server and get the greeting. In this + // test program we do not do anything further with + // the returned greeting. epp_Greeting_ref myGr = test.connectAndGetGreeting(); + // As the <hello> request has no user-defined attributes + // we are ready to process the command. processAction will + // write the data to the server, wait for the response, + // parse the response, and put the data back into the + // session object. test.processAction(l_obj); ! ! // We then return the response data, for this command a ! // greeting epp_Greeting_ref l_rsp = l_obj->getResponseData(); #ifndef TEST_IO_REQUEST2CERR + // We then use the above function to print the response + // from the server printRsp(l_rsp); ! #endif ! // Finished return 0; Index: main_login.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_login.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main_login.cc 9 Mar 2002 11:58:01 -0000 1.8 --- main_login.cc 15 Mar 2002 14:53:47 -0000 1.9 *************** *** 26,29 **** --- 26,34 ---- ************************************************************************/ + /** @file main_login.cc + * @brief Test program for the <login> command + * @author Asbjorn Steira Mikkelsen + */ + #include <string> #include <vector> *************** *** 41,44 **** --- 46,53 ---- using namespace eppobject::epp; + + /** Function that write the server response to cerr + * @param req Response returned from the server + */ void printRsp(const epp_LoginRsp_ref req) { *************** *** 52,79 **** int main(int argc, char * argv[]) { epp_Session test; string username, password; if(!handleArgs(test, argc, argv, username, password)) return 1; try { epp_Options_ref ops(new epp_Options(epp_string("1.0"), epp_string("en"))); epp_Credentials_ref creds(new epp_Credentials()); - creds->m_client_id.ref(new epp_string(username)); creds->m_password.ref(new epp_string(password)); creds->m_new_password.ref(new epp_string("bar-FOO2")); creds->m_options = ops; ! epp_Command_ref cmd(new epp_Command()); cmd->m_creds = creds; cmd->m_client_trid.ref(new epp_trid("ABC-12345")); epp_objuri_seq_ref sers(new epp_objuri_seq); sers->push_back("urn:ietf:params:xml:ns:contact-1.0"); --- 61,96 ---- + /// Main part of test program for the <login> command int main(int argc, char * argv[]) { + // Initialize session object epp_Session test; string username, password; + // Handle arguments. This function might change the session object + // and username/password if(!handleArgs(test, argc, argv, username, password)) return 1; try { + + // Fill in options part of request epp_Options_ref ops(new epp_Options(epp_string("1.0"), epp_string("en"))); + // Fill in credentials part of request epp_Credentials_ref creds(new epp_Credentials()); creds->m_client_id.ref(new epp_string(username)); creds->m_password.ref(new epp_string(password)); creds->m_new_password.ref(new epp_string("bar-FOO2")); creds->m_options = ops; ! ! // Fill in command part of request epp_Command_ref cmd(new epp_Command()); cmd->m_creds = creds; cmd->m_client_trid.ref(new epp_trid("ABC-12345")); + // Fill in services part of request epp_objuri_seq_ref sers(new epp_objuri_seq); sers->push_back("urn:ietf:params:xml:ns:contact-1.0"); *************** *** 81,87 **** sers->push_back("urn:ietf:params:xml:ns:host-1.0"); epp_exturi_seq_ref extSers(new epp_exturi_seq); extSers->push_back("http://custom/obj1ext-1.0"); ! epp_LoginReq_ref l_req(new epp_LoginReq()); l_req->m_cmd = cmd; --- 98,106 ---- sers->push_back("urn:ietf:params:xml:ns:host-1.0"); + // Fill in extensions part of request epp_exturi_seq_ref extSers(new epp_exturi_seq); extSers->push_back("http://custom/obj1ext-1.0"); ! ! // Initialize and fill in the <login> request object epp_LoginReq_ref l_req(new epp_LoginReq()); l_req->m_cmd = cmd; *************** *** 89,105 **** --- 108,136 ---- l_req->m_extensions = extSers; + // Initialize <login> command object epp_Login_ref l_obj(new epp_Login()); + // Put the request data object into the command object l_obj->setRequestData(*l_req); + // Connect to server and get the greeting. In this + // test program we do not do anything further with + // the returned greeting. test.connectAndGetGreeting(); + // processAction will write the data object to the server, wait for + // the response, parse the response, and put the data back into the + // session object. test.processAction(l_obj); + // We then return the <login> response object epp_LoginRsp_ref l_rsp = l_obj->getResponseData(); #ifndef TEST_IO_REQUEST2CERR + // We then use the above function to print the response + // from the server printRsp(l_rsp); #endif + // Finished return 0; *************** *** 116,119 **** --- 147,153 ---- cerr << "</response>" << endl; #endif + } + catch(epptransport::epp_TrException ex) { + cout << "Exception: " << ex.getString() << endl; } catch(...) { Index: testTools.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/testTools.cc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** testTools.cc 13 Mar 2002 20:30:30 -0000 1.10 --- testTools.cc 15 Mar 2002 14:53:47 -0000 1.11 *************** *** 27,30 **** --- 27,36 ---- + /** @file testTools.cc + * @brief Definition of helper functions used for testing toolkit + * @author Asbjorn Steira Mikkelsen + * @see testTools.h + */ + #include <map> #include "testTools.h" *************** *** 199,236 **** string & username, string & password) { ! //Change transport here: ! typedef epp_TransportSSL myTransport; typedef refcnt_ptr<myTransport> myTransport_ref; epp_TransportBase* transport = new myTransport; username = "testlogin"; password = "testpass"; ! typedef map<string, string> argsMap; argsMap commandArgs; ! if(argc > 1) { - if (!strcmp(argv[1], "-?")) - { - cout << argv[0]; - - if(transport->getType() != "epp_TransportIOStream") { - // Only relevant for connection-transport: - cout << " -n=<servername> -p=<serverPort>"; - } - - cout << " -l=<login> -s=<pass>"; - - if(transport->getType() == "epp_TransportSSL") { - // Only relevant for SSL-transport: - // <FIXME>Bug: -ca must include full path to file...</fixme> - cout << " -c=<cert> [-cadir=<cacertdir> -ca=<cacert>]"; - } - - cout << endl; - return false; - } // if "-?" for(int parm = 1; parm < argc; parm++) { --- 205,253 ---- string & username, string & password) { ! // CHANGE TRANSPORT HERE: ! typedef epp_TransportTCP myTransport; + // The transport handling in this function is a bit more + // complex than it needs to be for a Registrar, but this + // function needs to be capable of handling all types of + // transport. typedef refcnt_ptr<myTransport> myTransport_ref; epp_TransportBase* transport = new myTransport; + // Default user name and password username = "testlogin"; password = "testpass"; ! ! // Map that will contain all command line arguments typedef map<string, string> argsMap; argsMap commandArgs; ! ! // Check all arguments and fill in the above map if it ! // is valid for the current transport if(argc > 1) { + if (!strcmp(argv[1], "-?")) { + // Return with a line showing allowed command line arguments + + cout << argv[0]; + + if(transport->getType() != "epp_TransportIOStream") { + // Only relevant for connection-transports + cout << " -n=<servername> -p=<serverPort>"; + } + + cout << " -l=<login> -s=<pass>"; + + if(transport->getType() == "epp_TransportSSL") { + // Only relevant for SSL-transport + // <FIXME>Bug: -ca must include full path to file...</fixme> + cout << " -c=<cert> [-cadir=<cacertdir> -ca=<cacert>]"; + } + + cout << endl; + return false; + } // if "-?" + + // If not "-?", process the rest of the command line arguments for(int parm = 1; parm < argc; parm++) { *************** *** 242,247 **** if(transport->getType() != "epp_TransportIOStream") { - // Only relevant for connection-transport: if (!strncmp(argv[parm], "-n=", 3)) { commandArgs["n"] = &argv[parm][3]; --- 259,264 ---- if(transport->getType() != "epp_TransportIOStream") { + // Only relevant for connection-transports if (!strncmp(argv[parm], "-n=", 3)) { commandArgs["n"] = &argv[parm][3]; *************** *** 254,259 **** if(transport->getType() == "epp_TransportSSL") { - // Only relevant if the transport is using SSL... if (!strncmp(argv[parm], "-c=", 3)) { commandArgs["c"] = &argv[parm][3]; --- 271,276 ---- if(transport->getType() == "epp_TransportSSL") { + // Only relevant for SSL-transport if (!strncmp(argv[parm], "-c=", 3)) { commandArgs["c"] = &argv[parm][3]; *************** *** 282,285 **** --- 299,303 ---- #if 0 + // Write out all accepted command line arguments for( map<string, string>::const_iterator i = commandArgs.begin(); i != commandArgs.end(); ++i) *************** *** 289,312 **** #endif if(transport->getType() == "epp_TransportSSL" && (commandArgs["c"] != "" || commandArgs["ca"] != "")) { // cout << commandArgs["c"] << " " << commandArgs["ca"] << " " << commandArgs["cadir"] << endl; transport = new epp_TransportSSL(commandArgs["c"], commandArgs["ca"], commandArgs["cadir"]); } ! if(commandArgs["n"] != "") { transport->setServerName(commandArgs["n"]); } if(commandArgs["p"] != "") { transport->setServerPort(atol(commandArgs["p"].c_str())); } myTransport_ref mt(dynamic_cast<myTransport*>(transport)); - sess.setTransport(mt); ! // Do not delete this pointer, the ref-counter class takes care of it... ! // delete transport; return true; --- 307,340 ---- #endif + // If transport is SSL, and we need to set SSL-specific elements, we have to + // use the epp_TransportSSL constructor to set these. This is because the + // SSL-specific set/get methods are not part of the transport base class, and + // we want to be able to compile this file regardless of which transport to use. + // + // If you are always going to use SSL, you can use get/set methods directly. if(transport->getType() == "epp_TransportSSL" && (commandArgs["c"] != "" || commandArgs["ca"] != "")) { // cout << commandArgs["c"] << " " << commandArgs["ca"] << " " << commandArgs["cadir"] << endl; transport = new epp_TransportSSL(commandArgs["c"], commandArgs["ca"], commandArgs["cadir"]); } ! ! // Set server name, if applicable if(commandArgs["n"] != "") { transport->setServerName(commandArgs["n"]); } + // Set server port, if applicable if(commandArgs["p"] != "") { transport->setServerPort(atol(commandArgs["p"].c_str())); } + // Put the transport into the session class myTransport_ref mt(dynamic_cast<myTransport*>(transport)); sess.setTransport(mt); ! // Do not delete the transport pointer, ! // the ref-counter class takes care of it... ! // delete transport; + // Finished return true; *************** *** 318,321 **** --- 346,350 ---- #ifdef TEST_IO_REQUEST2CERR + // We do not want to login when using IOStream transport if(mySession.getTransport()->getType() == "epp_TransportIOStream") { return; *************** *** 323,326 **** --- 352,356 ---- #endif #ifdef TEST_IO_RESULT2CERR + // We do not want to login when using IOStream transport if(mySession.getTransport()->getType() == "epp_TransportIOStream") { return; *************** *** 329,339 **** try { ! // Filling Login-object: ! epp_LoginReq_ref l_req(new epp_LoginReq()); - l_req->m_cmd.ref(new epp_Command()); - l_req->m_cmd->m_creds.ref(new epp_Credentials()); l_req->m_cmd->m_creds->m_options.ref(new epp_Options(epp_string("1.0"), epp_string("en"))); --- 359,369 ---- try { ! ! // Initialize <login> request object and sub-elements epp_LoginReq_ref l_req(new epp_LoginReq()); l_req->m_cmd.ref(new epp_Command()); l_req->m_cmd->m_creds.ref(new epp_Credentials()); + + // Fill in credentials information l_req->m_cmd->m_creds->m_options.ref(new epp_Options(epp_string("1.0"), epp_string("en"))); *************** *** 341,364 **** l_req->m_cmd->m_creds->m_password.ref(new epp_string(password)); l_req->m_cmd->m_client_trid.ref(new epp_trid("LogIn-1")); l_req->m_services.ref(new epp_objuri_seq()); l_req->m_services->push_back("urn:ietf:params:xml:ns:contact-1.0"); l_req->m_services->push_back("urn:ietf:params:xml:ns:domain-1.0"); l_req->m_services->push_back("urn:ietf:params:xml:ns:host-1.0"); ! epp_Login_ref l_obj(new epp_Login()); l_obj->setRequestData(*l_req); ! // Process request and get response: ! epp_Greeting_ref myGr = mySession.connectAndGetGreeting(); mySession.processAction(l_obj); - epp_LoginRsp_ref l_rsp = l_obj->getResponseData(); ! // Print response: if(mySession.getTransport()->getType() == "epp_TransportIOStream") { printResponsePart(l_rsp->m_rsp); --- 371,401 ---- l_req->m_cmd->m_creds->m_password.ref(new epp_string(password)); + // Fill in client transaction ID l_req->m_cmd->m_client_trid.ref(new epp_trid("LogIn-1")); + // Fill in services information l_req->m_services.ref(new epp_objuri_seq()); l_req->m_services->push_back("urn:ietf:params:xml:ns:contact-1.0"); l_req->m_services->push_back("urn:ietf:params:xml:ns:domain-1.0"); l_req->m_services->push_back("urn:ietf:params:xml:ns:host-1.0"); ! ! // Initialize <login> command object epp_Login_ref l_obj(new epp_Login()); + // Put the request data object into the command object l_obj->setRequestData(*l_req); ! // Connect to server and get the greeting. epp_Greeting_ref myGr = mySession.connectAndGetGreeting(); + // processAction will write the data object to the server, wait for + // the response, parse the response, and put the data back into the + // session object. mySession.processAction(l_obj); ! // Return the <login> response object ! epp_LoginRsp_ref l_rsp = l_obj->getResponseData(); + // Print response if the transport is IOStream if(mySession.getTransport()->getType() == "epp_TransportIOStream") { printResponsePart(l_rsp->m_rsp); Index: testTools.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/testTools.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** testTools.h 8 Mar 2002 12:11:51 -0000 1.9 --- testTools.h 15 Mar 2002 14:53:48 -0000 1.10 *************** *** 30,33 **** --- 30,38 ---- + /** @file testTools.h + * @brief Definition of helper functions used for testing toolkit + * @author Asbjorn Steira Mikkelsen + */ + #include <string> #include <iostream.h> *************** *** 37,54 **** --- 42,111 ---- + /** Function that takes an eppobject::epp::epp_Result sequence and writes each + * of them to cerr on the same format as in the originally returned xml + * string + * @param results The results element returned from the server + */ void printResultsSeq(const eppobject::epp::epp_result_seq_ref results); + + /** Function that takes an eppobject::epp::epp_TransID object and writes + * it to cerr on the same format as in the originally returned xml + * string + * @param transID The transaction ID element returned from the server + */ void printTransID(const eppobject::epp::epp_TransID_ref transID); + /** Function that takes an eppobject::epp::epp_Response object and writes + * it to cerr on the same format as in the originally returned xml + * string + * @param response The response element returned from the server + */ void printResponsePart(const eppobject::epp::epp_Response_ref response); + + /** Function that takes an eppobject::epp::epp_Response object and writes + * everything up to a potential resData element to cerr on the same format + * as in the originally returned xml string + * @param response The response element returned from the server + */ void printResponsePart1(const eppobject::epp::epp_Response_ref response); + + /** Function that takes an eppobject::epp::epp_Response object and writes + * everything after a potential resData element to cerr on the same format + * as in the originally returned xml string + * @param response The response element returned from the server + */ void printResponsePart2(const eppobject::epp::epp_Response_ref response); + /** Function that writes to cerr a standard resData header + * @param object The object type (e.g., "domain") + * @param returnType The return type (e.g., "creData") + */ void printResDataHeaders(const string & object, const string & returntype); + + /** Function that writes to cerr a standard resData footer + * @param object The object type (e.g., "domain") + * @param returnType The return type (e.g., "creData") + */ void printResDataFooter(const string & object, const string & returntype); + /** Function that handles the command line arguments sent to the program + * and initializes the transport accordingly + * @param sess Session to use when communicating with server + * @param argc Count of command line arguments + * @param argv Actual command line arguments + * @param username Login name on server + * @param password Password on server + * @return true if arguments set correcetly, otherwise false + */ bool handleArgs(eppobject::epp::epp_Session & sess, int argc, char * argv[], string & username, string & password); + /** Function that tries to login to a server using information in the + * eppobject::epp::epp_Session object. + * @param mySession Session data to use when communication with server + * @param username Login name on server + * @param password Password on server + */ void testLogIn(eppobject::epp::epp_Session & mySession, const string & username, |
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory usw-pr-cvs1:/tmp/cvs-serv20336 Modified Files: epp_Action.h epp_ContactCheck.h epp_ContactCreate.h epp_ContactDelete.h epp_ContactInfo.h epp_ContactTransfer.h epp_ContactUpdate.h epp_DomainCheck.h epp_DomainCreate.h epp_DomainDelete.h epp_DomainInfo.h epp_DomainRenew.h epp_DomainTransfer.h epp_DomainUpdate.h epp_Extension.h epp_Hello.h epp_HostCheck.h epp_HostCreate.h epp_HostDelete.h epp_HostInfo.h epp_HostUpdate.h epp_Login.h epp_Logout.h epp_Poll.h epp_Session.h epp_Status.h epp_Unspec.h Log Message: Added JavaDocs to the interface classes. Index: epp_Action.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_Action.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_Action.h 20 Feb 2002 17:26:01 -0000 1.4 --- epp_Action.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 1,46 **** /************************************************************************ ! * EPP RTK C++ ! * Copyright (C) 2001, 2002 The Global Name Registry, Limited ! * ! * This library is free software; you can redistribute it and/or modify it ! * under the terms of the GNU Lesser General Public License as published ! * by the Free Software Foundation; either version 2.1 of the License, or ! * (at your option) any later version. ! * ! * This library is distributed in the hope that it will be useful, but ! * WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this library; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! * Contact information: ep...@gn... ! * ! * EPP RTK ! * The Global Name Registry, Limited ! * 125 High Holborn ! * London WC1V 6QA ! * United Kingdom ! ************************************************************************/ #ifndef __EPP_ACTION_H #define __EPP_ACTION_H #include "data/epp_eppdata.h" namespace eppobject { namespace epp { class epp_Action { public: epp_Action() {}; - virtual ~epp_Action() {}; virtual eppobject::epp::epp_string toXML() = 0; virtual void fromXML(const eppobject::epp::epp_string & xml) = 0; }; typedef refcnt_ptr<epp_Action> epp_Action_ref; --- 1,67 ---- /************************************************************************ ! * EPP RTK C++ ! * Copyright (C) 2001, 2002 The Global Name Registry, Limited ! * ! * This library is free software; you can redistribute it and/or modify it ! * under the terms of the GNU Lesser General Public License as published ! * by the Free Software Foundation; either version 2.1 of the License, or ! * (at your option) any later version. ! * ! * This library is distributed in the hope that it will be useful, but ! * WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this library; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! * Contact information: ep...@gn... ! * ! * EPP RTK ! * The Global Name Registry, Limited ! * 125 High Holborn ! * London WC1V 6QA ! * United Kingdom ! ************************************************************************/ #ifndef __EPP_ACTION_H #define __EPP_ACTION_H + /** @file epp_Action.h + * @brief Definition of epp_Action and epp_Action_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_eppdata.h" namespace eppobject { namespace epp { + /// Abstract super-class for all EPP commands class epp_Action { + public: + /// Null constructor epp_Action() {}; + /// Destructor + virtual ~epp_Action() {}; + + /** Abstract function. It takes the request data object (if any), parses it, + * and returns the corresponding correctly formatted EPP xml request as an + * #epp_string + * @return The request xml string + */ virtual eppobject::epp::epp_string toXML() = 0; + + /** Abstract function. It takes the response xml #epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + */ virtual void fromXML(const eppobject::epp::epp_string & xml) = 0; }; + /// Typedef for the ref to the epp_Action class typedef refcnt_ptr<epp_Action> epp_Action_ref; Index: epp_ContactCheck.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactCheck.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_ContactCheck.h 20 Feb 2002 17:26:01 -0000 1.4 --- epp_ContactCheck.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_CONTACTCHECK_H + /** @file epp_ContactCheck.h + * @brief Definition of epp_ContactCheck and epp_ContactCheck_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_ContactCheckReq.h" #include "data/epp_ContactCheckRsp.h" *************** *** 35,54 **** namespace eppobject { namespace contact { class epp_ContactCheck : public eppobject::epp::epp_Action { private: ! epp_ContactCheckReq_ref m_request; ! epp_ContactCheckRsp_ref m_response; public: epp_ContactCheck() {}; ~epp_ContactCheck() {}; void setRequestData(const epp_ContactCheckReq & parms); epp_ContactCheckRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; typedef refcnt_ptr<epp_ContactCheck> epp_ContactCheck_ref; --- 40,85 ---- namespace eppobject { namespace contact { + /// Interface class for the EPP contact <check> command class epp_ContactCheck : public eppobject::epp::epp_Action { + private: ! epp_ContactCheckReq_ref m_request; /**< Request to send to the server */ ! epp_ContactCheckRsp_ref m_response; /**< Response received from server */ ! public: + + /// Null constructor epp_ContactCheck() {}; + /// Destructor ~epp_ContactCheck() {}; + /** Function setting the object's request element + * @param parms Request element to use + */ void setRequestData(const epp_ContactCheckReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_ContactCheckRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml eppobject::epp#epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw eppobject::epp::epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; + /// Typedef for the ref to the epp_ContactCheck class typedef refcnt_ptr<epp_ContactCheck> epp_ContactCheck_ref; Index: epp_ContactCreate.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactCreate.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_ContactCreate.h 20 Feb 2002 17:26:01 -0000 1.4 --- epp_ContactCreate.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_CONTACTCREATE_H + /** @file epp_ContactCreate.h + * @brief Definition of epp_ContactCreate and epp_ContactCreate_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_ContactCreateReq.h" #include "data/epp_ContactCreateRsp.h" *************** *** 35,54 **** namespace eppobject { namespace contact { class epp_ContactCreate : public eppobject::epp::epp_Action { private: ! epp_ContactCreateReq_ref m_request; ! epp_ContactCreateRsp_ref m_response; public: epp_ContactCreate() {}; - - ~epp_ContactCreate() {}; void setRequestData(const epp_ContactCreateReq & parms); epp_ContactCreateRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; typedef refcnt_ptr<epp_ContactCreate> epp_ContactCreate_ref; --- 40,85 ---- namespace eppobject { namespace contact { + /// Interface class for the EPP contact <create> command class epp_ContactCreate : public eppobject::epp::epp_Action { + private: ! epp_ContactCreateReq_ref m_request; /**< Request to send to the server */ ! epp_ContactCreateRsp_ref m_response; /**< Response received from server */ ! public: + + /// Null constructor epp_ContactCreate() {}; + /// Destructor + ~epp_ContactCreate() {}; + + /** Function setting the object's request element + * @param parms Request element to use + */ void setRequestData(const epp_ContactCreateReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_ContactCreateRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml eppobject::epp#epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw eppobject::epp::epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; + /// Typedef for the ref to the epp_ContactCreate class typedef refcnt_ptr<epp_ContactCreate> epp_ContactCreate_ref; Index: epp_ContactDelete.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactDelete.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_ContactDelete.h 20 Feb 2002 17:26:01 -0000 1.4 --- epp_ContactDelete.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_CONTACTDELETE_H + /** @file epp_ContactDelete.h + * @brief Definition of epp_ContactDelete and epp_ContactDelete_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_ContactDeleteReq.h" #include "data/epp_ContactDeleteRsp.h" *************** *** 35,54 **** namespace eppobject { namespace contact { class epp_ContactDelete : public eppobject::epp::epp_Action { private: ! epp_ContactDeleteReq_ref m_request; ! epp_ContactDeleteRsp_ref m_response; public: epp_ContactDelete() {}; ~epp_ContactDelete() {}; ! void setRequestData(const epp_ContactDeleteReq & parms); epp_ContactDeleteRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; typedef refcnt_ptr<epp_ContactDelete> epp_ContactDelete_ref; --- 40,85 ---- namespace eppobject { namespace contact { + /// Interface class for the EPP contact <delete> command class epp_ContactDelete : public eppobject::epp::epp_Action { + private: ! epp_ContactDeleteReq_ref m_request; /**< Request to send to the server */ ! epp_ContactDeleteRsp_ref m_response; /**< Response received from server */ ! public: + + /// Null constructor epp_ContactDelete() {}; + /// Destructor ~epp_ContactDelete() {}; ! ! /** Function setting the object's request element ! * @param parms Request element to use ! */ void setRequestData(const epp_ContactDeleteReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_ContactDeleteRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml eppobject::epp#epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw eppobject::epp::epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; + /// Typedef for the ref to the epp_ContactDelete class typedef refcnt_ptr<epp_ContactDelete> epp_ContactDelete_ref; Index: epp_ContactInfo.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactInfo.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_ContactInfo.h 20 Feb 2002 17:26:01 -0000 1.4 --- epp_ContactInfo.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_CONTACTINFO_H + /** @file epp_ContactInfo.h + * @brief Definition of epp_ContactInfo and epp_ContactInfo_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_ContactInfoReq.h" #include "data/epp_ContactInfoRsp.h" *************** *** 36,55 **** namespace eppobject { namespace contact { class epp_ContactInfo : public eppobject::epp::epp_Action { private: ! epp_ContactInfoReq_ref m_request; ! epp_ContactInfoRsp_ref m_response; public: epp_ContactInfo() {}; ~epp_ContactInfo() {}; void setRequestData(const epp_ContactInfoReq & parms); epp_ContactInfoRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; ! typedef refcnt_ptr<epp_ContactInfo> epp_ContactInfo_ref; --- 41,86 ---- namespace eppobject { namespace contact { + /// Interface class for the EPP contact <info> command class epp_ContactInfo : public eppobject::epp::epp_Action { + private: ! epp_ContactInfoReq_ref m_request; /**< Request to send to the server */ ! epp_ContactInfoRsp_ref m_response; /**< Response received from server */ ! public: + + /// Null constructor epp_ContactInfo() {}; + /// Destructor ~epp_ContactInfo() {}; + /** Function setting the object's request element + * @param parms Request element to use + */ void setRequestData(const epp_ContactInfoReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_ContactInfoRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml eppobject::epp#epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw eppobject::epp::epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; ! ! /// Typedef for the ref to the epp_ContactInfo class typedef refcnt_ptr<epp_ContactInfo> epp_ContactInfo_ref; Index: epp_ContactTransfer.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactTransfer.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_ContactTransfer.h 20 Feb 2002 17:26:01 -0000 1.4 --- epp_ContactTransfer.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_CONTACTTRANSFER_H + /** @file epp_ContactTransfer.h + * @brief Definition of epp_ContactTransfer and epp_ContactTransfer_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_ContactTransferReq.h" #include "data/epp_ContactTransferRsp.h" *************** *** 36,55 **** namespace eppobject { namespace contact { class epp_ContactTransfer : public eppobject::epp::epp_Action { private: ! epp_ContactTransferReq_ref m_request; ! epp_ContactTransferRsp_ref m_response; public: epp_ContactTransfer() {}; ~epp_ContactTransfer() {}; void setRequestData(const epp_ContactTransferReq & parms); epp_ContactTransferRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; typedef refcnt_ptr<epp_ContactTransfer> epp_ContactTransfer_ref; --- 41,86 ---- namespace eppobject { namespace contact { + /// Interface class for the EPP contact <transfer> command class epp_ContactTransfer : public eppobject::epp::epp_Action { + private: ! epp_ContactTransferReq_ref m_request; /**< Request to send to the server */ ! epp_ContactTransferRsp_ref m_response; /**< Response received from server */ ! public: + + /// Null constructor epp_ContactTransfer() {}; + /// Destructor ~epp_ContactTransfer() {}; + /** Function setting the object's request element + * @param parms Request element to use + */ void setRequestData(const epp_ContactTransferReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_ContactTransferRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml eppobject::epp#epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw eppobject::epp::epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; + /// Typedef for the ref to the epp_ContactTransfer class typedef refcnt_ptr<epp_ContactTransfer> epp_ContactTransfer_ref; Index: epp_ContactUpdate.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactUpdate.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** epp_ContactUpdate.h 20 Feb 2002 17:26:01 -0000 1.5 --- epp_ContactUpdate.h 15 Mar 2002 13:20:13 -0000 1.6 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_CONTACTUPDATE_H + /** @file epp_ContactUpdate.h + * @brief Definition of epp_ContactUpdate and epp_ContactUpdate_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_ContactUpdateReq.h" #include "data/epp_ContactUpdateRsp.h" *************** *** 36,61 **** namespace eppobject { namespace contact { class epp_ContactUpdate : public eppobject::epp::epp_Action { private: ! epp_ContactUpdateReq_ref m_request; ! epp_ContactUpdateRsp_ref m_response; void addRemAddElement(eppobject::epp::EPP_output & outputobject, const epp_ContactUpdateAddRemove_ref element, const eppobject::epp::epp_string & mode); void addChangeElement(eppobject::epp::EPP_output & outputobject, const epp_ContactUpdateChange_ref element); public: epp_ContactUpdate() {}; ~epp_ContactUpdate() {}; void setRequestData(const epp_ContactUpdateReq & parms); epp_ContactUpdateRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; typedef refcnt_ptr<epp_ContactUpdate> epp_ContactUpdate_ref; --- 41,102 ---- namespace eppobject { namespace contact { + /// Interface class for the EPP contact <update> command class epp_ContactUpdate : public eppobject::epp::epp_Action { + private: ! epp_ContactUpdateReq_ref m_request; /**< Request to send to the server */ ! epp_ContactUpdateRsp_ref m_response; /**< Response received from server */ ! ! /** Helper function putting the add/rem element into the request output object ! * @param outputobject Outputobject to put element into ! * @param element Add/Remove object to process ! * @param mode The tag-name to use (i.e., add or remove) ! */ void addRemAddElement(eppobject::epp::EPP_output & outputobject, const epp_ContactUpdateAddRemove_ref element, const eppobject::epp::epp_string & mode); + + /** Helper function putting the change element into the request output object + * @param outputobject Outputobject to put element into + * @param element Change object to process + */ void addChangeElement(eppobject::epp::EPP_output & outputobject, const epp_ContactUpdateChange_ref element); public: + + /// Null constructor epp_ContactUpdate() {}; + /// Destructor ~epp_ContactUpdate() {}; + /** Function setting the object's request element + * @param parms Request element to use + */ void setRequestData(const epp_ContactUpdateReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_ContactUpdateRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml eppobject::epp#epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw eppobject::epp::epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; + /// Typedef for the ref to the epp_ContactUpdate class typedef refcnt_ptr<epp_ContactUpdate> epp_ContactUpdate_ref; Index: epp_DomainCheck.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_DomainCheck.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_DomainCheck.h 20 Feb 2002 17:26:01 -0000 1.4 --- epp_DomainCheck.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_DOMAINCHECK_H + /** @file epp_DomainCheck.h + * @brief Definition of epp_DomainCheck and epp_DomainCheck_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_DomainCheckReq.h" #include "data/epp_DomainCheckRsp.h" *************** *** 36,55 **** namespace eppobject { namespace domain { class epp_DomainCheck : public eppobject::epp::epp_Action { private: ! epp_DomainCheckReq_ref m_request; ! epp_DomainCheckRsp_ref m_response; public: epp_DomainCheck() {}; ~epp_DomainCheck() {}; void setRequestData(const epp_DomainCheckReq & parms); epp_DomainCheckRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; typedef refcnt_ptr<epp_DomainCheck> epp_DomainCheck_ref; --- 41,86 ---- namespace eppobject { namespace domain { + /// Interface class for the EPP domain <check> command class epp_DomainCheck : public eppobject::epp::epp_Action { + private: ! epp_DomainCheckReq_ref m_request; /**< Request to send to the server */ ! epp_DomainCheckRsp_ref m_response; /**< Response received from server */ ! public: + + /// Null constructor epp_DomainCheck() {}; + /// Destructor ~epp_DomainCheck() {}; + /** Function setting the object's request element + * @param parms Request element to use + */ void setRequestData(const epp_DomainCheckReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_DomainCheckRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml eppobject::epp#epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw eppobject::epp::epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; + /// Typedef for the ref to the epp_DomainCheck class typedef refcnt_ptr<epp_DomainCheck> epp_DomainCheck_ref; Index: epp_DomainCreate.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_DomainCreate.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_DomainCreate.h 20 Feb 2002 17:26:01 -0000 1.4 --- epp_DomainCreate.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_DOMAINCREATE_H + /** @file epp_DomainCreate.h + * @brief Definition of epp_DomainCreate and epp_DomainCreate_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_DomainCreateReq.h" #include "data/epp_DomainCreateRsp.h" *************** *** 36,55 **** namespace eppobject { namespace domain { class epp_DomainCreate : public eppobject::epp::epp_Action { private: ! epp_DomainCreateReq_ref m_request; ! epp_DomainCreateRsp_ref m_response; public: epp_DomainCreate() {}; ~epp_DomainCreate() {}; void setRequestData(const epp_DomainCreateReq & parms); epp_DomainCreateRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; typedef refcnt_ptr<epp_DomainCreate> epp_DomainCreate_ref; --- 41,86 ---- namespace eppobject { namespace domain { + /// Interface class for the EPP domain <create> command class epp_DomainCreate : public eppobject::epp::epp_Action { + private: ! epp_DomainCreateReq_ref m_request; /**< Request to send to the server */ ! epp_DomainCreateRsp_ref m_response; /**< Response received from server */ ! public: + + /// Null constructor epp_DomainCreate() {}; + /// Destructor ~epp_DomainCreate() {}; + /** Function setting the object's request element + * @param parms Request element to use + */ void setRequestData(const epp_DomainCreateReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_DomainCreateRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml eppobject::epp#epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw eppobject::epp::epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; + /// Typedef for the ref to the epp_DomainCreate class typedef refcnt_ptr<epp_DomainCreate> epp_DomainCreate_ref; Index: epp_DomainDelete.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_DomainDelete.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_DomainDelete.h 20 Feb 2002 17:26:01 -0000 1.4 --- epp_DomainDelete.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_DOMAINDELETE_H + /** @file epp_DomainDelete.h + * @brief Definition of epp_DomainDelete and epp_DomainDelete_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_DomainDeleteReq.h" #include "data/epp_DomainDeleteRsp.h" *************** *** 35,54 **** namespace eppobject { namespace domain { class epp_DomainDelete : public eppobject::epp::epp_Action { private: ! epp_DomainDeleteReq_ref m_request; ! epp_DomainDeleteRsp_ref m_response; public: epp_DomainDelete() {}; virtual ~epp_DomainDelete() {}; void setRequestData(const epp_DomainDeleteReq & parms); epp_DomainDeleteRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; ! typedef refcnt_ptr<epp_DomainDelete> epp_DomainDelete_ref; --- 40,85 ---- namespace eppobject { namespace domain { + /// Interface class for the EPP domain <delete> command class epp_DomainDelete : public eppobject::epp::epp_Action { + private: ! epp_DomainDeleteReq_ref m_request; /**< Request to send to the server */ ! epp_DomainDeleteRsp_ref m_response; /**< Response received from server */ ! public: + + /// Null constructor epp_DomainDelete() {}; + /// Destructor virtual ~epp_DomainDelete() {}; + /** Function setting the object's request element + * @param parms Request element to use + */ void setRequestData(const epp_DomainDeleteReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_DomainDeleteRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml eppobject::epp#epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw eppobject::epp::epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; ! ! /// Typedef for the ref to the epp_DomainCreate class typedef refcnt_ptr<epp_DomainDelete> epp_DomainDelete_ref; Index: epp_DomainInfo.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_DomainInfo.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_DomainInfo.h 20 Feb 2002 17:26:01 -0000 1.4 --- epp_DomainInfo.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_DOMAININFO_H + /** @file epp_DomainInfo.h + * @brief Definition of epp_DomainInfo and epp_DomainInfo_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_DomainInfoReq.h" #include "data/epp_DomainInfoRsp.h" *************** *** 35,54 **** namespace eppobject { namespace domain { class epp_DomainInfo : public eppobject::epp::epp_Action { private: ! epp_DomainInfoReq_ref m_request; ! epp_DomainInfoRsp_ref m_response; public: epp_DomainInfo() {}; virtual ~epp_DomainInfo() {}; void setRequestData(const epp_DomainInfoReq & parms); epp_DomainInfoRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; typedef refcnt_ptr<epp_DomainInfo> epp_DomainInfo_ref; --- 40,85 ---- namespace eppobject { namespace domain { + /// Interface class for the EPP domain <info> command class epp_DomainInfo : public eppobject::epp::epp_Action { + private: ! epp_DomainInfoReq_ref m_request; /**< Request to send to the server */ ! epp_DomainInfoRsp_ref m_response; /**< Response received from server */ ! public: + + /// Null constructor epp_DomainInfo() {}; + /// Destructor virtual ~epp_DomainInfo() {}; + /** Function setting the object's request element + * @param parms Request element to use + */ void setRequestData(const epp_DomainInfoReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_DomainInfoRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml eppobject::epp#epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw eppobject::epp::epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; + /// Typedef for the ref to the epp_DomainInfo class typedef refcnt_ptr<epp_DomainInfo> epp_DomainInfo_ref; Index: epp_DomainRenew.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_DomainRenew.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_DomainRenew.h 20 Feb 2002 17:26:01 -0000 1.4 --- epp_DomainRenew.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_DOMAINRENEW_H + /** @file epp_DomainRenew.h + * @brief Definition of epp_DomainRenew and epp_DomainRenew_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_DomainRenewReq.h" #include "data/epp_DomainRenewRsp.h" *************** *** 35,54 **** namespace eppobject { namespace domain { class epp_DomainRenew : public eppobject::epp::epp_Action { private: ! epp_DomainRenewReq_ref m_request; ! epp_DomainRenewRsp_ref m_response; public: epp_DomainRenew() {}; ~epp_DomainRenew() {}; void setRequestData(const epp_DomainRenewReq & parms); epp_DomainRenewRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; ! typedef refcnt_ptr<epp_DomainRenew> epp_DomainRenew_ref; --- 40,85 ---- namespace eppobject { namespace domain { + /// Interface class for the EPP domain <renew> command class epp_DomainRenew : public eppobject::epp::epp_Action { + private: ! epp_DomainRenewReq_ref m_request; /**< Request to send to the server */ ! epp_DomainRenewRsp_ref m_response; /**< Response received from server */ ! public: + + /// Null constructor epp_DomainRenew() {}; + /// Destructor ~epp_DomainRenew() {}; + /** Function setting the object's request element + * @param parms Request element to use + */ void setRequestData(const epp_DomainRenewReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_DomainRenewRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml eppobject::epp#epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw eppobject::epp::epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; ! ! /// Typedef for the ref to the epp_DomainRenew class typedef refcnt_ptr<epp_DomainRenew> epp_DomainRenew_ref; Index: epp_DomainTransfer.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_DomainTransfer.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_DomainTransfer.h 20 Feb 2002 17:26:01 -0000 1.4 --- epp_DomainTransfer.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_DOMAINTRANSFER_H + /** @file epp_DomainTransfer.h + * @brief Definition of epp_DomainTransfer and epp_DomainTransfer_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_DomainTransferReq.h" #include "data/epp_DomainTransferRsp.h" *************** *** 35,54 **** namespace eppobject { namespace domain { class epp_DomainTransfer : public eppobject::epp::epp_Action { private: ! epp_DomainTransferReq_ref m_request; ! epp_DomainTransferRsp_ref m_response; public: epp_DomainTransfer() {}; ~epp_DomainTransfer() {}; void setRequestData(const epp_DomainTransferReq & parms); epp_DomainTransferRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; typedef refcnt_ptr<epp_DomainTransfer> epp_DomainTransfer_ref; --- 40,85 ---- namespace eppobject { namespace domain { + /// Interface class for the EPP domain <transfer> command class epp_DomainTransfer : public eppobject::epp::epp_Action { + private: ! epp_DomainTransferReq_ref m_request; /**< Request to send to the server */ ! epp_DomainTransferRsp_ref m_response; /**< Response received from server */ ! public: + + /// Null constructor epp_DomainTransfer() {}; + /// Destructor ~epp_DomainTransfer() {}; + /** Function setting the object's request element + * @param parms Request element to use + */ void setRequestData(const epp_DomainTransferReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_DomainTransferRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml eppobject::epp#epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw eppobject::epp::epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; + /// Typedef for the ref to the epp_DomainTransfer class typedef refcnt_ptr<epp_DomainTransfer> epp_DomainTransfer_ref; Index: epp_DomainUpdate.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_DomainUpdate.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** epp_DomainUpdate.h 20 Feb 2002 17:26:01 -0000 1.5 --- epp_DomainUpdate.h 15 Mar 2002 13:20:13 -0000 1.6 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_DOMAINUPDATE_H + /** @file epp_DomainUpdate.h + * @brief Definition of epp_DomainUpdate and epp_DomainUpdate_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_DomainUpdateReq.h" #include "data/epp_DomainUpdateRsp.h" *************** *** 36,61 **** namespace eppobject { namespace domain { class epp_DomainUpdate : public eppobject::epp::epp_Action { private: ! epp_DomainUpdateReq_ref m_request; ! epp_DomainUpdateRsp_ref m_response; void addRemAddElement(eppobject::epp::EPP_output & outputobject, const epp_DomainUpdateAddRemove_ref element, const eppobject::epp::epp_string & mode); void addChangeElement(eppobject::epp::EPP_output & outputobject, const epp_DomainUpdateChange_ref element); public: epp_DomainUpdate() {}; ! ~epp_DomainUpdate() {}; void setRequestData(const epp_DomainUpdateReq & parms); epp_DomainUpdateRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; ! typedef refcnt_ptr<epp_DomainUpdate> epp_DomainUpdate_ref; --- 41,102 ---- namespace eppobject { namespace domain { + /// Interface class for the EPP domain <update> command class epp_DomainUpdate : public eppobject::epp::epp_Action { + private: ! epp_DomainUpdateReq_ref m_request; /**< Request to send to the server */ ! epp_DomainUpdateRsp_ref m_response; /**< Response received from server */ ! ! /** Helper function putting the add/rem element into the request output object ! * @param outputobject Outputobject to put element into ! * @param element Add/Remove object to process ! * @param mode The tag-name to use (i.e., add or remove) ! */ void addRemAddElement(eppobject::epp::EPP_output & outputobject, const epp_DomainUpdateAddRemove_ref element, const eppobject::epp::epp_string & mode); + + /** Helper function putting the change element into the request output object + * @param outputobject Outputobject to put element into + * @param element Change object to process + */ void addChangeElement(eppobject::epp::EPP_output & outputobject, const epp_DomainUpdateChange_ref element); public: + + /// Null constructor epp_DomainUpdate() {}; ! ! /// Destructor ~epp_DomainUpdate() {}; + /** Function setting the object's request element + * @param parms Request element to use + */ void setRequestData(const epp_DomainUpdateReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_DomainUpdateRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml eppobject::epp#epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw eppobject::epp::epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; ! ! /// Typedef for the ref to the epp_DomainUpdate class typedef refcnt_ptr<epp_DomainUpdate> epp_DomainUpdate_ref; Index: epp_Extension.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_Extension.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** epp_Extension.h 10 Mar 2002 19:45:41 -0000 1.2 --- epp_Extension.h 15 Mar 2002 13:20:13 -0000 1.3 *************** *** 1,28 **** /************************************************************************ ! * EPP RTK C++ ! * Copyright (C) 2001, 2002 The Global Name Registry, Limited ! * ! * This library is free software; you can redistribute it and/or modify it ! * under the terms of the GNU Lesser General Public License as published ! * by the Free Software Foundation; either version 2.1 of the License, or ! * (at your option) any later version. ! * ! * This library is distributed in the hope that it will be useful, but ! * WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this library; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! * Contact information: ep...@gn... ! * ! * EPP RTK ! * The Global Name Registry, Limited ! * 125 High Holborn ! * London WC1V 6QA ! * United Kingdom ! ************************************************************************/ #ifndef __EPP_EXTENSION_H --- 1,28 ---- /************************************************************************ ! * EPP RTK C++ ! * Copyright (C) 2001, 2002 The Global Name Registry, Limited ! * ! * This library is free software; you can redistribute it and/or modify it ! * under the terms of the GNU Lesser General Public License as published ! * by the Free Software Foundation; either version 2.1 of the License, or ! * (at your option) any later version. ! * ! * This library is distributed in the hope that it will be useful, but ! * WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this library; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! * Contact information: ep...@gn... ! * ! * EPP RTK ! * The Global Name Registry, Limited ! * 125 High Holborn ! * London WC1V 6QA ! * United Kingdom ! ************************************************************************/ #ifndef __EPP_EXTENSION_H *************** *** 30,34 **** /** @file epp_Extension.h ! * @brief Deprecated! Definition of epp_Extension and epp_Extension_ref * @author Asbjorn Steira Mikkelsen */ --- 30,34 ---- /** @file epp_Extension.h ! * @brief Definition of epp_Extension and epp_Extension_ref * @author Asbjorn Steira Mikkelsen */ *************** *** 49,60 **** virtual ~epp_Extension() {}; ! /** Virtual function used to convert a DOM-tree to an #epp_string. To ! * be overloaded by sub-classes. * @return An empty #epp_string */ virtual eppobject::epp::epp_string toXML() { return eppobject::epp::epp_string(); }; ! /** Virtual function used to convert an #epp_string to a DOM-tree. To ! * be overloaded by sub-classes. * @param xml An XML #epp_string */ --- 49,60 ---- virtual ~epp_Extension() {}; ! /** Abstract function used to parse an epp object, and then return the ! * corresponding correctly formatted EPP xml as an #epp_string * @return An empty #epp_string */ virtual eppobject::epp::epp_string toXML() { return eppobject::epp::epp_string(); }; ! /** Abstract function used to parse an #epp_string, and put the elements into an ! * epp object. To be overloaded by sub-classes * @param xml An XML #epp_string */ Index: epp_Hello.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_Hello.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_Hello.h 20 Feb 2002 17:26:01 -0000 1.4 --- epp_Hello.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_HELLO_H + /** @file epp_Hello.h + * @brief Definition of epp_Hello and epp_Hello_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_Greeting.h" #include "epp_Action.h" *************** *** 34,50 **** namespace eppobject { namespace epp { class epp_Hello : public epp_Action { private: ! epp_Greeting_ref m_response; public: epp_Hello() {}; virtual ~epp_Hello() {}; epp_Greeting_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; typedef refcnt_ptr<epp_Hello> epp_Hello_ref; --- 39,76 ---- namespace eppobject { namespace epp { + /// Interface class for the EPP <hello> command class epp_Hello : public epp_Action { + private: ! epp_Greeting_ref m_response; /**< Response received from server */ ! public: + + /// Null constructor epp_Hello() {}; + + /// Destructor virtual ~epp_Hello() {}; + /** Function returning the object's response element + * @return Response element of object + */ epp_Greeting_ref getResponseData(); + /** Function that returns the correctly formatted EPP <hello> xml + * request as an #epp_string + * @return The request xml string + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml #epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; + /// Typedef for the ref to the epp_Hello class typedef refcnt_ptr<epp_Hello> epp_Hello_ref; Index: epp_HostCheck.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_HostCheck.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_HostCheck.h 20 Feb 2002 17:26:02 -0000 1.4 --- epp_HostCheck.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_HOSTCHECK_H + /** @file epp_HostCheck.h + * @brief Definition of epp_HostCheck and epp_HostCheck_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_HostCheckReq.h" #include "data/epp_HostCheckRsp.h" *************** *** 35,54 **** namespace eppobject { namespace host { class epp_HostCheck : public eppobject::epp::epp_Action { private: ! epp_HostCheckReq_ref m_request; ! epp_HostCheckRsp_ref m_response; public: epp_HostCheck() {}; ~epp_HostCheck() {}; void setRequestData(const epp_HostCheckReq & parms); epp_HostCheckRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; typedef refcnt_ptr<epp_HostCheck> epp_HostCheck_ref; --- 40,85 ---- namespace eppobject { namespace host { + /// Interface class for the EPP host <check> command class epp_HostCheck : public eppobject::epp::epp_Action { + private: ! epp_HostCheckReq_ref m_request; /**< Request to send to the server */ ! epp_HostCheckRsp_ref m_response; /**< Response received from server */ ! public: + + /// Null constructor epp_HostCheck() {}; + /// Destructor ~epp_HostCheck() {}; + /** Function setting the object's request element + * @param parms Request element to use + */ void setRequestData(const epp_HostCheckReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_HostCheckRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the response xml eppobject::epp#epp_string, parses it, + * and puts elements into the class' response data object. + * @param xml The response xml string + * @throw eppobject::epp::epp_XMLException If response string is missing critical data + */ virtual void fromXML(const eppobject::epp::epp_string & xml); }; + /// Typedef for the ref to the epp_HostCheck class typedef refcnt_ptr<epp_HostCheck> epp_HostCheck_ref; Index: epp_HostCreate.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_HostCreate.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_HostCreate.h 20 Feb 2002 17:26:02 -0000 1.4 --- epp_HostCreate.h 15 Mar 2002 13:20:13 -0000 1.5 *************** *** 29,32 **** --- 29,37 ---- #define __EPP_HOSTCREATE_H + /** @file epp_HostCreate.h + * @brief Definition of epp_HostCreate and epp_HostCreate_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "data/epp_HostCreateReq.h" #include "data/epp_HostCreateRsp.h" *************** *** 35,54 **** namespace eppobject { namespace host { class epp_HostCreate : public eppobject::epp::epp_Action { private: ! epp_HostCreateReq_ref m_request; ! epp_HostCreateRsp_ref m_response; public: epp_HostCreate() {}; virtual ~epp_HostCreate() {}; void setRequestData(const epp_HostCreateReq & parms); epp_HostCreateRsp_ref getResponseData(); virtual eppobject::epp::epp_string toXML(); virtual void fromXML(const eppobject::epp::epp_string & xml); }; typedef refcnt_ptr<epp_HostCreate> epp_HostCreate_ref; --- 40,85 ---- namespace eppobject { namespace host { + /// Interface class for the EPP host <create> command class epp_HostCreate : public eppobject::epp::epp_Action { + private: ! epp_HostCreateReq_ref m_request; /**< Request to send to the server */ ! epp_HostCreateRsp_ref m_response; /**< Response received from server */ ! public: + + /// Null constructor epp_HostCreate() {}; + /// Destructor virtual ~epp_HostCreate() {}; + /** Function setting the object's request element + * @param parms Request element to use + */ void setRequestData(const epp_HostCreateReq & parms); + + /** Function returning the object's response element + * @return Response element of object + */ epp_HostCreateRsp_ref getResponseData(); + /** Function that takes the request data object, parses it, and returns + * the corresponding correctly formatted EPP xml request as an + * eppobject::epp#epp_string + * @return The request xml string + * @throw eppobject::epp::epp_XMLException If request object is missing critical data + */ virtual eppobject::epp::epp_string toXML(); + + /** Function that takes the ... [truncated message content] |
From: Asbjorn M. <ste...@us...> - 2002-03-14 19:06:50
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src/unspec In directory usw-pr-cvs1:/tmp/cvs-serv22822 Modified Files: epp_UnspecTest.h Log Message: Made a comment more precise... Index: epp_UnspecTest.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/unspec/epp_UnspecTest.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** epp_UnspecTest.h 14 Mar 2002 18:57:51 -0000 1.5 --- epp_UnspecTest.h 14 Mar 2002 19:06:46 -0000 1.6 *************** *** 76,80 **** }; ! /// Converts a (response) xml string into the response data object (if any) /// @param xml The response xml string virtual void fromXML(const eppobject::epp::epp_string & xml) --- 76,80 ---- }; ! /// Converts a (response) xml string into the response data object /// @param xml The response xml string virtual void fromXML(const eppobject::epp::epp_string & xml) |
From: Asbjorn M. <ste...@us...> - 2002-03-14 18:57:55
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src/unspec In directory usw-pr-cvs1:/tmp/cvs-serv20232 Modified Files: epp_UnspecTest.h epp_Weather.h Log Message: Added JavaDocs... Index: epp_UnspecTest.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/unspec/epp_UnspecTest.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** epp_UnspecTest.h 8 Mar 2002 12:13:26 -0000 1.4 --- epp_UnspecTest.h 14 Mar 2002 18:57:51 -0000 1.5 *************** *** 29,51 **** #define __EPP_UNSPECTEST_H ! #include "config.h" #include <domtools/dom_output.h> #include <domtools/dom_wrapper.h> ! #include "unspec/epp_Weather.h" ! #include "data/epp_eppXMLbase.h" ! #include "data/epp_XMLException.h" namespace eppobject { namespace epp { class epp_UnspecTest : public epp_Extension { - public: - epp_Weather_ref m_weather; public: epp_UnspecTest() {}; virtual ~epp_UnspecTest() {}; epp_Weather_ref getResponseData() { --- 29,62 ---- #define __EPP_UNSPECTEST_H ! /** @file epp_UnspecTest.h ! * @brief Declaration of epp_UnspecTest and epp_UnspecTest_ref ! * @author Asbjorn Steira Mikkelsen ! */ ! #include <domtools/dom_output.h> #include <domtools/dom_wrapper.h> ! #include "../config.h" ! #include "epp_Weather.h" ! #include "../data/epp_eppXMLbase.h" ! #include "../data/epp_XMLException.h" namespace eppobject { namespace epp { + /// Weather test class utilizing the extension framework + /// @see epp_Extension for additional information class epp_UnspecTest : public epp_Extension { public: + epp_Weather_ref m_weather; /**< Element with server weather information/forecast */ + + /// Null constructor epp_UnspecTest() {}; + /// Destructor virtual ~epp_UnspecTest() {}; + /// Returns the #epp_Weather response data + /// @return Weather response object epp_Weather_ref getResponseData() { *************** *** 53,56 **** --- 64,69 ---- } + /// Converts the request data object (if any) to xml and returns it as an #epp_string + /// @return The request xml string virtual eppobject::epp::epp_string toXML() { *************** *** 63,66 **** --- 76,81 ---- }; + /// Converts a (response) xml string into the response data object (if any) + /// @param xml The response xml string virtual void fromXML(const eppobject::epp::epp_string & xml) { *************** *** 87,90 **** --- 102,106 ---- }; + /// Typedef for the ref to the epp_UnspecTest class typedef refcnt_ptr<epp_UnspecTest> epp_UnspecTest_ref; Index: epp_Weather.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/unspec/epp_Weather.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** epp_Weather.h 20 Feb 2002 17:26:02 -0000 1.2 --- epp_Weather.h 14 Mar 2002 18:57:51 -0000 1.3 *************** *** 29,47 **** #define __EPP_WEATHER_H #include "../data/epp_eppdata.h" namespace eppobject { namespace epp { ! class epp_Weather { - public: ! epp_string_ref m_today; ! epp_string_ref m_tomorrow; epp_Weather() {}; virtual ~epp_Weather() {}; ! // Note: Cannot set simple types to NULL epp_Weather(epp_string _m_today, epp_string _m_tomorrow) --- 29,56 ---- #define __EPP_WEATHER_H + /** @file epp_Weather.h + * @brief Definition of epp_Weather and epp_Weather_ref + * @author Asbjorn Steira Mikkelsen + */ + #include "../data/epp_eppdata.h" namespace eppobject { namespace epp { ! ! /// Class containing elements used to hold information about weather class epp_Weather { ! public: ! epp_string_ref m_today; /**< Today's weather */ ! epp_string_ref m_tomorrow; /**< Tomorrow's weather */ + /// Null constructor epp_Weather() {}; + /// Destructor virtual ~epp_Weather() {}; ! /// Constructor, using simple types when it can ! /// @note Cannot set simple types to NULL epp_Weather(epp_string _m_today, epp_string _m_tomorrow) *************** *** 51,55 **** }; ! epp_Weather(epp_string_ref _m_today, epp_string_ref _m_tomorrow) --- 60,64 ---- }; ! /// Constructor, using only references epp_Weather(epp_string_ref _m_today, epp_string_ref _m_tomorrow) *************** *** 59,63 **** }; }; ! typedef refcnt_ptr<epp_Weather> epp_Weather_ref; --- 68,73 ---- }; }; ! ! /// Typedef for the ref to the epp_Weather class typedef refcnt_ptr<epp_Weather> epp_Weather_ref; |