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: Daniel M. <tub...@us...> - 2003-07-21 15:04:54
|
Update of /cvsroot/epp-rtk/epp-rtk/c++ In directory sc8-pr-cvs1:/tmp/cvs-serv29835 Modified Files: ChangeLog Makefile.am README clean.sh configure.in Log Message: updates: - change release from 0.1.3 to 0.7.0 to sync with Java RTK - added tonnes of notes to README (from afilias README) - added release notes to ChangeLog - no more "make clean" in clean.sh Index: ChangeLog =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ChangeLog 19 Jun 2001 19:16:37 -0000 1.1 --- ChangeLog 21 Jul 2003 15:04:50 -0000 1.2 *************** *** 0 **** --- 1,12 ---- + + Release 0.7.0 -- July 21, 2003 + + - Release for EPP 07, Domain/Contact/Host 07 + and TCP 05 + - Changes to sample for (hopefully) easier usage + - Updates to code for GCC 3.x + - Updates for Xerces 1.7.0 + - Updates for OpenSSL 0.9.6 (0.9.7 is not compatible) + - Changes to configure script to have params + to help find domtools, xerces and openssl + - Paired with domtools release 1.0.6 Index: Makefile.am =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile.am 18 Jul 2003 20:37:19 -0000 1.4 --- Makefile.am 21 Jul 2003 15:04:51 -0000 1.5 *************** *** 1,4 **** PACKAGE=epp-rtk ! VERSION=0.1.3 SUBDIRS=src CLEANFILES = *~ --- 1,4 ---- PACKAGE=epp-rtk ! VERSION=0.7.0 SUBDIRS=src CLEANFILES = *~ Index: README =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/README,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** README 15 Mar 2002 17:03:03 -0000 1.7 --- README 21 Jul 2003 15:04:51 -0000 1.8 *************** *** 1,19 **** ! EPP RTK C++ ! Copyright (C) 2001, 2002 The Global Name Registry, Limited ! - What? - ----- ! This is the C++ version of the EPP RTK. It follows the 05/03 specification ! of the proposed EPP-standard. ! In order to compile the toolkit and the testprograms, you need to have the ! following installed: ! ¤ 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/) --- 1,29 ---- ! SourceForge EPP RTK C++ ! Copyright (C) 2001-2003 The Global Name Registry, Limited ! What is this? ! ------------- ! This is the C++ port of the EPP RTK. It is actually a customized release ! of the C++ EPP RTK from the epp-rtk project on SourceForge. It follows ! the 07/05 specification of the proposed EPP-standard, so it is certified ! to work with the .org registry. ! ! Only the source code is included here. It was developed using RedHat 9 ! GNU/Linux with gcc 3.2.2. In order to compile the toolkit and the ! testprograms, you need to have the following installed: ! * A C++ compiler, preferrably gcc. ! * GNU build tools (make, etc...) ! * domtools 1.0.6 (Available from http://sourceforge.net/projects/epp-rtk/) ! * OpenSSL 0.9.6* (Available from http://www.openssl.org/ ) ! NB: Versions 0.9.7* are not compatible -- the RTK was tested ! and built with release 0.9.6j ! * Xerces-C 1.7.0 (Available from ! http://xml.apache.org/dist/xerces-c/stable/archives/ ) ! NB: Versions 2.* are not compatible because the xerces api has changed. ! Versions lower than 1.7.0 might work, but this has not been tested. *************** *** 44,47 **** --- 54,123 ---- for the test programs, please run e.g., "./hello -?" after compile. + + Building instructions: + ---------------------- + + 1) Make sure OpenSSL, Xerces-C, and domtools are installed. + + 2) Run ./configure from this directory. This will search for required + dependencies in your system. Configure will look for OpenSSL headers + first in /usr/local/openssl/include, then in standard header locations + such as /usr/include. Configure will also look for Xerces-C headers + first in /usr/local/xerces/include, then in standard locations. Domtools + is assumed to be in /usr/local/domtools unless told otherwise. + + To tell configure to look in different places for OpenSSL, Xerces-C, and + domtools use these: + + ./configure --with-xerces-include=/path/to/xerces/include \ + --with-xerces-lib=/the/xerces/lib/file.so \ + --with-openssl=/path/to/openssl \ + --with-domtools=/path/to/domtools + + Xerces has two configure options because the naming of the xerces + library (.so) sometimes includes the release number. Just using + a "path to xerces" value would not have been sufficient. + + Configure also accepts a "--enable-rtk-debug" flag to turn on various + debug messages in the RTK (mostly showing the XML to and from the server). + + 3) Run "make". This will build the RTK libraries in the following locations: + + src/data/libdata.a + src/ssl/libnpssl.a + src/transport/libtransport.a + src/librtk.a + + 4) Then run "make install". This will install the RTK headers in PREFIX/include/epp-rtk, + were "PREFIX" is "/usr/local/epp-rtk" by default (use configure's --prefix=/another/path to + change this). The libraries are installed in PREFIX/lib. + + + Notes about building on specific platforms: + ------------------------------------------- + + RedHat 9 + + This distribution of GNU/Linux comes with OpenSSL 0.9.7a, which is incompatible + with the C++ EPP RTK. Installing 0.9.6* (I used "j") in /usr/local/openssl solved + the compile problems. Xerces had to be compiled from scratch because the binaries + provided at the link above are built with gcc 2.x. + + RedHat 7.3 + + Issues exist with the stock compiler provided in this distribution. It is + recommended to download gcc 2.95.x from GNU and compiling it from scratch + and installing it -- both twice to ensure a clean build of the compiler. + Xerces and OpenSSL will likely also have to be built from scratch on this + platform. Preliminary tests though have shown that with all this built + from scratch, the RTK still can't handle exceptions being thrown. If anyone + has any info to offer in this area, we'd be glad to include some notes here. + + Solaris 8 + + The Solaris machine I was using had g++ 3.2 installed. The Xerces-C Solaris binaries + from the site above did not seem to want to link. So I complied Xerces 1.7.0 from + scratch and all worked fine. + 2002.03.15: ep...@gn... Index: clean.sh =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/clean.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** clean.sh 18 Jul 2003 20:37:19 -0000 1.4 --- clean.sh 21 Jul 2003 15:04:51 -0000 1.5 *************** *** 1,5 **** #!/bin/sh - make clean rm -rf clean rm -rf src/*.o --- 1,4 ---- Index: configure.in =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/configure.in,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** configure.in 18 Jul 2003 21:07:29 -0000 1.12 --- configure.in 21 Jul 2003 15:04:51 -0000 1.13 *************** *** 1,10 **** dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.53) ! AC_INIT([epp-rtk], [0.1.3]) AC_CONFIG_SRCDIR(src/config.h) AM_INIT_AUTOMAKE(1.6.3) PACKAGE=epp-rtk ! VERSION=0.1.3 AUTOMAKE=automake AC_SUBST(PACKAGE) --- 1,10 ---- dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.53) ! AC_INIT([epp-rtk], [0.7.0]) AC_CONFIG_SRCDIR(src/config.h) AM_INIT_AUTOMAKE(1.6.3) PACKAGE=epp-rtk ! VERSION=0.7.0 AUTOMAKE=automake AC_SUBST(PACKAGE) *************** *** 41,45 **** DOMTOOLS_PATH="/usr/local/domtools" ! AC_ARG_WITH(domtools_path, [ --with-domtools-path=/path/to/domtools To specify a domtools location other than /usr/local], DOMTOOLS_PATH=$withval ) --- 41,45 ---- DOMTOOLS_PATH="/usr/local/domtools" ! AC_ARG_WITH(domtools, [ --with-domtools=/path/to/domtools To specify a domtools location other than /usr/local], DOMTOOLS_PATH=$withval ) |
From: Daniel M. <tub...@us...> - 2003-07-18 21:07:33
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src/ssl In directory sc8-pr-cvs1:/tmp/cvs-serv26504/src/ssl Modified Files: Makefile.am Log Message: change the default prefix to be /usr/local/epp-rtk change the relative installation location of the libs Index: Makefile.am =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/ssl/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.am 29 Apr 2003 21:27:27 -0000 1.5 --- Makefile.am 18 Jul 2003 21:07:30 -0000 1.6 *************** *** 1,3 **** ! pkglib_LIBRARIES = libnpssl.a exportedheaders = \ --- 1,3 ---- ! lib_LIBRARIES = libnpssl.a exportedheaders = \ |
From: Daniel M. <tub...@us...> - 2003-07-18 21:07:33
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src/data In directory sc8-pr-cvs1:/tmp/cvs-serv26504/src/data Modified Files: Makefile.am Log Message: change the default prefix to be /usr/local/epp-rtk change the relative installation location of the libs Index: Makefile.am =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.am 18 Jul 2003 20:21:19 -0000 1.10 --- Makefile.am 18 Jul 2003 21:07:30 -0000 1.11 *************** *** 1,3 **** ! pkglib_LIBRARIES = libdata.a exportedheaders = \ --- 1,3 ---- ! lib_LIBRARIES = libdata.a exportedheaders = \ |
From: Daniel M. <tub...@us...> - 2003-07-18 21:07:33
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src/transport In directory sc8-pr-cvs1:/tmp/cvs-serv26504/src/transport Modified Files: Makefile.am Log Message: change the default prefix to be /usr/local/epp-rtk change the relative installation location of the libs Index: Makefile.am =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/transport/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 12 Mar 2002 13:30:43 -0000 1.3 --- Makefile.am 18 Jul 2003 21:07:30 -0000 1.4 *************** *** 1,3 **** ! pkglib_LIBRARIES = libtransport.a exportedheaders = \ --- 1,3 ---- ! lib_LIBRARIES = libtransport.a exportedheaders = \ |
From: Daniel M. <tub...@us...> - 2003-07-18 21:07:32
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory sc8-pr-cvs1:/tmp/cvs-serv26504/src Modified Files: Makefile.am Log Message: change the default prefix to be /usr/local/epp-rtk change the relative installation location of the libs Index: Makefile.am =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile.am 18 Jul 2003 20:37:20 -0000 1.12 --- Makefile.am 18 Jul 2003 21:07:29 -0000 1.13 *************** *** 3,7 **** SUBDIRS = data ssl transport ! pkglib_LIBRARIES = libepprtk.a noinst_PROGRAMS = hello login logout poll \ --- 3,7 ---- SUBDIRS = data ssl transport ! lib_LIBRARIES = libepprtk.a noinst_PROGRAMS = hello login logout poll \ |
From: Daniel M. <tub...@us...> - 2003-07-18 21:07:32
|
Update of /cvsroot/epp-rtk/epp-rtk/c++ In directory sc8-pr-cvs1:/tmp/cvs-serv26504 Modified Files: configure.in Log Message: change the default prefix to be /usr/local/epp-rtk change the relative installation location of the libs Index: configure.in =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/configure.in,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** configure.in 18 Jul 2003 20:37:19 -0000 1.11 --- configure.in 18 Jul 2003 21:07:29 -0000 1.12 *************** *** 12,15 **** --- 12,17 ---- AC_SUBST(AUTOMAKE) + AC_PREFIX_DEFAULT(/usr/local/epp-rtk) + dnl Checks for programs. AC_PROG_INSTALL |
From: Daniel M. <tub...@us...> - 2003-07-18 20:37:24
|
Update of /cvsroot/epp-rtk/epp-rtk/c++ In directory sc8-pr-cvs1:/tmp/cvs-serv20094 Modified Files: Makefile.am clean.sh configure.in Added Files: dist.sh Removed Files: debug.sh final.sh Log Message: fixes to the build and make to create a distribution -- expecting to find domtools in /usr/local/domtools --- NEW FILE: dist.sh --- #!/bin/bash # on RedHat 7.3, two versions of autoconf # are installed, but the older version # is the default, so we have to explicitly # look for the new executable AUTOCONF_BIN=`which autoconf-2.53 2>/dev/null` if [ "$AUTOCONF_BIN" == "" ]; then AUTOCONF_BIN=autoconf fi # the default automake on RH7.3 is fine though aclocal && automake --foreign --add-missing && $AUTOCONF_BIN && ./configure && make dist Index: Makefile.am =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 12 Mar 2002 14:21:04 -0000 1.3 --- Makefile.am 18 Jul 2003 20:37:19 -0000 1.4 *************** *** 1,6 **** ! PACKAGE=epprtk ! VERSION=1.00 SUBDIRS=src CLEANFILES = *~ - EXTRA_DIST=clean.sh final.sh debug.sh - #docs/Makefile docs/docs.cfg --- 1,4 ---- ! PACKAGE=epp-rtk ! VERSION=0.1.3 SUBDIRS=src CLEANFILES = *~ Index: clean.sh =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/clean.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** clean.sh 27 May 2003 18:08:37 -0000 1.3 --- clean.sh 18 Jul 2003 20:37:19 -0000 1.4 *************** *** 2,25 **** make clean ! rm -f clean ! rm -f src/*.o ! rm -f *~ ! rm -f src/*~ rm -rf `find . -name '.deps' -print` ! rm -f src/Makefile ! rm -f src/Makefile.in ! rm -f src/data/*~ ! rm -f src/data/Makefile ! rm -f src/data/Makefile.in ! rm -f src/ssl/*~ ! rm -f src/ssl/Makefile ! rm -f src/sl/Makefile.in ! rm -f src/transport/*~ ! rm -f src/transport/Makefile ! rm -f src/transport/Makefile.in ! rm -f config.log ! rm -f config.cache ! rm -f config.status ! rm -f configure ! rm -f Makefile ! rm -f Makefile.in --- 2,31 ---- make clean ! rm -rf clean ! rm -rf src/*.o ! rm -rf *~ ! rm -rf src/*~ rm -rf `find . -name '.deps' -print` ! rm -rf src/Makefile ! rm -rf src/Makefile.in ! rm -rf src/data/*~ ! rm -rf src/data/Makefile ! rm -rf src/data/Makefile.in ! rm -rf src/ssl/*~ ! rm -rf src/ssl/Makefile ! rm -rf src/sl/Makefile.in ! rm -rf src/transport/*~ ! rm -rf src/transport/Makefile ! rm -rf src/transport/Makefile.in ! rm -rf config.log ! rm -rf config.cache ! rm -rf config.status ! rm -rf configure ! rm -rf Makefile ! rm -rf Makefile.in ! rm -rf aclocal.m4 ! rm -rf autom4te.cache ! rm -rf autoscan.log ! rm -rf configure.scan ! rm -rf src/ssl/Makefile.in ! Index: configure.in =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/configure.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** configure.in 29 Apr 2003 20:59:38 -0000 1.10 --- configure.in 18 Jul 2003 20:37:19 -0000 1.11 *************** *** 1,7 **** dnl Process this file with autoconf to produce a configure script. ! AC_INIT(src/config.h) ! PACKAGE=epprtk ! VERSION=1.00 AUTOMAKE=automake AC_SUBST(PACKAGE) --- 1,10 ---- dnl Process this file with autoconf to produce a configure script. ! AC_PREREQ(2.53) ! AC_INIT([epp-rtk], [0.1.3]) ! AC_CONFIG_SRCDIR(src/config.h) ! AM_INIT_AUTOMAKE(1.6.3) ! PACKAGE=epp-rtk ! VERSION=0.1.3 AUTOMAKE=automake AC_SUBST(PACKAGE) *************** *** 14,18 **** AC_PROG_RANLIB AC_PROG_CXX ! AC_ARG_PROGRAM dnl Checks for libraries. --- 17,26 ---- AC_PROG_RANLIB AC_PROG_CXX ! AC_SUBST(OBJEXT) ! ! AC_ARG_ENABLE(rtk_debug, ! [ --enable-rtk-debug Compilation flag to allow debugging (defines RTK_DEBUG)], ! AC_DEFINE(RTK_DEBUG,,) ! ) dnl Checks for libraries. *************** *** 29,41 **** # in RedHat9 AC_DEFINE(PERL5,,[Using this to resolve a conflict between openssl 0.9.6x and unistd.h in crypt() declaration]) ! CPPFLAGS="-I/usr/local/openssl/include -I/usr/include -I/usr/local/include/ -I/usr/local/xerces -I/usr/local/xerces/include" CXXFLAGS="--ansi -Wall -g -O2" ! #AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h) ! AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h openssl/x509.h,, AC_MSG_ERROR("Missing header - probably missing openssl")) ! AC_CHECK_HEADERS(xercesc/parsers/DOMParser.hpp xercesc/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(xercesc/dom/DOM.hpp,, AC_MSG_ERROR("Missing header - probably missing Xerces")) ! AC_CHECK_HEADERS(xercesc/util/XMLString.hpp xercesc/util/XMLUniDefs.hpp,, AC_MSG_ERROR("Missing header - probably missing Xerces")) dnl Checks for typedefs, structures, and compiler characteristics. --- 37,78 ---- # in RedHat9 AC_DEFINE(PERL5,,[Using this to resolve a conflict between openssl 0.9.6x and unistd.h in crypt() declaration]) ! ! DOMTOOLS_PATH="/usr/local/domtools" ! AC_ARG_WITH(domtools_path, [ --with-domtools-path=/path/to/domtools To specify a domtools location other than /usr/local], ! DOMTOOLS_PATH=$withval ! ) ! AC_SUBST(DOMTOOLS_PATH) ! ! XERCES_INCLUDE="/usr/local/xerces/include" ! AC_ARG_WITH(xerces_include, [ --with-xerces-include=/path/to/xerces/include To specify a xerces include other than /usr/local/xerces/include], ! XERCES_INCLUDE=$withval ! ) ! AC_SUBST(XERCES_INCLUDE) ! ! XERCES_LIB="/usr/local/xerces/lib/libxerces.so" ! AC_ARG_WITH(xerces_lib, [ --with-xerces-lib=xerces-1.x-libfile To specify a xerces lib other than /usr/local/xerces/lib/libxerces.so], ! XERCES_LIB=$withval ! ) ! AC_SUBST(XERCES_LIB) ! ! OPENSSL_PATH="/usr/local/openssl" ! AC_ARG_WITH(openssl, [ --with-openssl=/path/to/openssl To specify an OpenSSL installation other than /usr/local/openssl], ! OPENSSL_PATH=$withval ! ) ! AC_SUBST(OPENSSL_PATH) ! ! CPPFLAGS="-I$OPENSSL_PATH/include -I$XERCES_INCLUDE -I$DOMTOOLS_PATH/include" CXXFLAGS="--ansi -Wall -g -O2" ! AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h openssl/x509.h,, AC_MSG_ERROR("Missing header - probably missing openssl -- we're looking in $OPENSSL_PATH/include for headers")) ! AC_CHECK_HEADERS(domtools/domtools.h,, AC_MSG_ERROR("Missing header - probably missing domtools -- we're looking in $DOMTOOLS_PATH/include for headers")) ! AC_CHECK_HEADERS(xercesc/parsers/DOMParser.hpp xercesc/util/PlatformUtils.hpp,, AC_MSG_ERROR("Missing header - probably missing Xerces -- we're looking in $XERCES_INCLUDE for headers")) #Only here for deprecated functions: AC_CHECK_HEADERS(xercesc/dom/DOM.hpp,, AC_MSG_ERROR("Missing header - probably missing Xerces")) ! AC_CHECK_HEADERS(xercesc/util/XMLString.hpp xercesc/util/XMLUniDefs.hpp,, AC_MSG_ERROR("Missing header - probably missing Xerces -- we're looking in $XERCES_INCLUDE for headers")) ! ! AC_CHECK_FILE($XERCES_LIB,,AC_MSG_ERROR("Didn't find xerces shared lib (trying to use $XERCES_LIB)! Use --with-xerces-lib=arg to specify your own lib")) ! ! AC_CHECK_LIB(socket,shutdown,,,) ! AC_CHECK_LIB(xnet,gethostbyname,,,) dnl Checks for typedefs, structures, and compiler characteristics. --- debug.sh DELETED --- --- final.sh DELETED --- |
From: Daniel M. <tub...@us...> - 2003-07-18 20:37:23
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory sc8-pr-cvs1:/tmp/cvs-serv20094/src Modified Files: Makefile.am Log Message: fixes to the build and make to create a distribution -- expecting to find domtools in /usr/local/domtools Index: Makefile.am =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/Makefile.am,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile.am 18 Jul 2003 20:21:19 -0000 1.11 --- Makefile.am 18 Jul 2003 20:37:20 -0000 1.12 *************** *** 52,56 **** LDADD = $(common_lib) $(XERCES_LIB) -lpthread \ ! -L$(DOMTOOLS_LIB_PATH) -L$(OPENSSL_PATH)/lib -ldomtools -lssl -lcrypt -lcrypto common = \ --- 52,56 ---- LDADD = $(common_lib) $(XERCES_LIB) -lpthread \ ! -L$(DOMTOOLS_PATH)/lib -L$(OPENSSL_PATH)/lib -ldomtools -lssl -lcrypt -lcrypto common = \ |
From: Daniel M. <tub...@us...> - 2003-07-18 20:36:33
|
Update of /cvsroot/epp-rtk/epp-rtk/c++ In directory sc8-pr-cvs1:/tmp/cvs-serv19969 Removed Files: install-sh missing mkinstalldirs Log Message: this are auto-generated by dist.sh --- install-sh DELETED --- --- missing DELETED --- --- mkinstalldirs DELETED --- |
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory sc8-pr-cvs1:/tmp/cvs-serv16905 Modified Files: Makefile.am epp_ContactCheck.cc epp_ContactCreate.cc epp_ContactInfo.cc epp_ContactUpdate.cc epp_DomainCheck.cc epp_Hello.cc 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_hello.cc main_hostcheck.cc main_hostcreate.cc main_hostdelete.cc main_hostinfo.cc main_hostupdate.cc main_login.cc main_loginunspec.cc main_logout.cc main_poll.cc testTools.cc testTools.h Log Message: import of code fixes and tweeks from Afilias version of C++ RTK Index: Makefile.am =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.am 13 May 2003 22:55:50 -0000 1.10 --- Makefile.am 18 Jul 2003 20:21:19 -0000 1.11 *************** *** 1,2 **** --- 1,4 ---- + AUTOMAKE_OPTIONS = 1.6.3 + SUBDIRS = data ssl transport *************** *** 8,13 **** domaincheck domaincreate domaindelete \ domaininfo domainrenew domaintransfer domainupdate \ ! hostcheck hostcreate hostdelete hostinfo hostupdate \ ! loginunspec exportedheaders = \ --- 10,14 ---- domaincheck domaincreate domaindelete \ domaininfo domainrenew domaintransfer domainupdate \ ! hostcheck hostcreate hostdelete hostinfo hostupdate exportedheaders = \ *************** *** 50,56 **** ssl/libnpssl.a ! LDADD = $(common_lib) -L/usr/local/lib/domtools \ ! -ldomtools /usr/local/xerces/lib/libxerces.so -lpthread \ ! -L/usr/local/ssl/lib -L/usr/local/openssl/lib -lssl -lcrypt -lcrypto common = \ --- 51,56 ---- ssl/libnpssl.a ! LDADD = $(common_lib) $(XERCES_LIB) -lpthread \ ! -L$(DOMTOOLS_LIB_PATH) -L$(OPENSSL_PATH)/lib -ldomtools -lssl -lcrypt -lcrypto common = \ *************** *** 151,156 **** hostupdate_SOURCES = \ main_hostupdate.cc $(common) - - loginunspec_SOURCES = \ - main_loginunspec.cc $(common) --- 151,153 ---- Index: epp_ContactCheck.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactCheck.cc,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 Index: epp_ContactCreate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactCreate.cc,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 Index: epp_ContactInfo.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactInfo.cc,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 Index: epp_ContactUpdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_ContactUpdate.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 Index: epp_DomainCheck.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_DomainCheck.cc,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 Index: epp_Hello.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/epp_Hello.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 Index: main_contactcheck.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactcheck.cc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** main_contactcheck.cc 27 May 2003 20:16:11 -0000 1.16 --- main_contactcheck.cc 18 Jul 2003 20:21:19 -0000 1.17 *************** *** 105,109 **** --- 105,111 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 118,124 **** epp_ContactCheckReq_ref l_req(new epp_ContactCheckReq()); ! string trID; ! if(extraDataMap.empty()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 120,125 ---- epp_ContactCheckReq_ref l_req(new epp_ContactCheckReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 127,131 **** epp_string_seq_ref names(new epp_string_seq); ! if(extraDataMap.empty()) { names->push_back("sh8013"); names->push_back("sah8013"); --- 128,132 ---- epp_string_seq_ref names(new epp_string_seq); ! if(extraDataMap.find("id1") == extraDataMap.end()) { names->push_back("sh8013"); names->push_back("sah8013"); Index: main_contactcreate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactcreate.cc,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** main_contactcreate.cc 2 Jun 2003 17:35:33 -0000 1.18 --- main_contactcreate.cc 18 Jul 2003 20:21:19 -0000 1.19 *************** *** 75,80 **** string username, password; ! string extra_usage("[-extradata=trid=xxx:contact=id;auth_info;name;org;street1;street2;street3;city;state;country;postal;phone;ext;email;fax;ext]\n"); ! extra_usage.append("\tIf you included space in the contact name, org or address element,\n\tyou need to quote the entire 'contact' param"); if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 75,81 ---- string username, password; ! string extra_usage("[-extradata=trid=xxx:contact=id/auth_info/name/org/street1/street2/street3/city/state/country/postal/phone/ext/email/fax/ext]\n"); ! extra_usage.append("\tIf you included spaces in the contact name, org or address element,\n\tyou need to quote the entire 'contact' param\n"); ! extra_usage.append("\tFor optional values, just leave them empty so that the slashes are back-to-back"); if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 86,90 **** --- 87,93 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 99,110 **** epp_ContactCreateReq_ref l_req(new epp_ContactCreateReq()); ! string trID; ! if(extraDataMap["trid"] == "") trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, epp_trid(trID))); ! if( extraDataMap["contact"].empty() ) { l_req->m_id.ref(new epp_string("sh8013")); --- 102,112 ---- epp_ContactCreateReq_ref l_req(new epp_ContactCreateReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, epp_trid(trID))); ! if( extraDataMap.find("contact") == extraDataMap.end() ) { l_req->m_id.ref(new epp_string("sh8013")); *************** *** 144,148 **** --- 146,152 ---- string tmp = contactDataStr.substr(0,end); + #ifdef RTK_DEBUG cout << "The contact data string token ["<< tmp <<"]" << endl; + #endif contactData.push_back(tmp); *************** *** 152,156 **** contactData.push_back(contactDataStr); ! while ( contactData.size() != 16 ) contactData.push_back(""); --- 156,160 ---- contactData.push_back(contactDataStr); ! while ( contactData.size() < 16 ) contactData.push_back(""); Index: main_contactdelete.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactdelete.cc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** main_contactdelete.cc 30 May 2003 19:11:20 -0000 1.16 --- main_contactdelete.cc 18 Jul 2003 20:21:19 -0000 1.17 *************** *** 71,75 **** --- 71,77 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 84,90 **** epp_ContactDeleteReq_ref l_req(new epp_ContactDeleteReq()); ! string trID; ! if(extraDataMap["trid"] == "") trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 86,91 ---- epp_ContactDeleteReq_ref l_req(new epp_ContactDeleteReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, Index: main_contactinfo.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactinfo.cc,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** main_contactinfo.cc 30 May 2003 19:11:21 -0000 1.18 --- main_contactinfo.cc 18 Jul 2003 20:21:19 -0000 1.19 *************** *** 206,220 **** string username, password; ! if(!handleArgs(test, argc, argv, username, password)) return 1; ! map<unsigned 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); } } --- 206,224 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:id=abc]"; ! if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; ! map<string,string> extraDataMap; if(argc > 1) { for(int parm = 1; parm < argc; parm++) { ! if (!strncmp(argv[parm], "-extradata=", 11)) { ! #ifdef RTK_DEBUG ! cout << "Found extra data param..." << endl; ! #endif ! string td = &argv[parm][11]; ! extraDataMap = getExtraDataMap(td); } } *************** *** 227,242 **** 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, 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])); } --- 231,245 ---- epp_ContactInfoReq_ref l_req(new epp_ContactInfoReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, epp_trid(trID))); ! if(extraDataMap.find("id") == extraDataMap.end()) { l_req->m_id.ref(new epp_string("sh8013")); } else { ! l_req->m_id.ref(new epp_string(extraDataMap["id"])); } Index: main_contacttransfer.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contacttransfer.cc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** main_contacttransfer.cc 2 Jun 2003 19:12:59 -0000 1.16 --- main_contacttransfer.cc 18 Jul 2003 20:21:19 -0000 1.17 *************** *** 91,95 **** string username, password; ! string extra_usage = "[-extradata=trid=xxx:id=abc:op=(query|request|cancel|approve|reject):authinfo:xyz]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 91,95 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:id=abc:op=(query|request|cancel|approve|reject):authinfo:pw/xyz]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 101,105 **** --- 101,107 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 114,120 **** epp_ContactTransferReq_ref l_req(new epp_ContactTransferReq()); ! string trID; ! if(extraDataMap["trid"] == "") trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 116,121 ---- epp_ContactTransferReq_ref l_req(new epp_ContactTransferReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 143,149 **** l_req->m_trans->m_auth_info->m_value.ref(new epp_string("2fooBAR")); } else if ( ! extraDataMap["authinfo"].empty() ) { ! l_req->m_trans->m_auth_info.ref(new epp_AuthInfo()); ! l_req->m_trans->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! l_req->m_trans->m_auth_info->m_value.ref(new epp_string(extraDataMap["authinfo"])); } --- 144,158 ---- l_req->m_trans->m_auth_info->m_value.ref(new epp_string("2fooBAR")); } else if ( ! extraDataMap["authinfo"].empty() ) { ! string authinfo = extraDataMap["authinfo"]; ! string type, value; ! unsigned int sep = authinfo.find("/"); ! if ( sep != string::npos ) { ! type = authinfo.substr(0,sep); ! value = authinfo.substr(sep+1); ! l_req->m_trans->m_auth_info.ref(new epp_AuthInfo()); ! if ( type == "pw" ) l_req->m_trans->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! if ( type == "ext" ) l_req->m_trans->m_auth_info->m_type.ref(new epp_AuthInfoType(EXT)); ! l_req->m_trans->m_auth_info->m_value.ref(new epp_string(value)); ! } } Index: main_contactupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactupdate.cc,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** main_contactupdate.cc 3 Jun 2003 15:03:55 -0000 1.18 --- main_contactupdate.cc 18 Jul 2003 20:21:19 -0000 1.19 *************** *** 65,71 **** vector<string> extra_usage; extra_usage.push_back("[-extradata=trid=xxx:id=abc"); ! extra_usage.push_back(" -add=status1=aaa:status2=bbb{:...}"); ! extra_usage.push_back(" -remove=status1=ccc:status2=ddd{:...}"); ! extra_usage.push_back(" -change=name=Johnny:org=ACME:authinfo=123123{:...}]"); if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 65,72 ---- vector<string> extra_usage; extra_usage.push_back("[-extradata=trid=xxx:id=abc"); ! extra_usage.push_back(" -add=status1=aaa:status2=bbb/reason{:...}"); ! extra_usage.push_back(" -remove=status1=ccc/reason:status2=ddd{:...}"); ! extra_usage.push_back(" -change=name=Johnny:org=ACME:authinfo=pw/123123{:...}]"); ! extra_usage.push_back("If you include spaces in the status reason, you need to quote the entire 'add' or 'remove' param"); if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 80,84 **** --- 81,87 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 86,90 **** --- 89,95 ---- if (!strncmp(argv[parm], "-add=", 5)) { + #ifdef RTK_DEBUG cout << "Found 'add' data param..." << endl; + #endif string td = &argv[parm][5]; addDataMap = getExtraDataMap(td); *************** *** 92,96 **** --- 97,103 ---- if (!strncmp(argv[parm], "-change=", 8)) { + #ifdef RTK_DEBUG cout << "Found 'change' data param..." << endl; + #endif string td = &argv[parm][8]; changeDataMap = getExtraDataMap(td); *************** *** 98,102 **** --- 105,111 ---- if (!strncmp(argv[parm], "-remove=", 8)) { + #ifdef RTK_DEBUG cout << "Found 'remove' data param..." << endl; + #endif string td = &argv[parm][8]; removeDataMap = getExtraDataMap(td); *************** *** 111,117 **** epp_ContactUpdateReq_ref l_req(new epp_ContactUpdateReq()); ! string trID; ! if(extraDataMap["trid"] == "") trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 120,125 ---- epp_ContactUpdateReq_ref l_req(new epp_ContactUpdateReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 171,175 **** epp_ContactStatus status; ! status.m_type.ref(new epp_ContactStatusType(returnStatusEnumType(tmp))); l_req->m_add->m_status->push_back(status); --- 179,194 ---- epp_ContactStatus status; ! ! string type, value; ! unsigned int sep = tmp.find("/"); ! if ( sep != string::npos ) { ! type = tmp.substr(0,sep); ! value = tmp.substr(sep+1); ! cout << "type ["<<type<<"] value ["<<value<<"]\n"; ! status.m_type.ref(new epp_ContactStatusType(returnStatusEnumType(type))); ! status.m_value.ref(new epp_string(value)); ! } else { ! status.m_type.ref(new epp_ContactStatusType(returnStatusEnumType(tmp))); ! } l_req->m_add->m_status->push_back(status); *************** *** 194,198 **** epp_ContactStatus status; ! status.m_type.ref(new epp_ContactStatusType(returnStatusEnumType(tmp))); l_req->m_remove->m_status->push_back(status); --- 213,228 ---- epp_ContactStatus status; ! ! string type, value; ! unsigned int sep = tmp.find("/"); ! if ( sep != string::npos ) { ! type = tmp.substr(0,sep); ! value = tmp.substr(sep+1); ! cout << "type ["<<type<<"] value ["<<value<<"]\n"; ! status.m_type.ref(new epp_ContactStatusType(returnStatusEnumType(type))); ! status.m_value.ref(new epp_string(value)); ! } else { ! status.m_type.ref(new epp_ContactStatusType(returnStatusEnumType(tmp))); ! } l_req->m_remove->m_status->push_back(status); *************** *** 208,214 **** if(changeDataMap.find("authinfo") != changeDataMap.end()) { ! 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(changeDataMap["authinfo"])); } --- 238,252 ---- if(changeDataMap.find("authinfo") != changeDataMap.end()) { ! string authinfo = changeDataMap["authinfo"]; ! string type, value; ! unsigned int sep = authinfo.find("/"); ! if ( sep != string::npos ) { ! type = authinfo.substr(0,sep); ! value = authinfo.substr(sep+1); ! l_req->m_change->m_auth_info.ref(new epp_AuthInfo()); ! if ( type == "pw" ) l_req->m_change->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! if ( type == "ext" ) l_req->m_change->m_auth_info->m_type.ref(new epp_AuthInfoType(EXT)); ! l_req->m_change->m_auth_info->m_value.ref(new epp_string(value)); ! } } Index: main_domaincheck.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domaincheck.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** main_domaincheck.cc 2 Jun 2003 17:41:04 -0000 1.14 --- main_domaincheck.cc 18 Jul 2003 20:21:19 -0000 1.15 *************** *** 92,96 **** string username, password; ! string extra_usage = "[-extradata=trid=xxx:name1=abc:name2=def:...]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 92,96 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:domain1=abc:domain2=def:...]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 102,106 **** --- 102,108 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 115,121 **** epp_DomainCheckReq_ref l_req(new epp_DomainCheckReq()); ! string trID; ! if(extraDataMap.empty()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 117,122 ---- epp_DomainCheckReq_ref l_req(new epp_DomainCheckReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 125,129 **** epp_string_seq_ref names(new epp_string_seq()); ! if(extraDataMap.find("name1") == extraDataMap.end()) { names->push_back("example1.com"); names->push_back("example2.com"); --- 126,130 ---- epp_string_seq_ref names(new epp_string_seq()); ! if(extraDataMap.find("domain1") == extraDataMap.end()) { names->push_back("example1.com"); names->push_back("example2.com"); *************** *** 133,137 **** char key[7]; for(unsigned int n = 1; n <= 30; n++) { ! sprintf(key,"name%d",n); if ( extraDataMap[key].empty() ) break; names->push_back(extraDataMap[key]); --- 134,138 ---- char key[7]; for(unsigned int n = 1; n <= 30; n++) { ! sprintf(key,"domain%d",n); if ( extraDataMap[key].empty() ) break; names->push_back(extraDataMap[key]); Index: main_domaincreate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domaincreate.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** main_domaincreate.cc 2 Jun 2003 17:46:16 -0000 1.14 --- main_domaincreate.cc 18 Jul 2003 20:21:19 -0000 1.15 *************** *** 77,81 **** string username, password; ! string extra_usage = "[-extradata=trid=xxx:name=abc.tld:period=1:ns1=asdf:ns2=asdf{:...}:reg=abc:contact1=t;abc{:...}:authinfo=pw;38239]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 77,81 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:domain=abc.tld:period=1:ns1=asdf:ns2=asdf{:...}:reg=abc:contact1=t/abc{:...}:authinfo=pw/38239]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 87,91 **** --- 87,93 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 100,106 **** epp_DomainCreateReq_ref l_req(new epp_DomainCreateReq()); ! string trID; ! if(extraDataMap.empty()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 102,107 ---- epp_DomainCreateReq_ref l_req(new epp_DomainCreateReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, Index: main_domaindelete.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domaindelete.cc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** main_domaindelete.cc 2 Jun 2003 17:50:02 -0000 1.13 --- main_domaindelete.cc 18 Jul 2003 20:21:19 -0000 1.14 *************** *** 61,65 **** string username, password; ! string extra_usage = "[-extradata=trid=xxx:name=abc.tld"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 61,65 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:domain=abc.tld"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 71,75 **** --- 71,77 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 84,90 **** epp_DomainDeleteReq_ref l_req(new epp_DomainDeleteReq()); ! string trID; ! if(extraDataMap.empty()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 86,91 ---- epp_DomainDeleteReq_ref l_req(new epp_DomainDeleteReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, Index: main_domaininfo.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domaininfo.cc,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** main_domaininfo.cc 2 Jun 2003 18:41:24 -0000 1.15 --- main_domaininfo.cc 18 Jul 2003 20:21:19 -0000 1.16 *************** *** 186,190 **** string username, password; ! string extra_usage = "[-extradata=trid=xxx:name=abc.tld"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 186,190 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:domain=abc.tld"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 196,200 **** --- 196,202 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 209,215 **** epp_DomainInfoReq_ref l_req(new epp_DomainInfoReq()); ! string trID; ! if(extraDataMap.empty()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new eppobject::epp::epp_Command(NULL, --- 211,216 ---- epp_DomainInfoReq_ref l_req(new epp_DomainInfoReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new eppobject::epp::epp_Command(NULL, Index: main_domainrenew.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domainrenew.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** main_domainrenew.cc 2 Jun 2003 18:51:04 -0000 1.14 --- main_domainrenew.cc 18 Jul 2003 20:21:19 -0000 1.15 *************** *** 73,77 **** string username, password; ! string extra_usage = "[-extradata=trid=xxx:name=abc.tld:period=1"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 73,77 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:domain=abc.tld:exp=yyyy-mm-dd:period=1"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 83,87 **** --- 83,89 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 96,102 **** epp_DomainRenewReq_ref l_req(new epp_DomainRenewReq()); ! string trID; ! if(extraDataMap.empty()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 98,103 ---- epp_DomainRenewReq_ref l_req(new epp_DomainRenewReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, Index: main_domaintransfer.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domaintransfer.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** main_domaintransfer.cc 2 Jun 2003 19:13:18 -0000 1.14 --- main_domaintransfer.cc 18 Jul 2003 20:21:19 -0000 1.15 *************** *** 94,98 **** string username, password; ! string extra_usage = "[-extradata=trid=xxx:name=abc.tld:authinfo=123123:period=1"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 94,98 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:domain=abc.tld:op=(query|request|cancel|approve|reject):authinfo=pw/123123:period=1]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 104,108 **** --- 104,110 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 117,123 **** epp_DomainTransferReq_ref l_req(new epp_DomainTransferReq()); ! string trID; ! if ( extraDataMap.find("trid") == extraDataMap.end() ) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 119,124 ---- epp_DomainTransferReq_ref l_req(new epp_DomainTransferReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 147,153 **** l_req->m_trans->m_auth_info->m_value.ref(new epp_string("2fooBAR")); } else if ( ! extraDataMap["authinfo"].empty() ) { ! l_req->m_trans->m_auth_info.ref(new epp_AuthInfo()); ! l_req->m_trans->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! l_req->m_trans->m_auth_info->m_value.ref(new epp_string(extraDataMap["authinfo"])); } --- 148,162 ---- l_req->m_trans->m_auth_info->m_value.ref(new epp_string("2fooBAR")); } else if ( ! extraDataMap["authinfo"].empty() ) { ! string authinfo = extraDataMap["authinfo"]; ! string type, value; ! unsigned int sep = authinfo.find("/"); ! if ( sep != string::npos ) { ! type = authinfo.substr(0,sep); ! value = authinfo.substr(sep+1); ! l_req->m_trans->m_auth_info.ref(new epp_AuthInfo()); ! if ( type == "pw" ) l_req->m_trans->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! if ( type == "ext" ) l_req->m_trans->m_auth_info->m_type.ref(new epp_AuthInfoType(EXT)); ! l_req->m_trans->m_auth_info->m_value.ref(new epp_string(value)); ! } } Index: main_domainupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domainupdate.cc,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** main_domainupdate.cc 3 Jun 2003 15:03:56 -0000 1.17 --- main_domainupdate.cc 18 Jul 2003 20:21:19 -0000 1.18 *************** *** 65,71 **** vector<string> extra_usage; extra_usage.push_back("[-extradata=trid=xxx:domain=abc"); ! extra_usage.push_back(" -add=status1=aaa{:...}:ns1=222{:...}"); ! extra_usage.push_back(" -remove=status1=ccc{:...}:ns1=111{:...}"); ! extra_usage.push_back(" -change=authinfo=123123]"); if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 65,72 ---- vector<string> extra_usage; extra_usage.push_back("[-extradata=trid=xxx:domain=abc"); ! extra_usage.push_back(" -add=status1=aaa/reason{:...}:ns1=222{:...}:contact1=t/abc123{:...}"); ! extra_usage.push_back(" -remove=status1=ccc/reason{:...}:ns1=111{:...}:contact1=a/abc987{:...}"); ! extra_usage.push_back(" -change=authinfo=pw/123123]"); ! extra_usage.push_back("\tIf you included spaces in the status reason, you need to quote the entire 'add' or 'remove' param"); if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 80,84 **** --- 81,87 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 86,90 **** --- 89,95 ---- if (!strncmp(argv[parm], "-add=", 5)) { + #ifdef RTK_DEBUG cout << "Found 'add' data param..." << endl; + #endif string td = &argv[parm][5]; addDataMap = getExtraDataMap(td); *************** *** 93,97 **** --- 98,104 ---- if (!strncmp(argv[parm], "-change=", 8)) { + #ifdef RTK_DEBUG cout << "Found 'change' data param..." << endl; + #endif string td = &argv[parm][9]; changeDataMap = getExtraDataMap(td); *************** *** 100,104 **** --- 107,113 ---- if (!strncmp(argv[parm], "-remove=", 8)) { + #ifdef RTK_DEBUG cout << "Found 'remove' data param..." << endl; + #endif string td = &argv[parm][8]; removeDataMap = getExtraDataMap(td); *************** *** 114,120 **** epp_DomainUpdateReq_ref l_req(new epp_DomainUpdateReq()); ! string trID; ! if(extraDataMap.find("trid") == extraDataMap.end()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 123,128 ---- epp_DomainUpdateReq_ref l_req(new epp_DomainUpdateReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 174,180 **** epp_DomainStatus status; ! status.m_type.ref(new epp_DomainStatusType(returnStatusEnumType(tmp))); l_req->m_add->m_status->push_back(status); status_number++; sprintf(status_name, "status%d", status_number); --- 182,200 ---- epp_DomainStatus status; ! ! string type, value; ! unsigned int sep = tmp.find("/"); ! if ( sep != string::npos ) { ! type = tmp.substr(0,sep); ! value = tmp.substr(sep+1); ! cout << "type ["<<type<<"] value ["<<value<<"]\n"; ! status.m_type.ref(new epp_DomainStatusType(returnStatusEnumType(type))); ! status.m_value.ref(new epp_string(value)); ! } else { ! status.m_type.ref(new epp_DomainStatusType(returnStatusEnumType(tmp))); ! } l_req->m_add->m_status->push_back(status); + status_number++; sprintf(status_name, "status%d", status_number); *************** *** 239,243 **** epp_DomainStatus status; ! status.m_type.ref(new epp_DomainStatusType(returnStatusEnumType(tmp))); l_req->m_remove->m_status->push_back(status); --- 259,273 ---- epp_DomainStatus status; ! string type, value; ! unsigned int sep = tmp.find("/"); ! if ( sep != string::npos ) { ! type = tmp.substr(0,sep); ! value = tmp.substr(sep+1); ! cout << "type ["<<type<<"] value ["<<value<<"]\n"; ! status.m_type.ref(new epp_DomainStatusType(returnStatusEnumType(type))); ! status.m_value.ref(new epp_string(value)); ! } else { ! status.m_type.ref(new epp_DomainStatusType(returnStatusEnumType(tmp))); ! } l_req->m_remove->m_status->push_back(status); *************** *** 295,301 **** if(changeDataMap.find("authinfo") != changeDataMap.end()) { ! 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(changeDataMap["authinfo"])); } --- 325,339 ---- if(changeDataMap.find("authinfo") != changeDataMap.end()) { ! string authinfo = changeDataMap["authinfo"]; ! string type, value; ! unsigned int sep = authinfo.find("/"); ! if ( sep != string::npos ) { ! type = authinfo.substr(0,sep); ! value = authinfo.substr(sep+1); ! l_req->m_change->m_auth_info.ref(new epp_AuthInfo()); ! if ( type == "pw" ) l_req->m_change->m_auth_info->m_type.ref(new epp_AuthInfoType(PW)); ! if ( type == "ext" ) l_req->m_change->m_auth_info->m_type.ref(new epp_AuthInfoType(EXT)); ! l_req->m_change->m_auth_info->m_value.ref(new epp_string(value)); ! } } Index: main_hello.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hello.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 Index: main_hostcheck.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostcheck.cc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** main_hostcheck.cc 2 Jun 2003 21:24:25 -0000 1.13 --- main_hostcheck.cc 18 Jul 2003 20:21:19 -0000 1.14 *************** *** 92,96 **** string username, password; ! string extra_usage = "[-extradata=trid=xxx:name1=abc:name2=def:...]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 92,96 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:host1=abc:host2=def:...]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 102,106 **** --- 102,108 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 115,121 **** epp_HostCheckReq_ref l_req(new epp_HostCheckReq()); ! string trID; ! if(extraDataMap.find("trid") == extraDataMap.end()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 117,122 ---- epp_HostCheckReq_ref l_req(new epp_HostCheckReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 125,129 **** epp_string_seq_ref names(new epp_string_seq()); ! if(extraDataMap.find("name1") == extraDataMap.end()) { names->push_back("ns1.example.com"); names->push_back("ns2.example.com"); --- 126,130 ---- epp_string_seq_ref names(new epp_string_seq()); ! if(extraDataMap.find("host1") == extraDataMap.end()) { names->push_back("ns1.example.com"); names->push_back("ns2.example.com"); *************** *** 133,137 **** char key[7]; for(unsigned int n = 1; n <= 30; n++) { ! sprintf(key,"name%d",n); if ( extraDataMap[key].empty() ) break; names->push_back(extraDataMap[key]); --- 134,138 ---- char key[7]; for(unsigned int n = 1; n <= 30; n++) { ! sprintf(key,"host%d",n); if ( extraDataMap[key].empty() ) break; names->push_back(extraDataMap[key]); Index: main_hostcreate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostcreate.cc,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** main_hostcreate.cc 2 Jun 2003 21:24:25 -0000 1.15 --- main_hostcreate.cc 18 Jul 2003 20:21:19 -0000 1.16 *************** *** 78,82 **** string username, password; ! string extra_usage = "[-extradata=trid=xxx~name=abc~ip1=v4/1.2.3.4~ip2=v6/1080:0:0:0:8:800:200C:417A{~...}]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 78,84 ---- string username, password; ! vector<string> extra_usage; ! extra_usage.push_back("[-extradata=trid=xxx~host=abc~ip1=v4/1.2.3.4~ip2=v6/1080:0:0:0:8:800:200C:417A{~...}]"); ! extra_usage.push_back("Note the use of '~' to separate keys and value, unlike the ':' from other examples"); if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 88,92 **** --- 90,96 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 101,107 **** epp_HostCreateReq_ref l_req(new epp_HostCreateReq()); ! string trID; ! if(extraDataMap.find("trid") == extraDataMap.end()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 105,110 ---- epp_HostCreateReq_ref l_req(new epp_HostCreateReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 109,119 **** epp_trid(trID))); ! if ( extraDataMap.find("name") == extraDataMap.end() ) { l_req->m_name.ref(new epp_string("ns1.example.com")); - } else { - l_req->m_name.ref(new epp_string(extraDataMap["name"])); - } - if ( extraDataMap.find("ip1") == extraDataMap.end() ) { epp_HostAddress host1(IPV4, epp_string("192.1.2.3")); epp_HostAddress host2(IPV4, epp_string("198.1.2.3")); --- 112,118 ---- epp_trid(trID))); ! if ( extraDataMap.find("host") == extraDataMap.end() ) { l_req->m_name.ref(new epp_string("ns1.example.com")); epp_HostAddress host1(IPV4, epp_string("192.1.2.3")); epp_HostAddress host2(IPV4, epp_string("198.1.2.3")); *************** *** 129,133 **** --- 128,137 ---- l_req->m_addresses = ipadr; + } else { + l_req->m_name.ref(new epp_string(extraDataMap["host"])); + } + + if ( extraDataMap.find("ip1") != extraDataMap.end() ) { epp_host_address_seq_ref ipadr(new epp_host_address_seq); Index: main_hostdelete.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostdelete.cc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** main_hostdelete.cc 2 Jun 2003 21:24:25 -0000 1.13 --- main_hostdelete.cc 18 Jul 2003 20:21:19 -0000 1.14 *************** *** 62,66 **** string username, password; ! string extra_usage = "[-extradata=trid=xxx:name=abc]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 62,66 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:host=abc]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 72,76 **** --- 72,78 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 85,91 **** epp_HostDeleteReq_ref l_req(new epp_HostDeleteReq()); ! string trID; ! if(extraDataMap.find("trid") == extraDataMap.end()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 87,92 ---- epp_HostDeleteReq_ref l_req(new epp_HostDeleteReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 93,101 **** epp_trid(trID))); ! if(extraDataMap.find("name") == extraDataMap.end()) { l_req->m_name.ref(new epp_string("ns1.example.com")); } else { ! l_req->m_name.ref(new epp_string(extraDataMap["name"])); } --- 94,102 ---- epp_trid(trID))); ! if(extraDataMap.find("host") == extraDataMap.end()) { l_req->m_name.ref(new epp_string("ns1.example.com")); } else { ! l_req->m_name.ref(new epp_string(extraDataMap["host"])); } Index: main_hostinfo.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostinfo.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** main_hostinfo.cc 2 Jun 2003 21:24:25 -0000 1.14 --- main_hostinfo.cc 18 Jul 2003 20:21:19 -0000 1.15 *************** *** 133,137 **** string username, password; ! string extra_usage = "[-extradata=trid=xxx:name=abc]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 133,137 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:host=abc]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 143,147 **** --- 143,149 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 156,162 **** epp_HostInfoReq_ref l_req(new epp_HostInfoReq()); ! string trID; ! if(extraDataMap.find("trid") == extraDataMap.end()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 158,163 ---- epp_HostInfoReq_ref l_req(new epp_HostInfoReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 164,172 **** epp_trid(trID))); ! if(extraDataMap.find("name") == extraDataMap.end()) { l_req->m_name.ref(new epp_string("ns1.example.com")); } else { ! l_req->m_name.ref(new epp_string(extraDataMap["name"])); } --- 165,173 ---- epp_trid(trID))); ! if(extraDataMap.find("host") == extraDataMap.end()) { l_req->m_name.ref(new epp_string("ns1.example.com")); } else { ! l_req->m_name.ref(new epp_string(extraDataMap["host"])); } Index: main_hostupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostupdate.cc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** main_hostupdate.cc 3 Jun 2003 15:03:27 -0000 1.16 --- main_hostupdate.cc 18 Jul 2003 20:21:19 -0000 1.17 *************** *** 64,71 **** vector<string> extra_usage; ! extra_usage.push_back("[-extradata=trid=xxx:name=ns1.host.tld"); ! extra_usage.push_back(" -add=status1=aaa{~...}~ip1=v4/1.2.3.4~ip2=v6/1080:0:0:0:8:800:200C:417A{~...}"); ! extra_usage.push_back(" -remove=status1=ccc{~...}~ip1=v4/1.2.3.4~ip2=v6/1080:0:0:0:8:800:200C:417A{~...}"); ! extra_usage.push_back(" -change=name=new.host.tld]"); if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 64,73 ---- vector<string> extra_usage; ! extra_usage.push_back("[-extradata=trid=xxx:host=ns1.host.tld"); ! extra_usage.push_back(" -add=status1=aaa/reason{~...}~ip1=v4/1.2.3.4~ip2=v6/1080:0:0:0:8:800:200C:417A{~...}"); ! extra_usage.push_back(" -remove=status1=ccc/reason{~...}~ip1=v4/1.2.3.4~ip2=v6/1080:0:0:0:8:800:200C:417A{~...}"); ! extra_usage.push_back(" -change=host=new.host.tld]"); ! extra_usage.push_back("Note the use of '~' to separate keys and value, unlike the ':' from other examples"); ! extra_usage.push_back("If you include spaces in the status reason, you need to quote the entire 'add' or 'remove' param"); if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 80,84 **** --- 82,88 ---- if (!strncmp(argv[parm], "-extradata=", 11)) { + #ifdef RTK_DEBUG cout << "Found extra data param..." << endl; + #endif string td = &argv[parm][11]; extraDataMap = getExtraDataMap(td); *************** *** 86,90 **** --- 90,96 ---- if (!strncmp(argv[parm], "-add=", 5)) { + #ifdef RTK_DEBUG cout << "Found 'add' data param..." << endl; + #endif string td = &argv[parm][5]; addDataMap = getExtraDataMap(td); *************** *** 93,97 **** --- 99,105 ---- if (!strncmp(argv[parm], "-change=", 8)) { + #ifdef RTK_DEBUG cout << "Found 'change' data param..." << endl; + #endif string td = &argv[parm][8]; changeDataMap = getExtraDataMap(td); *************** *** 100,104 **** --- 108,114 ---- if (!strncmp(argv[parm], "-remove=", 8)) { + #ifdef RTK_DEBUG cout << "Found 'remove' data param..." << endl; + #endif string td = &argv[parm][8]; removeDataMap = getExtraDataMap(td); *************** *** 114,120 **** epp_HostUpdateReq_ref l_req(new epp_HostUpdateReq()); ! string trID; ! if(extraDataMap.find("trid") == extraDataMap.end()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, --- 124,129 ---- epp_HostUpdateReq_ref l_req(new epp_HostUpdateReq()); ! string trID = "ABC-12345"; ! if(extraDataMap.find("trid") != extraDataMap.end()) trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 123,128 **** ! if ( extraDataMap.find("name") == extraDataMap.end() ) l_req->m_name.ref(new epp_string("ns1.example.com")); ! else l_req->m_name.ref(new epp_string(extraDataMap["name"])); if( addDataMap.empty() && --- 132,137 ---- ! if ( extraDataMap.find("host") == extraDataMap.end() ) l_req->m_name.ref(new epp_string("ns1.example.com")); ! else l_req->m_name.ref(new epp_string(extraDataMap["host"])); if( addDataMap.empty() && *************** *** 178,182 **** epp_HostStatus status; ! status.m_type.ref(new epp_HostStatusType(returnStatusEnumType(tmp))); l_req->m_add->m_status->push_back(status); --- 187,201 ---- epp_HostStatus status; ! string type, value; ! unsigned int sep = tmp.find("/"); ! if ( sep != string::npos ) { ! type = tmp.substr(0,sep); ! value = tmp.substr(sep+1); ! cout << "type ["<<type<<"] value ["<<value<<"]\n"; ! status.m_type.ref(new epp_HostStatusType(returnStatusEnumType(type))); ! status.m_value.ref(new epp_string(value)); ! } else { ! status.m_type.ref(new epp_HostStatusType(returnStatusEnumType(tmp))); ! } l_req->m_add->m_status->push_back(status); *************** *** 228,232 **** epp_HostStatus status; ! status.m_type.ref(new epp_HostStatusType(returnStatusEnumType(tmp))); l_req->m_remove->m_status->push_back(status); --- 247,261 ---- epp_HostStatus status; ! string type, value; ! unsigned int sep = tmp.find("/"); ! if ( sep != string::npos ) { ! type = tmp.substr(0,sep); ! value = tmp.substr(sep+1); ! cout << "type ["<<type<<"] value ["<<value<<"]\n"; ! status.m_type.ref(new epp_HostStatusType(returnStatusEnumType(type))); ! status.m_value.ref(new epp_string(value)); ! } else { ! status.m_type.ref(new epp_HostStatusType(returnStatusEnumType(tmp))); ! } l_req->m_remove->m_status->push_back(status); *************** *** 266,271 **** l_req->m_change.ref(new epp_HostUpdateChange()); ! if(changeDataMap.find("name") != changeDataMap.end()) { ! l_req->m_change->m_name.ref(new epp_string(changeDataMap["name"])); } --- 295,300 ---- l_req->m_change.ref(new epp_HostUpdateChange()); ! if(changeDataMap.find("host") != changeDataMap.end()) { ! l_req->m_change->m_name.ref(new epp_string(changeDataMap["host"])); } Index: main_login.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_login.cc,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 Index: main_loginunspec.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_loginunspec.cc,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 Index: main_logout.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_logout.cc,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 Index: main_poll.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_poll.cc,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 Index: testTools.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/testTools.cc,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** testTools.cc 3 Jun 2003 19:08:08 -0000 1.25 --- testTools.cc 18 Jul 2003 20:21:19 -0000 1.26 *************** *** 37,40 **** --- 37,41 ---- #include <map> #include "testTools.h" + #include "data/epp_Exception.h" #include "data/epp_XMLException.h" #include "data/epp_LoginReq.h" *************** *** 256,260 **** // <FIXME>Bug: -ca must include full path to file...</fixme> cout << endl; ! cout << prognamespaces << " -c=<cert> [-cadir=<cacertdir> -ca=<cacert>]"; } --- 257,261 ---- // <FIXME>Bug: -ca must include full path to file...</fixme> cout << endl; ! cout << prognamespaces << " -c=<keycert-pem> [-cadir=<cacertdir> -ca=<cacert-pem>]"; } *************** *** 428,431 **** --- 429,446 ---- exit(1); } + catch(const epp_XMLException & ex) { + cout << "Exception: " << ex.getString() << endl; + exit(1); + } + catch(const epp_Exception & ex) { + cout << "Exception: " << endl; + #ifndef TEST_IO_REQUEST2CERR + cerr << "<response>" << endl; + printResultsSeq(ex.m_details); + printTransID(ex.m_trans_id); + cerr << "</response>" << endl; + #endif + exit(1); + } catch(...) { cout << "Not able to login...\n"; *************** *** 439,445 **** cerr << "<resData>" << endl; cerr << "<" << object << ":" << returntype << endl; ! cerr << "xmlns:" << object << "=\"urn:ietf:params:xml:ns:" << object << "-1.0\"" << endl; ! cerr << "xsi:schemaLocation=\"urn:ietf:params:xml:ns:" << object << "-1.0" << endl; ! cerr << object << "-1.0.xsd\">" << endl; } // printResDataHeaders --- 454,460 ---- cerr << "<resData>" << endl; cerr << "<" << object << ":" << returntype << endl; ! cerr << "\txmlns:" << object << "=\"urn:ietf:params:xml:ns:" << object << "-1.0\"" << endl; ! cerr << "\txsi:schemaLocation=\"urn:ietf:params:xml:ns:" << object << "-1.0" << endl; ! cerr << "\t" << object << "-1.0.xsd\">" << endl; } // printResDataHeaders Index: testTools.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/testTools.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 |
Update of /cvsroot/epp-rtk/epp-rtk/c++/src/data In directory sc8-pr-cvs1:/tmp/cvs-serv16905/data Modified Files: Makefile.am epp_Command.h epp_ContactCreateReq.h epp_ContactInfoRsp.h epp_ContactNameAddress.cc epp_ContactNameAddress.h epp_DataCollectionPolicy.cc epp_DataCollectionPolicy.h epp_Exception.cc epp_Exception.h epp_ExtMessage.cc epp_ExtMessage.h epp_ExtResultValue.cc epp_ExtResultValue.h epp_LogoutReq.h epp_MessageQueue.cc epp_MessageQueue.h epp_Response.cc epp_Response.h epp_Result.cc epp_Result.h epp_ResultValue.cc epp_ResultValue.h epp_TransID.cc epp_TransID.h epp_contactXMLbase.cc epp_contactXMLbase.h epp_contactdata.h epp_eppXMLbase.cc epp_eppXMLbase.h epp_eppdata.h Log Message: import of code fixes and tweeks from Afilias version of C++ RTK Index: Makefile.am =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile.am 3 Jun 2003 19:00:15 -0000 1.9 --- Makefile.am 18 Jul 2003 20:21:19 -0000 1.10 *************** *** 5,8 **** --- 5,9 ---- epp_CheckResult.h \ epp_Command.h \ + epp_Credentials.h \ epp_ContactAddress.h \ epp_ContactCheckReq.h \ Index: epp_Command.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_Command.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** epp_Command.h 2 Jun 2003 15:42:26 -0000 1.12 --- epp_Command.h 18 Jul 2003 20:21:19 -0000 1.13 *************** *** 45,49 **** public: ! epp_extension_seq_ref m_extentions; /**< Extension elements used for server-defined command extensions */ epp_Extension_ref m_ext; /**< DEPRECATED Extension element used for server-defined command extensions */ epp_trid_ref m_client_trid; /**< Client transaction ID element that uniquely identifies the command to the client */ --- 45,49 ---- public: ! epp_extension_ref_seq_ref m_extentions; /**< Extension elements used for server-defined command extensions */ epp_Extension_ref m_ext; /**< DEPRECATED Extension element used for server-defined command extensions */ epp_trid_ref m_client_trid; /**< Client transaction ID element that uniquely identifies the command to the client */ *************** *** 63,66 **** --- 63,68 ---- { m_ext = _m_ext; + m_extentions.ref(new epp_extension_ref_seq()); + m_extentions->push_back(_m_ext); m_client_trid.ref(new epp_trid(_m_client_trid)); }; *************** *** 73,76 **** --- 75,80 ---- { m_ext = _m_ext; + m_extentions.ref(new epp_extension_ref_seq()); + m_extentions->push_back(_m_ext); m_client_trid = _m_client_trid; }; *************** *** 79,83 **** /// Constructor, using simple types when it can /// @note Cannot set simple types to NULL ! epp_Command(const epp_extension_seq_ref & _m_extentions, const epp_trid & _m_client_trid) { --- 83,87 ---- /// Constructor, using simple types when it can /// @note Cannot set simple types to NULL ! epp_Command(const epp_extension_ref_seq_ref & _m_extentions, const epp_trid & _m_client_trid) { *************** *** 87,91 **** /// Constructor, using only references ! epp_Command(const epp_extension_seq_ref & _m_extentions, const epp_trid_ref & _m_client_trid) { --- 91,95 ---- /// Constructor, using only references ! epp_Command(const epp_extension_ref_seq_ref & _m_extentions, const epp_trid_ref & _m_client_trid) { Index: epp_ContactCreateReq.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_ContactCreateReq.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 Index: epp_ContactInfoRsp.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_ContactInfoRsp.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 Index: epp_ContactNameAddress.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_ContactNameAddress.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Index: epp_ContactNameAddress.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_ContactNameAddress.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 Index: epp_DataCollectionPolicy.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_DataCollectionPolicy.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Index: epp_DataCollectionPolicy.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_DataCollectionPolicy.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Index: epp_Exception.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_Exception.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Index: epp_Exception.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_Exception.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 Index: epp_ExtMessage.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_ExtMessage.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Index: epp_ExtMessage.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_ExtMessage.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Index: epp_ExtResultValue.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_ExtResultValue.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Index: epp_ExtResultValue.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_ExtResultValue.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Index: epp_LogoutReq.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_LogoutReq.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** epp_LogoutReq.h 13 May 2003 22:55:51 -0000 1.10 --- epp_LogoutReq.h 18 Jul 2003 20:21:19 -0000 1.11 *************** *** 43,47 **** public: ! epp_extension_seq_ref m_extensions; /**< Extension elements used for server-defined command extensions */ epp_trid_ref m_client_trid; /**< Client transaction ID element that uniquely identifies the command to the client */ --- 43,47 ---- public: ! epp_extension_ref_seq_ref m_extensions; /**< Extension elements used for server-defined command extensions */ epp_trid_ref m_client_trid; /**< Client transaction ID element that uniquely identifies the command to the client */ *************** *** 58,64 **** const epp_trid & _m_client_trid) { ! m_extensions = new(epp_extension_seq); ! epp_Extension ext(*_m_ext); ! m_extensions->push_back(ext); m_client_trid.ref(new epp_trid(_m_client_trid)); }; --- 58,63 ---- const epp_trid & _m_client_trid) { ! m_extensions = new(epp_extension_ref_seq); ! m_extensions->push_back(_m_ext); m_client_trid.ref(new epp_trid(_m_client_trid)); }; *************** *** 69,75 **** const epp_trid_ref & _m_client_trid) { ! m_extensions = new(epp_extension_seq); ! epp_Extension ext(*_m_ext); ! m_extensions->push_back(ext); m_client_trid = _m_client_trid; }; --- 68,73 ---- const epp_trid_ref & _m_client_trid) { ! m_extensions = new(epp_extension_ref_seq); ! m_extensions->push_back(_m_ext); m_client_trid = _m_client_trid; }; *************** *** 77,81 **** /// Constructor, using simple types when it can /// @note Cannot set simple types to NULL ! epp_LogoutReq(const epp_extension_seq_ref & _m_extensions, const epp_trid & _m_client_trid) { --- 75,79 ---- /// Constructor, using simple types when it can /// @note Cannot set simple types to NULL ! epp_LogoutReq(const epp_extension_ref_seq_ref & _m_extensions, const epp_trid & _m_client_trid) { *************** *** 85,89 **** /// Constructor, using only references ! epp_LogoutReq(const epp_extension_seq_ref & _m_extensions, const epp_trid_ref & _m_client_trid) { --- 83,87 ---- /// Constructor, using only references ! epp_LogoutReq(const epp_extension_ref_seq_ref & _m_extensions, const epp_trid_ref & _m_client_trid) { Index: epp_MessageQueue.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_MessageQueue.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Index: epp_MessageQueue.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_MessageQueue.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Index: epp_Response.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_Response.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Index: epp_Response.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_Response.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 Index: epp_Result.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_Result.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Index: epp_Result.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_Result.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 Index: epp_ResultValue.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_ResultValue.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Index: epp_ResultValue.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_ResultValue.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Index: epp_TransID.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_TransID.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Index: epp_TransID.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_TransID.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 Index: epp_contactXMLbase.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_contactXMLbase.cc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 Index: epp_contactXMLbase.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_contactXMLbase.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 Index: epp_contactdata.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_contactdata.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 Index: epp_eppXMLbase.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_eppXMLbase.cc,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** epp_eppXMLbase.cc 3 Jun 2003 19:56:52 -0000 1.27 --- epp_eppXMLbase.cc 18 Jul 2003 20:21:19 -0000 1.28 *************** *** 100,144 **** } ! void eppobject::epp::addExtensionElements(EPP_output & outputobject, const epp_extension_seq_ref & extensions) { if( extensions == NULL ) { return; } ! for(epp_extension_seq::iterator extension = extensions->begin(); extension != extensions->end(); extension++) { - - epp_string extensionXML = extension->toXML(); ! if(extensionXML.empty()) { ! outputobject.putTag("extension", ""); ! } ! else if(extensionXML.find("<") == string::npos) { ! outputobject.putTag("extension", extensionXML); ! } ! else { ! dom_ptr extensionDoc = createDOMDocument("<parseme xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><extension>" ! + extensionXML + ! "</extension></parseme>"); ! if(!extensionDoc->isNull()) { ! extensionDoc = dom_ptr(extensionDoc->getFirstChildElement()); ! if(extensionDoc->getNodeName() == "parseme") { ! extensionDoc = dom_ptr(extensionDoc->getFirstChildElement()); ! } ! else { ! return; ! } ! } ! else { ! return; ! } ! DomPrint dp(outputobject); ! dp.putDOMTree(extensionDoc); } } } --- 100,168 ---- } ! void eppobject::epp::addExtensionElements(EPP_output & outputobject, const epp_extension_ref_seq_ref & extensions) { + #ifdef RTK_DEBUG + cout << "Entered epp_eppXMLBase::addExtensionElements()"<<endl; + #endif + if( extensions == NULL ) { + #ifdef RTK_DEBUG + cout << "addExtensionElements(): No extensions to add!"<<endl; + #endif return; } + #ifdef RTK_DEBUG + else { + cout << "addExtensionElements(): The extensions reference vector reference is not null"<<endl; + } + #endif ! outputobject.beginTag("extension"); ! ! for(epp_extension_ref_seq::iterator extension = extensions->begin(); extension != extensions->end(); extension++) { ! if ( *extension == NULL ) { ! #ifdef RTK_DEBUG ! cout << "addExtensionElements(): a null extension"<<endl; ! #endif ! break; ! } ! epp_string extensionXML = (*extension)->toXML(); ! #ifdef RTK_DEBUG ! cout << "addExtensionElements(): extension returned us this xml ["<<extensionXML<<"]"<<endl; ! #endif ! dom_ptr extensionDoc = createDOMDocument("<parseme xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" ! + extensionXML + ! "</parseme>"); ! if(!extensionDoc->isNull()) { ! extensionDoc = dom_ptr(extensionDoc->getFirstChildElement()); ! if(extensionDoc->getNodeName() == "parseme") { ! extensionDoc = dom_ptr(extensionDoc->getFirstChildElement()); ! } ! else { ! #ifdef RTK_DEBUG ! cout << "addExtensionElements(): no parseme element???"<<endl; ! #endif ! break; ! } ! } ! else { ! #ifdef RTK_DEBUG ! cout << "addExtensionElements(): couldn't transform xml string back to dom element tree"<<endl; ! #endif ! break; } + + DomPrint dp(outputobject); + dp.putDOMTree(extensionDoc); } + + outputobject.endTag("extension"); + } Index: epp_eppXMLbase.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_eppXMLbase.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** epp_eppXMLbase.h 13 May 2003 22:55:51 -0000 1.16 --- epp_eppXMLbase.h 18 Jul 2003 20:21:19 -0000 1.17 *************** *** 73,77 **** */ void addExtensionElements(EPP_output & outputobject, ! const epp_extension_seq_ref & extensions); --- 73,77 ---- */ void addExtensionElements(EPP_output & outputobject, ! const epp_extension_ref_seq_ref & extensions); Index: epp_eppdata.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_eppdata.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** epp_eppdata.h 27 May 2003 19:38:23 -0000 1.14 --- epp_eppdata.h 18 Jul 2003 20:21:19 -0000 1.15 *************** *** 284,293 **** class epp_Extension; // Forward declaration... /// Typedef for a sequence of #epp_Extension elements typedef std::vector<epp_Extension> epp_extension_seq; ! /// Typedef for the ref to #epp_result_seq typedef refcnt_ptr<epp_extension_seq> epp_extension_seq_ref; --- 284,301 ---- class epp_Extension; // Forward declaration... + typedef refcnt_ptr<epp_Extension> epp_Extension_ref; /// Typedef for a sequence of #epp_Extension elements typedef std::vector<epp_Extension> epp_extension_seq; ! /// Typedef for the ref to #epp_extension_seq typedef refcnt_ptr<epp_extension_seq> epp_extension_seq_ref; + + /* XXX DANDAN might this cause memory leaks??? */ + /// Typedef for a sequence of #epp_Extension_ref elements + typedef std::vector<epp_Extension_ref> epp_extension_ref_seq; + + /// Typedef for the ref to #epp_extension_ref_seq + typedef refcnt_ptr<epp_extension_ref_seq> epp_extension_ref_seq_ref; |
From: Daniel M. <tub...@us...> - 2003-07-18 20:21:22
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src/transport In directory sc8-pr-cvs1:/tmp/cvs-serv16905/transport Modified Files: epp_TransportSSL.cc Log Message: import of code fixes and tweeks from Afilias version of C++ RTK Index: epp_TransportSSL.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/transport/epp_TransportSSL.cc,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** epp_TransportSSL.cc 27 May 2003 19:38:23 -0000 1.24 --- epp_TransportSSL.cc 18 Jul 2003 20:21:19 -0000 1.25 *************** *** 84,88 **** long int message_length = send_xml.length() + 4; char header_bytes[4]; ! bzero(header_bytes, 4); header_bytes[0] = ( message_length >> 24 ) & 0xff; header_bytes[1] = ( message_length >> 16 ) & 0xff; --- 84,88 ---- long int message_length = send_xml.length() + 4; char header_bytes[4]; ! memset(header_bytes, 0, 4); header_bytes[0] = ( message_length >> 24 ) & 0xff; header_bytes[1] = ( message_length >> 16 ) & 0xff; *************** *** 120,124 **** char header[4]; ! bzero(header, 4); const char *temp_ptr; temp_ptr = sslserver->getchars(4); --- 120,124 ---- char header[4]; ! memset(header, 0, 4); const char *temp_ptr; temp_ptr = sslserver->getchars(4); |
From: Daniel M. <tub...@us...> - 2003-06-03 21:08:57
|
Update of /cvsroot/epp-rtk/epp-rtk/c++ In directory sc8-pr-cvs1:/tmp/cvs-serv2800 Modified Files: debug.sh Log Message: added RTK_DEBUG define transport debug and stuff Index: debug.sh =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/debug.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** debug.sh 28 Apr 2003 20:54:15 -0000 1.4 --- debug.sh 3 Jun 2003 21:08:54 -0000 1.5 *************** *** 3,8 **** which automake-1.4 >/dev/null 2>&1 if [ $? -eq 0 ]; then ! automake-1.4 && autoconf && ./configure $* && make clean && make CXXFLAGS=" -ggdb -Wall" else ! automake && autoconf && ./configure $* && make clean && make CXXFLAGS=" -ggdb -Wall" fi --- 3,8 ---- which automake-1.4 >/dev/null 2>&1 if [ $? -eq 0 ]; then ! automake-1.4 && autoconf && ./configure $* && make clean && make CXXFLAGS=" -ggdb -Wall -DRTK_DEBUG" else ! automake && autoconf && ./configure $* && make clean && make CXXFLAGS=" -ggdb -Wall -DRTK_DEBUG" fi |
From: Daniel M. <tub...@us...> - 2003-06-03 20:15:46
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src/data In directory sc8-pr-cvs1:/tmp/cvs-serv26909 Modified Files: epp_eppXMLbase.cc Log Message: fix the parsing of extension nodes -- only one "extension" node, which can contain multiple children, each of which are extensions on their own Index: epp_eppXMLbase.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_eppXMLbase.cc,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** epp_eppXMLbase.cc 30 May 2003 17:58:32 -0000 1.26 --- epp_eppXMLbase.cc 3 Jun 2003 19:56:52 -0000 1.27 *************** *** 380,402 **** if(nodeName == "extension") { ! // multiple extensions permitted... res->m_ext_strings.ref(new epp_xml_string_seq()); dom_ptr extensionNode = dom_ptr(resChildNode->getFirstChild()); - EPP_output outObject; - DomPrint dp(outObject); while(!extensionNode->isNull()) { dp.putDOMTree(extensionNode); extensionNode = dom_ptr(extensionNode->getNextSibling()); } ! ! // DANDAN ! // XXX have to put this into the while loop or something.... ! ! epp_xml_string xml_string(outObject.getString()); ! ! res->m_ext_strings->push_back(xml_string); ! // cout << "extension: " << *res->m_ext_string << endl; } // if "extension" --- 380,401 ---- if(nodeName == "extension") { ! // a single extension tag is permitted, but ! // it can contain multiple children. res->m_ext_strings.ref(new epp_xml_string_seq()); dom_ptr extensionNode = dom_ptr(resChildNode->getFirstChild()); while(!extensionNode->isNull()) { + EPP_output outObject; + DomPrint dp(outObject); dp.putDOMTree(extensionNode); extensionNode = dom_ptr(extensionNode->getNextSibling()); + + epp_xml_string xml_string(outObject.getString()); + + res->m_ext_strings->push_back(xml_string); } ! ! // cout << "extension: " << *res->m_ext_strings << endl; } // if "extension" |
From: Daniel M. <tub...@us...> - 2003-06-03 19:42:52
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory sc8-pr-cvs1:/tmp/cvs-serv19510 Modified Files: main_login.cc main_loginunspec.cc Log Message: upgraded loginunspec to use new param scheme and changed it and regular login example to not change the password by default Index: main_login.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_login.cc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** main_login.cc 27 May 2003 20:12:49 -0000 1.16 --- main_login.cc 3 Jun 2003 19:42:48 -0000 1.17 *************** *** 118,128 **** l_req->m_client_id.ref(new epp_string(username)); l_req->m_password.ref(new epp_string(password)); ! if(extraDataMap.empty()) { ! l_req->m_new_password.ref(new epp_string("bar-FOO2")); ! } ! else { ! if(extraDataMap["newpw"] != "") { ! l_req->m_new_password.ref(new epp_string(extraDataMap["newpw"])); ! } } // Fill in options part of request --- 118,123 ---- l_req->m_client_id.ref(new epp_string(username)); l_req->m_password.ref(new epp_string(password)); ! if(extraDataMap.find("newpw") != extraDataMap.end()) { ! l_req->m_new_password.ref(new epp_string(extraDataMap["newpw"])); } // Fill in options part of request Index: main_loginunspec.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_loginunspec.cc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main_loginunspec.cc 13 May 2003 22:55:50 -0000 1.10 --- main_loginunspec.cc 3 Jun 2003 19:42:48 -0000 1.11 *************** *** 26,29 **** --- 26,31 ---- ************************************************************************/ + /* $Header$ */ + #include <string> #include <vector> *************** *** 61,75 **** string username, password; ! if(!handleArgs(test, argc, argv, username, password)) return 1; ! map<unsigned 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); } } --- 63,79 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:newpw=yyy]"; ! if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; ! map<string,string> extraDataMap; if(argc > 1) { for(int parm = 1; parm < argc; parm++) { ! if (!strncmp(argv[parm], "-extradata=", 11)) { ! cout << "Found extra data param..." << endl; ! string td = &argv[parm][11]; ! extraDataMap = getExtraDataMap(td); } } *************** *** 85,89 **** exts->push_back((epp_Extension)unspec_test); cmd->m_extentions = exts; ! cmd->m_client_trid.ref(new epp_trid("ABC-12345")); epp_objuri_seq_ref sers(new epp_objuri_seq); --- 89,96 ---- exts->push_back((epp_Extension)unspec_test); cmd->m_extentions = exts; ! string trID; ! if(extraDataMap.empty()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; ! cmd->m_client_trid.ref(new epp_trid(trID)); epp_objuri_seq_ref sers(new epp_objuri_seq); *************** *** 105,115 **** l_req->m_client_id.ref(new epp_string(username)); l_req->m_password.ref(new epp_string(password)); ! if(testDataMap.empty()) { ! l_req->m_new_password.ref(new epp_string("bar-FOO2")); ! } ! else { ! if(testDataMap[2] != "-1") { ! l_req->m_new_password.ref(new epp_string(testDataMap[2])); ! } } // Fill in options part of request --- 112,117 ---- l_req->m_client_id.ref(new epp_string(username)); l_req->m_password.ref(new epp_string(password)); ! if(extraDataMap.find("newpw") != extraDataMap.end()) { ! l_req->m_new_password.ref(new epp_string(extraDataMap["newpw"])); } // Fill in options part of request *************** *** 130,134 **** #endif ! // Let us do something more with the unspec-object: if(l_rsp->m_rsp->m_ext_strings != NULL) { --- 132,136 ---- #endif ! // Let us do something more with the extension: if(l_rsp->m_rsp->m_ext_strings != NULL) { |
From: Daniel M. <tub...@us...> - 2003-06-03 19:13:19
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory sc8-pr-cvs1:/tmp/cvs-serv3476 Modified Files: main_poll.cc Log Message: send the exception to the stderr stream Index: main_poll.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_poll.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** main_poll.cc 3 Jun 2003 19:08:08 -0000 1.14 --- main_poll.cc 3 Jun 2003 19:13:16 -0000 1.15 *************** *** 226,229 **** --- 226,230 ---- cout << "epp_Exception: " << endl; #ifndef TEST_IO_REQUEST2CERR + cerr << ex << endl; cerr << "<response>" << endl; printResultsSeq(ex.m_details); |
From: Daniel M. <tub...@us...> - 2003-06-03 19:08:13
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory sc8-pr-cvs1:/tmp/cvs-serv355 Modified Files: main_poll.cc testTools.cc Log Message: poll working and now printing all <msgQ> elements in printResponsePart1() Index: main_poll.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_poll.cc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** main_poll.cc 28 Apr 2003 20:50:38 -0000 1.13 --- main_poll.cc 3 Jun 2003 19:08:08 -0000 1.14 *************** *** 26,29 **** --- 26,31 ---- ************************************************************************/ + /* $Header$ */ + #include <string> #include <iostream> *************** *** 62,86 **** { if(pdt->m_name != NULL) ! cerr << "<domain:name>" << *pdt->m_name << "</domain:name>" << endl; if(pdt->m_transfer_status != NULL) { string trStatus = returnTransferStatusType(*pdt->m_transfer_status); ! cerr << "<domain:trStatus>" << trStatus << "</domain:trStatus>" << endl; } if(pdt->m_request_client_id != NULL) ! cerr << "<domain:reID>" << *pdt->m_request_client_id << "</domain:reID>" << endl; if(pdt->m_request_date != NULL) ! cerr << "<domain:reDate>" << *pdt->m_request_date << "</domain:reDate>" << endl; if(pdt->m_action_client_id != NULL) ! cerr << "<domain:acID>" << *pdt->m_action_client_id << "</domain:acID>" << endl; if(pdt->m_action_date != NULL) ! cerr << "<domain:acDate>" << *pdt->m_action_date << "</domain:acDate>" << endl; if(pdt->m_expiration_date != NULL) ! cerr << "<domain:exDate>" << *pdt->m_expiration_date << "</domain:exDate>" << endl; } --- 64,88 ---- { if(pdt->m_name != NULL) ! cerr << "\t<domain:name>" << *pdt->m_name << "</domain:name>" << endl; if(pdt->m_transfer_status != NULL) { string trStatus = returnTransferStatusType(*pdt->m_transfer_status); ! cerr << "\t<domain:trStatus>" << trStatus << "</domain:trStatus>" << endl; } if(pdt->m_request_client_id != NULL) ! cerr << "\t<domain:reID>" << *pdt->m_request_client_id << "</domain:reID>" << endl; if(pdt->m_request_date != NULL) ! cerr << "\t<domain:reDate>" << *pdt->m_request_date << "</domain:reDate>" << endl; if(pdt->m_action_client_id != NULL) ! cerr << "\t<domain:acID>" << *pdt->m_action_client_id << "</domain:acID>" << endl; if(pdt->m_action_date != NULL) ! cerr << "\t<domain:acDate>" << *pdt->m_action_date << "</domain:acDate>" << endl; if(pdt->m_expiration_date != NULL) ! cerr << "\t<domain:exDate>" << *pdt->m_expiration_date << "</domain:exDate>" << endl; } *************** *** 95,116 **** { if(pct->m_id != NULL) ! cerr << "<contact:id>" << *pct->m_id << "</contact:id>" << endl; if(pct->m_transfer_status != NULL) { string trStatus = returnTransferStatusType(*pct->m_transfer_status); ! cerr << "<contact:trStatus>" << trStatus << "</contact:trStatus>" << endl; } if(pct->m_request_client_id != NULL) ! cerr << "<contact:reID>" << *pct->m_request_client_id << "</contact:reID>" << endl; if(pct->m_request_date != NULL) ! cerr << "<contact:reDate>" << *pct->m_request_date << "</contact:reDate>" << endl; if(pct->m_action_client_id != NULL) ! cerr << "<contact:acID>" << *pct->m_action_client_id << "</contact:acID>" << endl; if(pct->m_action_date != NULL) ! cerr << "<contact:acDate>" << *pct->m_action_date << "</contact:acDate>" << endl; } --- 97,118 ---- { if(pct->m_id != NULL) ! cerr << "\t<contact:id>" << *pct->m_id << "</contact:id>" << endl; if(pct->m_transfer_status != NULL) { string trStatus = returnTransferStatusType(*pct->m_transfer_status); ! cerr << "\t<contact:trStatus>" << trStatus << "</contact:trStatus>" << endl; } if(pct->m_request_client_id != NULL) ! cerr << "\t<contact:reID>" << *pct->m_request_client_id << "</contact:reID>" << endl; if(pct->m_request_date != NULL) ! cerr << "\t<contact:reDate>" << *pct->m_request_date << "</contact:reDate>" << endl; if(pct->m_action_client_id != NULL) ! cerr << "\t<contact:acID>" << *pct->m_action_client_id << "</contact:acID>" << endl; if(pct->m_action_date != NULL) ! cerr << "\t<contact:acDate>" << *pct->m_action_date << "</contact:acDate>" << endl; } *************** *** 135,149 **** string username, password; ! if(!handleArgs(test, argc, argv, username, password)) return 1; ! ! map<unsigned 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); } } --- 137,153 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:op=(req|ack):id=123]"; ! if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; ! ! map<string,string> extraDataMap; if(argc > 1) { for(int parm = 1; parm < argc; parm++) { ! if (!strncmp(argv[parm], "-extradata=", 11)) { ! cout << "Found extra data param..." << endl; ! string td = &argv[parm][11]; ! extraDataMap = getExtraDataMap(td); } } *************** *** 160,165 **** string trID; ! if(testDataMap.empty()) trID = "ABC-12345"; ! else trID = testDataMap[1]; l_req->m_cmd->m_client_trid.ref(new epp_trid(trID)); --- 164,169 ---- string trID; ! if(extraDataMap.find("trid") == extraDataMap.end()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd->m_client_trid.ref(new epp_trid(trID)); *************** *** 168,172 **** epp_PollRsp_ref l_rsp; ! if(testDataMap.empty()) { l_req->m_op.ref(new epp_PollOpType(REQ)); --- 172,177 ---- epp_PollRsp_ref l_rsp; ! if( extraDataMap.find("op") == extraDataMap.end() && ! extraDataMap.find("id") == extraDataMap.end() ) { l_req->m_op.ref(new epp_PollOpType(REQ)); *************** *** 188,202 **** } else { ! if(testDataMap[2] != "-1") { ! if(testDataMap[2] == "req") { l_req->m_op.ref(new epp_PollOpType(REQ)); } ! else if(testDataMap[2] == "ack") { l_req->m_op.ref(new epp_PollOpType(ACK)); - if(testDataMap[3] != "-1") { - l_req->m_msgID.ref(new epp_string(testDataMap[3])); - } } } } --- 193,207 ---- } else { ! if ( extraDataMap.find("op") != extraDataMap.end() ) { ! if(extraDataMap["op"] == "req") { l_req->m_op.ref(new epp_PollOpType(REQ)); } ! else if(extraDataMap["op"] == "ack") { l_req->m_op.ref(new epp_PollOpType(ACK)); } } + if ( extraDataMap.find("id") != extraDataMap.end() ) { + l_req->m_msgID.ref(new epp_string(extraDataMap["id"])); + } } *************** *** 206,209 **** --- 211,216 ---- l_rsp = l_obj->getResponseData(); + + cout << l_rsp->m_rsp << endl; #ifndef TEST_IO_REQUEST2CERR Index: testTools.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/testTools.cc,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** testTools.cc 2 Jun 2003 21:24:25 -0000 1.24 --- testTools.cc 3 Jun 2003 19:08:08 -0000 1.25 *************** *** 146,155 **** cerr << " count=\"" << *response->m_message_queue->m_count << "\""; } ! if(response->m_message_queue->m_queue_date != NULL) { cerr << ">" << endl; ! cerr << "<qDate>" << *response->m_message_queue->m_queue_date << "</qDate>" << endl; cerr << "</msgQ>" << endl; ! } else { cerr << "/>" << endl; --- 146,171 ---- cerr << " count=\"" << *response->m_message_queue->m_count << "\""; } + if(response->m_message_queue->m_id != NULL) { + cerr << " id=\"" << *response->m_message_queue->m_id << "\""; + } ! if( response->m_message_queue->m_queue_date != NULL || ! response->m_message_queue->m_msg != NULL ) { ! cerr << ">" << endl; ! ! if(response->m_message_queue->m_msg != NULL) { ! cerr << "\t<msg"; ! if(response->m_message_queue->m_msg->m_lang != NULL) { ! cerr << " lang=\"" << *response->m_message_queue->m_msg->m_lang << "\""; ! } ! cerr << ">" << *response->m_message_queue->m_msg->m_value << "</msg>" << endl; ! } ! if(response->m_message_queue->m_queue_date != NULL) { ! cerr << "\t<qDate>" << *response->m_message_queue->m_queue_date << "</qDate>" << endl; ! } ! cerr << "</msgQ>" << endl; ! } else { cerr << "/>" << endl; |
From: Daniel M. <tub...@us...> - 2003-06-03 19:00:20
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src/data In directory sc8-pr-cvs1:/tmp/cvs-serv28214 Modified Files: Makefile.am epp_ExtMessage.h epp_MessageQueue.cc Added Files: epp_ExtMessage.cc Log Message: added ostream() methods to the epp_ExtMessage class --- NEW FILE: epp_ExtMessage.cc --- /************************************************************************ * 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 ************************************************************************/ /* $Header: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_ExtMessage.cc,v 1.1 2003/06/03 19:00:16 tubadanm Exp $ */ /** @file epp_ExtMessage.cc * @brief Definition of epp_ExtMessage and epp_ExtMessage_ref * @author Daniel Manley */ #include "epp_ExtMessage.h" using namespace eppobject::epp; using namespace std; std::ostream& eppobject::epp::operator<<(std::ostream &stream, const epp_ExtMessage_ref & extmsg) { return stream << *extmsg; } std::ostream& eppobject::epp::operator<<(std::ostream &stream, const epp_ExtMessage & extmsg) { stream << "m_lang ["<<*extmsg.m_lang<<"] m_value ["<<*extmsg.m_value<<"]"; return stream; } Index: Makefile.am =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.am 30 May 2003 17:57:46 -0000 1.8 --- Makefile.am 3 Jun 2003 19:00:15 -0000 1.9 *************** *** 124,127 **** --- 124,128 ---- epp_ResultValue.cc \ epp_ExtResultValue.cc \ + epp_ExtMessage.cc \ epp_TransID.cc \ epp_ContactNameAddress.cc \ Index: epp_ExtMessage.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_ExtMessage.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** epp_ExtMessage.h 13 May 2003 22:55:51 -0000 1.1 --- epp_ExtMessage.h 3 Jun 2003 19:00:16 -0000 1.2 *************** *** 29,32 **** --- 29,34 ---- #define __EPP_EXT_MESSAGE_H + /* $Header$ */ + /** @file epp_ExtMessage.h * @brief Definition of epp_ExtMessage and epp_ExtMessage_ref *************** *** 74,77 **** --- 76,81 ---- /// Typedef for the ref to the epp_ExtMessage class typedef refcnt_ptr<epp_ExtMessage> epp_ExtMessage_ref; + std::ostream& operator<<(std::ostream &stream, const epp_ExtMessage_ref & extmsg); + std::ostream& operator<<(std::ostream &stream, const epp_ExtMessage & extmsg); }} Index: epp_MessageQueue.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/data/epp_MessageQueue.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** epp_MessageQueue.cc 28 May 2003 19:55:14 -0000 1.1 --- epp_MessageQueue.cc 3 Jun 2003 19:00:16 -0000 1.2 *************** *** 43,47 **** ostream& eppobject::epp::operator<<(ostream &stream, const epp_MessageQueue & msgq) { ! stream << "m_count ["<<*msgq.m_count<<"] m_queue_date ["<<*msgq.m_queue_date<<"] m_msg [FIXME] m_id ["<<*msgq.m_id<<"]"; return stream; } --- 43,47 ---- ostream& eppobject::epp::operator<<(ostream &stream, const epp_MessageQueue & msgq) { ! stream << "m_count ["<<*msgq.m_count<<"] m_queue_date ["<<*msgq.m_queue_date<<"] m_msg ["<<*msgq.m_msg<<"] m_id ["<<*msgq.m_id<<"]"; return stream; } |
From: Daniel M. <tub...@us...> - 2003-06-03 18:38:38
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory sc8-pr-cvs1:/tmp/cvs-serv17004 Modified Files: main_logout.cc Log Message: updated logout for new param scheme Index: main_logout.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_logout.cc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main_logout.cc 28 Apr 2003 20:50:37 -0000 1.10 --- main_logout.cc 3 Jun 2003 18:38:31 -0000 1.11 *************** *** 26,29 **** --- 26,31 ---- ************************************************************************/ + /* $Header$ */ + #include <string> #include <iostream> *************** *** 58,72 **** string username, password; ! if(!handleArgs(test, argc, argv, username, password)) return 1; ! map<unsigned 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); } } --- 60,76 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx]"; ! if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; ! map<string,string> extraDataMap; if(argc > 1) { for(int parm = 1; parm < argc; parm++) { ! if (!strncmp(argv[parm], "-extradata=", 11)) { ! cout << "Found extra data param..." << endl; ! string td = &argv[parm][11]; ! extraDataMap = getExtraDataMap(td); } } *************** *** 80,85 **** string trID; ! if(testDataMap.empty()) trID = "ABC-12345"; ! else trID = testDataMap[1]; l_req->m_client_trid.ref(new epp_trid(trID)); --- 84,89 ---- string trID; ! if(extraDataMap.find("trid") == extraDataMap.end()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_client_trid.ref(new epp_trid(trID)); |
From: Daniel M. <tub...@us...> - 2003-06-03 15:03:59
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory sc8-pr-cvs1:/tmp/cvs-serv6897 Modified Files: main_contactupdate.cc main_domainupdate.cc Log Message: fixed bug in update examples where the "-change" param was being ignored Index: main_contactupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactupdate.cc,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** main_contactupdate.cc 2 Jun 2003 20:38:20 -0000 1.17 --- main_contactupdate.cc 3 Jun 2003 15:03:55 -0000 1.18 *************** *** 91,97 **** } ! if (!strncmp(argv[parm], "-change=", 9)) { cout << "Found 'change' data param..." << endl; ! string td = &argv[parm][9]; changeDataMap = getExtraDataMap(td); } --- 91,97 ---- } ! if (!strncmp(argv[parm], "-change=", 8)) { cout << "Found 'change' data param..." << endl; ! string td = &argv[parm][8]; changeDataMap = getExtraDataMap(td); } Index: main_domainupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domainupdate.cc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** main_domainupdate.cc 2 Jun 2003 20:51:49 -0000 1.16 --- main_domainupdate.cc 3 Jun 2003 15:03:56 -0000 1.17 *************** *** 92,96 **** } ! if (!strncmp(argv[parm], "-change=", 9)) { cout << "Found 'change' data param..." << endl; string td = &argv[parm][9]; --- 92,96 ---- } ! if (!strncmp(argv[parm], "-change=", 8)) { cout << "Found 'change' data param..." << endl; string td = &argv[parm][9]; *************** *** 190,194 **** while( ! addDataMap[ns_name].empty() ) { ! l_req->m_add->m_name_servers->push_back(ns_name); ns_number++; sprintf(ns_name, "ns%d", ns_number); --- 190,194 ---- while( ! addDataMap[ns_name].empty() ) { ! l_req->m_add->m_name_servers->push_back(addDataMap[ns_name]); ns_number++; sprintf(ns_name, "ns%d", ns_number); |
From: Daniel M. <tub...@us...> - 2003-06-03 15:03:31
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory sc8-pr-cvs1:/tmp/cvs-serv6694 Modified Files: main_hostupdate.cc Log Message: updated host update example with new param stuff Index: main_hostupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostupdate.cc,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** main_hostupdate.cc 2 Jun 2003 21:24:25 -0000 1.15 --- main_hostupdate.cc 3 Jun 2003 15:03:27 -0000 1.16 *************** *** 63,77 **** string username, password; ! if(!handleArgs(test, argc, argv, username, password)) return 1; ! map<unsigned 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); } } --- 63,107 ---- string username, password; ! vector<string> extra_usage; ! extra_usage.push_back("[-extradata=trid=xxx:name=ns1.host.tld"); ! extra_usage.push_back(" -add=status1=aaa{~...}~ip1=v4/1.2.3.4~ip2=v6/1080:0:0:0:8:800:200C:417A{~...}"); ! extra_usage.push_back(" -remove=status1=ccc{~...}~ip1=v4/1.2.3.4~ip2=v6/1080:0:0:0:8:800:200C:417A{~...}"); ! extra_usage.push_back(" -change=name=new.host.tld]"); ! if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; ! map<string,string> extraDataMap; ! map<string,string> addDataMap; ! map<string,string> changeDataMap; ! map<string,string> removeDataMap; if(argc > 1) { for(int parm = 1; parm < argc; parm++) { ! if (!strncmp(argv[parm], "-extradata=", 11)) { ! cout << "Found extra data param..." << endl; ! string td = &argv[parm][11]; ! extraDataMap = getExtraDataMap(td); ! } ! ! if (!strncmp(argv[parm], "-add=", 5)) { ! cout << "Found 'add' data param..." << endl; ! string td = &argv[parm][5]; ! addDataMap = getExtraDataMap(td); ! if ( addDataMap.empty() ) addDataMap[""] = "dummy"; ! } ! ! if (!strncmp(argv[parm], "-change=", 8)) { ! cout << "Found 'change' data param..." << endl; ! string td = &argv[parm][8]; ! changeDataMap = getExtraDataMap(td); ! if ( changeDataMap.empty() ) changeDataMap[""] = "dummy"; ! } ! ! if (!strncmp(argv[parm], "-remove=", 8)) { ! cout << "Found 'remove' data param..." << endl; ! string td = &argv[parm][8]; ! removeDataMap = getExtraDataMap(td); ! if ( removeDataMap.empty() ) removeDataMap[""] = "dummy"; } } *************** *** 85,90 **** string trID; ! if(testDataMap.empty()) trID = "ABC-12345"; ! else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(NULL, --- 115,120 ---- string trID; ! if(extraDataMap.find("trid") == extraDataMap.end()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 92,96 **** epp_trid(trID))); ! if(testDataMap.empty()) { // Data to add: epp_HostAddress host1(IPV4, epp_string("192.1.2.3")); --- 122,133 ---- epp_trid(trID))); ! ! if ( extraDataMap.find("name") == extraDataMap.end() ) l_req->m_name.ref(new epp_string("ns1.example.com")); ! else l_req->m_name.ref(new epp_string(extraDataMap["name"])); ! ! if( addDataMap.empty() && ! removeDataMap.empty() && ! changeDataMap.empty() ) { ! // Data to add: epp_HostAddress host1(IPV4, epp_string("192.1.2.3")); *************** *** 119,233 **** 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); ! ! string::size_type 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); ! ! string::size_type 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; ! } ! } --- 156,275 ---- torem->m_addresses = hosts2; 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( ! addDataMap.empty() ) { ! l_req->m_add.ref(new epp_HostUpdateAddRemove()); ! if( ! addDataMap["status1"].empty() ) { ! char status_name[10]; ! int status_number = 1; ! sprintf(status_name, "status%d", status_number); ! ! l_req->m_add->m_status.ref(new epp_host_status_seq()); ! while( ! addDataMap[status_name].empty() ) { ! string tmp = addDataMap[status_name]; epp_HostStatus status; status.m_type.ref(new epp_HostStatusType(returnStatusEnumType(tmp))); ! l_req->m_add->m_status->push_back(status); ! ! status_number++; ! sprintf(status_name, "status%d", status_number); } } ! if( ! addDataMap["ip1"].empty() ) { ! ! char ip_name[5]; ! int ip_number = 1; ! sprintf(ip_name, "ip%d", ip_number); ! ! l_req->m_add->m_addresses.ref(new epp_host_address_seq()); ! while( ! addDataMap[ip_name].empty() ) { ! string ipstring = addDataMap[ip_name]; ! ! unsigned int sep = ipstring.find("/"); ! if(sep != string::npos) { ! string iptype = ipstring.substr(0,sep); ! string ip = ipstring.substr(sep+1); ! epp_HostAddress host(returnIPTypeEnum(epp_string(iptype)), epp_string(ip)); ! l_req->m_add->m_addresses->push_back(host); ! } ! ip_number++; ! sprintf(ip_name, "ip%d", ip_number); } + } ! } + ! ! if( ! removeDataMap.empty() ) { ! l_req->m_remove.ref(new epp_HostUpdateAddRemove()); ! if( ! removeDataMap["status1"].empty() ) { ! char status_name[10]; ! int status_number = 1; ! sprintf(status_name, "status%d", status_number); ! ! l_req->m_remove->m_status.ref(new epp_host_status_seq()); ! while( ! removeDataMap[status_name].empty() ) { ! string tmp = removeDataMap[status_name]; epp_HostStatus status; status.m_type.ref(new epp_HostStatusType(returnStatusEnumType(tmp))); ! l_req->m_remove->m_status->push_back(status); ! ! status_number++; ! sprintf(status_name, "status%d", status_number); } } ! ! if( ! removeDataMap["ip1"].empty() ) { ! ! char ip_name[5]; ! int ip_number = 1; ! sprintf(ip_name, "ip%d", ip_number); ! ! l_req->m_remove->m_addresses.ref(new epp_host_address_seq()); ! while( ! removeDataMap[ip_name].empty() ) { ! string ipstring = removeDataMap[ip_name]; ! ! unsigned int sep = ipstring.find("/"); ! if(sep != string::npos) { ! string iptype = ipstring.substr(0,sep); ! string ip = ipstring.substr(sep+1); ! epp_HostAddress host(returnIPTypeEnum(epp_string(iptype)), epp_string(ip)); ! l_req->m_remove->m_addresses->push_back(host); ! } ! ip_number++; ! sprintf(ip_name, "ip%d", ip_number); } ! ! } ! } ! ! if( ! changeDataMap.empty() ) { ! ! l_req->m_change.ref(new epp_HostUpdateChange()); ! ! if(changeDataMap.find("name") != changeDataMap.end()) { ! l_req->m_change->m_name.ref(new epp_string(changeDataMap["name"])); ! } ! ! } ! } |
From: Daniel M. <tub...@us...> - 2003-06-02 21:24:29
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory sc8-pr-cvs1:/tmp/cvs-serv29895 Modified Files: main_hostcheck.cc main_hostcreate.cc main_hostdelete.cc main_hostinfo.cc main_hostupdate.cc testTools.cc Log Message: bringing host check, info, create, update and delete uptodate with current param methods. make getExtraDataMap() optionally use "~" as a key/value pair separator to allow for ":" in ipv6 strings Index: main_hostcheck.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostcheck.cc,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** main_hostcheck.cc 28 Apr 2003 20:50:32 -0000 1.12 --- main_hostcheck.cc 2 Jun 2003 21:24:25 -0000 1.13 *************** *** 26,29 **** --- 26,31 ---- ************************************************************************/ + /* $Header$ */ + #include <vector> #include <iostream> *************** *** 90,104 **** string username, password; ! if(!handleArgs(test, argc, argv, username, password)) return 1; ! map<unsigned 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); } } --- 92,108 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:name1=abc:name2=def:...]"; ! if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; ! map<string,string> extraDataMap; if(argc > 1) { for(int parm = 1; parm < argc; parm++) { ! if (!strncmp(argv[parm], "-extradata=", 11)) { ! cout << "Found extra data param..." << endl; ! string td = &argv[parm][11]; ! extraDataMap = getExtraDataMap(td); } } *************** *** 112,117 **** string trID; ! if(testDataMap.empty()) trID = "ABC-12345"; ! else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(NULL, --- 116,121 ---- string trID; ! if(extraDataMap.find("trid") == extraDataMap.end()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 121,125 **** epp_string_seq_ref names(new epp_string_seq()); ! if(testDataMap.empty()) { names->push_back("ns1.example.com"); names->push_back("ns2.example.com"); --- 125,129 ---- epp_string_seq_ref names(new epp_string_seq()); ! if(extraDataMap.find("name1") == extraDataMap.end()) { names->push_back("ns1.example.com"); names->push_back("ns2.example.com"); *************** *** 127,132 **** } else { ! for(unsigned int n = 2; n <= testDataMap.size(); n++) { ! names->push_back(testDataMap[n]); } } --- 131,139 ---- } else { ! char key[7]; ! for(unsigned int n = 1; n <= 30; n++) { ! sprintf(key,"name%d",n); ! if ( extraDataMap[key].empty() ) break; ! names->push_back(extraDataMap[key]); } } Index: main_hostcreate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostcreate.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** main_hostcreate.cc 28 Apr 2003 20:50:33 -0000 1.14 --- main_hostcreate.cc 2 Jun 2003 21:24:25 -0000 1.15 *************** *** 26,29 **** --- 26,31 ---- ************************************************************************/ + /* $Header$ */ + #include <vector> #include <iostream> *************** *** 76,90 **** string username, password; ! if(!handleArgs(test, argc, argv, username, password)) return 1; ! ! map<unsigned 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); } } --- 78,94 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx~name=abc~ip1=v4/1.2.3.4~ip2=v6/1080:0:0:0:8:800:200C:417A{~...}]"; ! if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; ! ! map<string,string> extraDataMap; if(argc > 1) { for(int parm = 1; parm < argc; parm++) { ! if (!strncmp(argv[parm], "-extradata=", 11)) { ! cout << "Found extra data param..." << endl; ! string td = &argv[parm][11]; ! extraDataMap = getExtraDataMap(td); } } *************** *** 98,103 **** string trID; ! if(testDataMap.empty()) trID = "ABC-12345"; ! else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(NULL, --- 102,107 ---- string trID; ! if(extraDataMap.find("trid") == extraDataMap.end()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 105,109 **** 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")); --- 109,119 ---- epp_trid(trID))); ! if ( extraDataMap.find("name") == extraDataMap.end() ) { ! l_req->m_name.ref(new epp_string("ns1.example.com")); ! } else { ! l_req->m_name.ref(new epp_string(extraDataMap["name"])); ! } ! ! if ( extraDataMap.find("ip1") == extraDataMap.end() ) { epp_HostAddress host1(IPV4, epp_string("192.1.2.3")); epp_HostAddress host2(IPV4, epp_string("198.1.2.3")); *************** *** 118,146 **** 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++) { ! ! string::size_type 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; } } --- 128,153 ---- ipadr->push_back(host4); l_req->m_addresses = ipadr; ! } else { ! epp_host_address_seq_ref ipadr(new epp_host_address_seq); ! char key[5]; ! for(unsigned int n = 1; n <= 14; n++) { ! ! sprintf(key,"ip%d",n); ! if ( extraDataMap.find(key) == extraDataMap.end() ) break; ! string ipstring = extraDataMap[key]; ! if ( ipstring == "-1" ) break; ! unsigned int sep = ipstring.find("/"); ! if(sep != string::npos) { ! string iptype = ipstring.substr(0,sep); ! string ip = ipstring.substr(sep+1); ! epp_HostAddress host(returnIPTypeEnum(epp_string(iptype)), epp_string(ip)); ! ipadr->push_back(host); } } + + l_req->m_addresses = ipadr; } Index: main_hostdelete.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostdelete.cc,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** main_hostdelete.cc 28 Apr 2003 20:50:34 -0000 1.12 --- main_hostdelete.cc 2 Jun 2003 21:24:25 -0000 1.13 *************** *** 26,29 **** --- 26,31 ---- ************************************************************************/ + /* $Header$ */ + #include <string> #include <iostream> *************** *** 60,74 **** string username, password; ! if(!handleArgs(test, argc, argv, username, password)) return 1; ! map<unsigned 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); } } --- 62,78 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:name=abc]"; ! if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; ! map<string,string> extraDataMap; if(argc > 1) { for(int parm = 1; parm < argc; parm++) { ! if (!strncmp(argv[parm], "-extradata=", 11)) { ! cout << "Found extra data param..." << endl; ! string td = &argv[parm][11]; ! extraDataMap = getExtraDataMap(td); } } *************** *** 82,87 **** string trID; ! if(testDataMap.empty()) trID = "ABC-12345"; ! else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(NULL, --- 86,91 ---- string trID; ! if(extraDataMap.find("trid") == extraDataMap.end()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 89,97 **** 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])); } --- 93,101 ---- epp_trid(trID))); ! if(extraDataMap.find("name") == extraDataMap.end()) { l_req->m_name.ref(new epp_string("ns1.example.com")); } else { ! l_req->m_name.ref(new epp_string(extraDataMap["name"])); } Index: main_hostinfo.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostinfo.cc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** main_hostinfo.cc 28 Apr 2003 20:50:35 -0000 1.13 --- main_hostinfo.cc 2 Jun 2003 21:24:25 -0000 1.14 *************** *** 26,29 **** --- 26,31 ---- ************************************************************************/ + /* $Header$ */ + #include <string> #include <iostream> *************** *** 131,145 **** string username, password; ! if(!handleArgs(test, argc, argv, username, password)) return 1; ! ! map<unsigned 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); } } --- 133,149 ---- string username, password; ! string extra_usage = "[-extradata=trid=xxx:name=abc]"; ! if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; ! ! map<string,string> extraDataMap; if(argc > 1) { for(int parm = 1; parm < argc; parm++) { ! if (!strncmp(argv[parm], "-extradata=", 11)) { ! cout << "Found extra data param..." << endl; ! string td = &argv[parm][11]; ! extraDataMap = getExtraDataMap(td); } } *************** *** 153,158 **** string trID; ! if(testDataMap.empty()) trID = "ABC-12345"; ! else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(NULL, --- 157,162 ---- string trID; ! if(extraDataMap.find("trid") == extraDataMap.end()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 160,168 **** 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])); } --- 164,172 ---- epp_trid(trID))); ! if(extraDataMap.find("name") == extraDataMap.end()) { l_req->m_name.ref(new epp_string("ns1.example.com")); } else { ! l_req->m_name.ref(new epp_string(extraDataMap["name"])); } Index: main_hostupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_hostupdate.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** main_hostupdate.cc 28 Apr 2003 20:50:35 -0000 1.14 --- main_hostupdate.cc 2 Jun 2003 21:24:25 -0000 1.15 *************** *** 26,29 **** --- 26,31 ---- ************************************************************************/ + /* $Header$ */ + #include <vector> #include <iostream> Index: testTools.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/testTools.cc,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** testTools.cc 2 Jun 2003 20:37:50 -0000 1.23 --- testTools.cc 2 Jun 2003 21:24:25 -0000 1.24 *************** *** 473,481 **** string tmpstring = extradata; cout << "The entire extradata string is ["<<tmpstring<<"]" << endl; if(tmpstring.length() > 0) { unsigned int end = 1; ! while((end = tmpstring.find(':')) != string::npos) { string tmp = tmpstring.substr(0,end); --- 473,487 ---- string tmpstring = extradata; + string sep = ":"; + // how's this for a hack -- use ":" for the separator, + // unless there are ~'s in the string, then use that + // instead -- only because in the host examples, the IPV6 + // addresses contain ":" characters. + if ( tmpstring.find('~') != string::npos ) sep = "~"; cout << "The entire extradata string is ["<<tmpstring<<"]" << endl; if(tmpstring.length() > 0) { unsigned int end = 1; ! while((end = tmpstring.find(sep)) != string::npos) { string tmp = tmpstring.substr(0,end); |
From: Daniel M. <tub...@us...> - 2003-06-02 20:51:52
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory sc8-pr-cvs1:/tmp/cvs-serv16849 Modified Files: main_domainupdate.cc Log Message: updated domain update example to follow new param formats Index: main_domainupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_domainupdate.cc,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** main_domainupdate.cc 13 May 2003 22:55:50 -0000 1.15 --- main_domainupdate.cc 2 Jun 2003 20:51:49 -0000 1.16 *************** *** 26,29 **** --- 26,31 ---- ************************************************************************/ + /* $Header$ */ + #include <vector> #include <iostream> *************** *** 61,81 **** string username, password; ! if(!handleArgs(test, argc, argv, username, password)) return 1; ! ! testLogIn(test, username, password); ! ! map<unsigned 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 { --- 63,113 ---- string username, password; ! vector<string> extra_usage; ! extra_usage.push_back("[-extradata=trid=xxx:domain=abc"); ! extra_usage.push_back(" -add=status1=aaa{:...}:ns1=222{:...}"); ! extra_usage.push_back(" -remove=status1=ccc{:...}:ns1=111{:...}"); ! extra_usage.push_back(" -change=authinfo=123123]"); ! if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; ! ! map<string,string> extraDataMap; ! map<string,string> addDataMap; ! map<string,string> changeDataMap; ! map<string,string> removeDataMap; if(argc > 1) { for(int parm = 1; parm < argc; parm++) { ! if (!strncmp(argv[parm], "-extradata=", 11)) { ! cout << "Found extra data param..." << endl; ! string td = &argv[parm][11]; ! extraDataMap = getExtraDataMap(td); ! } ! ! if (!strncmp(argv[parm], "-add=", 5)) { ! cout << "Found 'add' data param..." << endl; ! string td = &argv[parm][5]; ! addDataMap = getExtraDataMap(td); ! if ( addDataMap.empty() ) addDataMap[""] = "dummy"; ! } ! ! if (!strncmp(argv[parm], "-change=", 9)) { ! cout << "Found 'change' data param..." << endl; ! string td = &argv[parm][9]; ! changeDataMap = getExtraDataMap(td); ! if ( changeDataMap.empty() ) changeDataMap[""] = "dummy"; ! } ! ! if (!strncmp(argv[parm], "-remove=", 8)) { ! cout << "Found 'remove' data param..." << endl; ! string td = &argv[parm][8]; ! removeDataMap = getExtraDataMap(td); ! if ( removeDataMap.empty() ) removeDataMap[""] = "dummy"; } } } + testLogIn(test, username, password); + try { *************** *** 83,94 **** string trID; ! if(testDataMap.empty()) trID = "ABC-12345"; ! else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(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()); --- 115,127 ---- string trID; ! if(extraDataMap.find("trid") == extraDataMap.end()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, epp_trid(trID))); ! if( addDataMap.empty() && ! removeDataMap.empty() && ! changeDataMap.empty() ) { l_req->m_add.ref(new epp_DomainUpdateAddRemove()); *************** *** 126,276 **** } 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()); --- 159,309 ---- } else { ! ! if( ! addDataMap.empty() ) { l_req->m_add.ref(new epp_DomainUpdateAddRemove()); ! if( ! addDataMap["status1"].empty() ) { ! char status_name[10]; ! int status_number = 1; ! sprintf(status_name, "status%d", status_number); l_req->m_add->m_status.ref(new epp_domain_status_seq()); ! while( ! addDataMap[status_name].empty() ) { ! string tmp = addDataMap[status_name]; epp_DomainStatus status; status.m_type.ref(new epp_DomainStatusType(returnStatusEnumType(tmp))); l_req->m_add->m_status->push_back(status); ! ! status_number++; ! sprintf(status_name, "status%d", status_number); } } ! ! if( ! addDataMap["ns1"].empty() ) { ! char ns_name[5]; ! int ns_number = 1; ! sprintf(ns_name, "ns%d", ns_number); ! l_req->m_add->m_name_servers.ref(new epp_string_seq()); ! while( ! addDataMap[ns_name].empty() ) { ! l_req->m_add->m_name_servers->push_back(ns_name); ! ns_number++; ! sprintf(ns_name, "ns%d", ns_number); ! } ! } ! ! if( ! addDataMap["contact1"].empty() ) { ! char key[10]; // contactxx ! ! l_req->m_add->m_contacts.ref(new epp_domain_contact_seq()); ! for(unsigned int n = 1; n <= 10; n++) { ! sprintf(key,"contact%d",n); ! if ( addDataMap.find(key) == addDataMap.end() ) break; ! epp_DomainContact contact; ! string id = addDataMap[key]; ! string type, value; ! if ( ! id.empty() ) { ! // contact1=t/abc ! // contact2=a/qwerty ! // etc... ! type = id.substr(0,1); ! value = id.substr(2); ! if ( type == "t" ) contact.m_type.ref(new epp_DomainContactType(TECH)); ! if ( type == "a" ) contact.m_type.ref(new epp_DomainContactType(ADMIN)); ! if ( type == "b" ) contact.m_type.ref(new epp_DomainContactType(BILLING)); ! contact.m_id.ref(new epp_string(value)); ! l_req->m_add->m_contacts->push_back(contact); ! } } } ! } + ! if( ! removeDataMap.empty() ) { l_req->m_remove.ref(new epp_DomainUpdateAddRemove()); ! if( ! removeDataMap["status1"].empty() ) { ! char status_name[10]; ! int status_number = 1; ! sprintf(status_name, "status%d", status_number); l_req->m_remove->m_status.ref(new epp_domain_status_seq()); ! while( ! removeDataMap[status_name].empty() ) { ! string tmp = removeDataMap[status_name]; epp_DomainStatus status; status.m_type.ref(new epp_DomainStatusType(returnStatusEnumType(tmp))); l_req->m_remove->m_status->push_back(status); ! ! status_number++; ! sprintf(status_name, "status%d", status_number); } } ! ! if( ! removeDataMap["ns1"].empty() ) { ! char ns_name[5]; ! int ns_number = 1; ! sprintf(ns_name, "ns%d", ns_number); ! l_req->m_remove->m_name_servers.ref(new epp_string_seq()); ! while( ! removeDataMap[ns_name].empty() ) { ! l_req->m_remove->m_name_servers->push_back(ns_name); ! ns_number++; ! sprintf(ns_name, "ns%d", ns_number); ! } ! } ! ! if( ! removeDataMap["contact1"].empty() ) { ! char key[10]; // contactxx ! ! l_req->m_remove->m_contacts.ref(new epp_domain_contact_seq()); ! for(unsigned int n = 1; n <= 10; n++) { ! sprintf(key,"contact%d",n); ! if ( removeDataMap.find(key) == removeDataMap.end() ) break; ! epp_DomainContact contact; ! string id = removeDataMap[key]; ! string type, value; ! if ( ! id.empty() ) { ! // contact1=t/abc ! // contact2=a/qwerty ! // etc... ! type = id.substr(0,1); ! value = id.substr(2); ! if ( type == "t" ) contact.m_type.ref(new epp_DomainContactType(TECH)); ! if ( type == "a" ) contact.m_type.ref(new epp_DomainContactType(ADMIN)); ! if ( type == "b" ) contact.m_type.ref(new epp_DomainContactType(BILLING)); ! contact.m_id.ref(new epp_string(value)); ! l_req->m_remove->m_contacts->push_back(contact); ! } } } + + } + + + if( ! changeDataMap.empty() ) { + + epp_DomainUpdateChange_ref chg(new epp_DomainUpdateChange()); + if(changeDataMap.find("authinfo") != changeDataMap.end()) { + 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(changeDataMap["authinfo"])); + } + } } + + if ( extraDataMap.find("domain") == extraDataMap.end() ) l_req->m_name.ref(new epp_string("example.com")); + else l_req->m_name.ref(new epp_string(extraDataMap["domain"])); epp_DomainUpdate_ref l_obj(new epp_DomainUpdate()); |
From: Daniel M. <tub...@us...> - 2003-06-02 20:38:24
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory sc8-pr-cvs1:/tmp/cvs-serv10022 Modified Files: main_contactupdate.cc Log Message: using new vector method of handleArgs() for better help output Index: main_contactupdate.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactupdate.cc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** main_contactupdate.cc 30 May 2003 21:56:28 -0000 1.16 --- main_contactupdate.cc 2 Jun 2003 20:38:20 -0000 1.17 *************** *** 63,67 **** string username, password; ! string extra_usage = "[-extradata=trid=xxx:id=abc -add=status1=aaa:status2=bbb -remove=status1=ccc:status2=ddd -change=name=John Doe:org=ACME]"; if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; --- 63,71 ---- string username, password; ! vector<string> extra_usage; ! extra_usage.push_back("[-extradata=trid=xxx:id=abc"); ! extra_usage.push_back(" -add=status1=aaa:status2=bbb{:...}"); ! extra_usage.push_back(" -remove=status1=ccc:status2=ddd{:...}"); ! extra_usage.push_back(" -change=name=Johnny:org=ACME:authinfo=123123{:...}]"); if(!handleArgs(test, argc, argv, username, password, extra_usage)) return 1; *************** *** 114,117 **** --- 118,124 ---- epp_trid(trID))); + if ( extraDataMap.find("id") == extraDataMap.end() ) l_req->m_id.ref(new epp_string("sh8013")); + else l_req->m_id.ref(new epp_string(extraDataMap["id"])); + if( addDataMap.empty() && removeDataMap.empty() && *************** *** 144,148 **** status.m_value.ref(new epp_string("don't ever leave me")); - l_req->m_id.ref(new epp_string("sh8013")); l_req->m_change = chg; l_req->m_add.ref(new epp_ContactUpdateAddRemove()); --- 151,154 ---- *************** *** 151,160 **** } else { - if ( extraDataMap["id"].empty() ) { - l_req->m_id.ref(new epp_string("sh8013")); - } else { - l_req->m_id.ref(new epp_string(extraDataMap["id"])); - } - if( ! addDataMap.empty() ) { l_req->m_add.ref(new epp_ContactUpdateAddRemove()); --- 157,160 ---- |
From: Daniel M. <tub...@us...> - 2003-06-02 20:37:54
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory sc8-pr-cvs1:/tmp/cvs-serv9802 Modified Files: testTools.cc testTools.h Log Message: easier-to-use handleArgs() with vector of strings of extra usage Index: testTools.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/testTools.cc,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** testTools.cc 28 May 2003 19:56:46 -0000 1.22 --- testTools.cc 2 Jun 2003 20:37:50 -0000 1.23 *************** *** 188,191 **** --- 188,200 ---- const string & extra_usage) { + vector<string> extra_usage_vec; + if ( ! extra_usage.empty() ) extra_usage_vec.push_back(extra_usage); + return handleArgs(sess,argc,argv,username,password,extra_usage_vec); + } + + bool handleArgs(epp_Session & sess, int argc, char * argv[], + string & username, string & password, + const vector<string> & extra_usage) + { // CHANGE TRANSPORT HERE: typedef epp_TransportSSL myTransport; *************** *** 234,240 **** } ! if (!extra_usage.empty()) { cout << endl; ! cout << prognamespaces << " " << extra_usage; } --- 243,253 ---- } ! if ( extra_usage.size() > 0 ) { ! for ( vector<string>::const_iterator i = extra_usage.begin(); ! i != extra_usage.end(); ! i++ ) { cout << endl; ! cout << prognamespaces << " " << *i; ! } } Index: testTools.h =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/testTools.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** testTools.h 22 May 2003 20:27:07 -0000 1.16 --- testTools.h 2 Jun 2003 20:37:51 -0000 1.17 *************** *** 107,110 **** --- 107,125 ---- const std::string & extra_usage = (std::string)""); + /** 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 + * @param extra_usage Extra usage parameters + * @return true if arguments set correcetly, otherwise false + */ + bool handleArgs(eppobject::epp::epp_Session & sess, + int argc, char * argv[], + std::string & username, std::string & password, + const std::vector<std::string> & extra_usage); + /** Function that tries to login to a server using information in the * eppobject::epp::epp_Session object |