From 318ea42bbab64a1f1258ca124198738fc28c8731 Mon Sep 17 00:00:00 2001 From: Ren RenJuan Date: Fri, 17 Jan 2014 01:46:48 +0000 Subject: [PATCH] * --- ACTK1_0/Makefile | 6 +-- ACTK1_0/OTE/LPECheckCommandTest.cpp | 2 +- ACTK1_0/OTE/LPECheckResponse.cpp | 2 +- ACTK1_0/OTE/LPECheckResponseTest.cpp | 2 +- ACTK1_0/OTE/LPECreateCommand.cpp | 2 +- ACTK1_0/OTE/LPECreateResponse.cpp | 2 +- .../OTE/OteDomainModifyRegistrantCommand.cpp | 5 +- .../OteDomainTransferRegistrantCommand.cpp | 12 ++--- .../OteDomainTransferRegistrantResponse.cpp | 6 +-- ACTK1_0/OTE/OteLPECreateCommand.cpp | 4 +- ACTK1_0/OTE/OteLPECreateCommandTest.cpp | 2 +- .../se/AeDomainTransferRegistrantCommand.cpp | 2 +- .../se/AeDomainTransferRegistrantResponse.cpp | 2 +- AusRegEPPTK/se/ArDomainUnrenewCommand.cpp | 2 +- AusRegEPPTK/se/ArDomainUnrenewResponse.cpp | 2 +- .../se/ArDomainUnrenewResponseTest.cpp | 4 +- .../se/AuDomainTransferRegistrantCommand.cpp | 2 +- .../AuDomainTransferRegistrantCommandTest.cpp | 2 +- .../se/AuDomainTransferRegistrantResponse.cpp | 2 +- ...AuDomainTransferRegistrantResponseTest.cpp | 2 +- AusRegEPPTK/se/CreateResponse.cpp | 2 +- AusRegEPPTK/se/DomainCreateResponse.cpp | 2 +- AusRegEPPTK/se/DomainInfoResponse.cpp | 2 +- .../se/DomainRegistrantTransferCommand.cpp | 2 +- .../DomainRegistrantTransferCommandTest.cpp | 2 +- .../se/DomainRegistrantTransferResponse.cpp | 2 +- .../DomainRegistrantTransferResponseTest.cpp | 2 +- AusRegEPPTK/se/DomainRenewCommand.cpp | 6 +-- AusRegEPPTK/se/DomainRenewResponse.cpp | 2 +- AusRegEPPTK/se/DomainTransferResponse.cpp | 2 +- AusRegEPPTK/se/DomainUpdateCommandTest.cpp | 2 +- AusRegEPPTK/se/EPPDateFormatter.cpp | 6 +-- AusRegEPPTK/se/Greeting.cpp | 2 +- AusRegEPPTK/se/HostInfoResponseTest.cpp | 4 +- AusRegEPPTK/se/InfoResponse.cpp | 6 +-- AusRegEPPTK/se/NotificationResponse.cpp | 2 +- AusRegEPPTK/se/PollResponseTest.cpp | 4 +- AusRegEPPTK/se/Response.cpp | 2 +- AusRegEPPTK/se/TransferResponse.cpp | 4 +- AusRegEPPTK/se/XMLGregorianCalendar.cpp | 50 +++++++++---------- AusRegEPPTK/se/XMLGregorianCalendarTest.cpp | 22 ++++---- 41 files changed, 97 insertions(+), 96 deletions(-) diff --git a/ACTK1_0/Makefile b/ACTK1_0/Makefile index eb18c14..50167de 100644 --- a/ACTK1_0/Makefile +++ b/ACTK1_0/Makefile @@ -1,8 +1,8 @@ ################################################## # Makefile for building lib and main test routine# ################################################## -#LOCATION=DEBIAN_7 -LOCATION=DEBIAN_6 +LOCATION=DEBIAN_7 +#LOCATION=DEBIAN_6 #LOCATION=OSX_10_8 SYSTEM = $(shell uname -s) @@ -115,7 +115,7 @@ $(BUILD_OBJ_DIR)/%: $(BUILD_OBJ_DIR)/%.o # The toolkit raises the c++ "static initialization fiasco" situation. # ARTKOBJS= build/XMLGregorianCalendar.o build/XMLParser.o build/XMLWriter.o build/ACSession.o build/DomainAddRem.o build/EnumDomainInfoResponse.o build/log.o build/PostalInfoType.o build/SessionManagerPropertiesImpl.o \ -build/RegistrantObjectType.o / +build/RegistrantObjectType.o \ build/AddRemType.o build/DomainCheckResponse.o build/EnumDomainUpdateCommand.o build/LPECheckResponse.o build/Properties.o build/SessionPoolImpl.o \ build/boolean.o build/DomainCreateCommand.o build/EnumType.o build/LPECreateCommand.o build/ProtocolExtensionCommand.o build/SSLException.o \ build/CertificateUserMismatchException.o build/DomainCreateResponse.o build/EPPDateFormatter.o build/LPECreateResponse.o build/ReceiveSE.o build/StandardCommandType.o \ diff --git a/ACTK1_0/OTE/LPECheckCommandTest.cpp b/ACTK1_0/OTE/LPECheckCommandTest.cpp index b1eedf2..bd1e2a5 100644 --- a/ACTK1_0/OTE/LPECheckCommandTest.cpp +++ b/ACTK1_0/OTE/LPECheckCommandTest.cpp @@ -1,8 +1,8 @@ #include "common/init.hpp" #include "common/Test.hpp" #include "se/CLTRID.hpp" -#include "OTE/LPECheckCommand.hpp" #include "session/Timer.hpp" +#include "OTE/LPECheckCommand.hpp" #include diff --git a/ACTK1_0/OTE/LPECheckResponse.cpp b/ACTK1_0/OTE/LPECheckResponse.cpp index 2abc357..5ebc4b3 100644 --- a/ACTK1_0/OTE/LPECheckResponse.cpp +++ b/ACTK1_0/OTE/LPECheckResponse.cpp @@ -1,6 +1,6 @@ -#include "OTE/LPECheckResponse.hpp" #include "common/StringUtils.hpp" #include "se/StandardObjectType.hpp" +#include "OTE/LPECheckResponse.hpp" const std::string& LPECheckResponse::DOM_CHKDATA_COUNT_EXPR() { diff --git a/ACTK1_0/OTE/LPECheckResponseTest.cpp b/ACTK1_0/OTE/LPECheckResponseTest.cpp index aa61ecf..2e42491 100644 --- a/ACTK1_0/OTE/LPECheckResponseTest.cpp +++ b/ACTK1_0/OTE/LPECheckResponseTest.cpp @@ -1,10 +1,10 @@ -#include "OTE/LPECheckResponse.hpp" #include "session/TestEnvironment.hpp" #include "xml/XMLParser.hpp" #include "xml/XMLDocument.hpp" #include "common/init.hpp" #include "common/Test.hpp" +#include "OTE/LPECheckResponse.hpp" #include diff --git a/ACTK1_0/OTE/LPECreateCommand.cpp b/ACTK1_0/OTE/LPECreateCommand.cpp index 9323712..314175f 100644 --- a/ACTK1_0/OTE/LPECreateCommand.cpp +++ b/ACTK1_0/OTE/LPECreateCommand.cpp @@ -1,6 +1,6 @@ -#include "OTE/LPECreateCommand.hpp" #include "se/StandardObjectType.hpp" #include "xml/XMLHelper.hpp" +#include "OTE/LPECreateCommand.hpp" LPECreateCommand::LPECreateCommand (const std::string& name, diff --git a/ACTK1_0/OTE/LPECreateResponse.cpp b/ACTK1_0/OTE/LPECreateResponse.cpp index 7230c2a..56cb9f9 100644 --- a/ACTK1_0/OTE/LPECreateResponse.cpp +++ b/ACTK1_0/OTE/LPECreateResponse.cpp @@ -1,7 +1,7 @@ -#include "OTE/LPECreateResponse.hpp" #include "se/StandardObjectType.hpp" #include "se/EPPDateFormatter.hpp" #include "common/StringUtils.hpp" +#include "OTE/LPECreateResponse.hpp" const std::string LPECreateResponse::DOM_CR_DATE_EXPR (LPECreateResponse::exprReplace diff --git a/ACTK1_0/OTE/OteDomainModifyRegistrantCommand.cpp b/ACTK1_0/OTE/OteDomainModifyRegistrantCommand.cpp index aac92f4..f86f10a 100644 --- a/ACTK1_0/OTE/OteDomainModifyRegistrantCommand.cpp +++ b/ACTK1_0/OTE/OteDomainModifyRegistrantCommand.cpp @@ -1,7 +1,8 @@ -#include "OTE/OteDomainModifyRegistrantCommand.hpp" #include "common/ErrorPkg.hpp" -#include "OTE/OteExtension.hpp" #include "xml/XMLHelper.hpp" +#include "OTE/OteExtension.hpp" +#include "OTE/OteDomainModifyRegistrantCommand.hpp" + namespace { OteExtension& oteExtension() { diff --git a/ACTK1_0/OTE/OteDomainTransferRegistrantCommand.cpp b/ACTK1_0/OTE/OteDomainTransferRegistrantCommand.cpp index ac5230b..de4459d 100644 --- a/ACTK1_0/OTE/OteDomainTransferRegistrantCommand.cpp +++ b/ACTK1_0/OTE/OteDomainTransferRegistrantCommand.cpp @@ -1,12 +1,12 @@ -#include "OTE/OteDomainTransferRegistrantCommand.hpp" #include "se/XMLGregorianCalendar.hpp" - +#include "se/CommandType.hpp" +#include "common/ErrorPkg.hpp" +#include "se/Period.hpp" +#include "se/RegistrantTransferCommandType.hpp" #include "OTE/OteExtension.hpp" #include "OTE/OteDomainObjectType.hpp" -#include "se/RegistrantTransferCommandType.hpp" -#include "se/CommandType.hpp" -#include "se/Period.hpp" -#include "common/ErrorPkg.hpp" +#include "OTE/OteDomainTransferRegistrantCommand.hpp" + #include "se/EPPDateFormatter.hpp" diff --git a/ACTK1_0/OTE/OteDomainTransferRegistrantResponse.cpp b/ACTK1_0/OTE/OteDomainTransferRegistrantResponse.cpp index 1e4a1fd..3427da8 100644 --- a/ACTK1_0/OTE/OteDomainTransferRegistrantResponse.cpp +++ b/ACTK1_0/OTE/OteDomainTransferRegistrantResponse.cpp @@ -1,9 +1,9 @@ -#include "OTE/OteDomainTransferRegistrantResponse.hpp" -#include "OTE/OteDomainObjectType.hpp" #include "se/RegistrantTransferCommandType.hpp" #include "se/EPPDateFormatter.hpp" +#include "OTE/OteDomainObjectType.hpp" +#include "OTE/OteDomainTransferRegistrantResponse.hpp" -namespace { +namespace { const RegistrantTransferCommandType rtrnType; OteDomainObjectType otedomType; } // anonymous namespace diff --git a/ACTK1_0/OTE/OteLPECreateCommand.cpp b/ACTK1_0/OTE/OteLPECreateCommand.cpp index c7cbc17..1858ed4 100644 --- a/ACTK1_0/OTE/OteLPECreateCommand.cpp +++ b/ACTK1_0/OTE/OteLPECreateCommand.cpp @@ -1,7 +1,7 @@ -#include "OTE/OteLPECreateCommand.hpp" #include "xml/XMLHelper.hpp" -#include "OTE/OteExtension.hpp" #include "common/ErrorPkg.hpp" +#include "OTE/OteExtension.hpp" +#include "OTE/OteLPECreateCommand.hpp" namespace { Extension& oteExtension() { diff --git a/ACTK1_0/OTE/OteLPECreateCommandTest.cpp b/ACTK1_0/OTE/OteLPECreateCommandTest.cpp index 597b9fc..004f8a7 100644 --- a/ACTK1_0/OTE/OteLPECreateCommandTest.cpp +++ b/ACTK1_0/OTE/OteLPECreateCommandTest.cpp @@ -1,9 +1,9 @@ #include "common/init.hpp" #include "common/Test.hpp" #include "session/Timer.hpp" +#include "se/CLTRID.hpp" #include "se/ContactCheckCommand.hpp" #include "OTE/OteLPECreateCommand.hpp" -#include "se/CLTRID.hpp" using namespace std; diff --git a/AusRegEPPTK/se/AeDomainTransferRegistrantCommand.cpp b/AusRegEPPTK/se/AeDomainTransferRegistrantCommand.cpp index 85fe3be..988ae7a 100644 --- a/AusRegEPPTK/se/AeDomainTransferRegistrantCommand.cpp +++ b/AusRegEPPTK/se/AeDomainTransferRegistrantCommand.cpp @@ -24,7 +24,7 @@ namespace { AeDomainTransferRegistrantCommand::AeDomainTransferRegistrantCommand ( const std::string& name, - const XMLGregorianCalendar& curExpDate, + constXMLGC::XMLGregorianCalendar& curExpDate, const std::string& eligibilityType, int policyReason, const std::string& registrantName, diff --git a/AusRegEPPTK/se/AeDomainTransferRegistrantResponse.cpp b/AusRegEPPTK/se/AeDomainTransferRegistrantResponse.cpp index 9aac8f7..e65486c 100644 --- a/AusRegEPPTK/se/AeDomainTransferRegistrantResponse.cpp +++ b/AusRegEPPTK/se/AeDomainTransferRegistrantResponse.cpp @@ -31,7 +31,7 @@ void AeDomainTransferRegistrantResponse::fromXML(XMLDocument* xmlDoc) throw (Par name = xmlDoc->getNodeValue(AEDOM_NAME_EXPR); std::string exDateStr = xmlDoc->getNodeValue(AEDOM_EX_DATE_EXPR); - exDate = std::auto_ptr( + exDate = std::auto_ptr( EPPDateFormatter::fromXSDateTime(exDateStr)); } diff --git a/AusRegEPPTK/se/ArDomainUnrenewCommand.cpp b/AusRegEPPTK/se/ArDomainUnrenewCommand.cpp index d204d91..60d76d7 100644 --- a/AusRegEPPTK/se/ArDomainUnrenewCommand.cpp +++ b/AusRegEPPTK/se/ArDomainUnrenewCommand.cpp @@ -27,7 +27,7 @@ namespace { ArDomainUnrenewCommand::ArDomainUnrenewCommand( const std::string &name, - const XMLGregorianCalendar& exDate) : ProtocolExtensionCommand( + constXMLGC::XMLGregorianCalendar& exDate) : ProtocolExtensionCommand( &unrenewCmdType, &ardomType, name, arExtension()) { std::string exDateStr = EPPDateFormatter::toXSDate(exDate); diff --git a/AusRegEPPTK/se/ArDomainUnrenewResponse.cpp b/AusRegEPPTK/se/ArDomainUnrenewResponse.cpp index 0f0b42a..2ea6d55 100644 --- a/AusRegEPPTK/se/ArDomainUnrenewResponse.cpp +++ b/AusRegEPPTK/se/ArDomainUnrenewResponse.cpp @@ -31,7 +31,7 @@ void ArDomainUnrenewResponse::fromXML(XMLDocument* xmlDoc) throw (ParsingExcepti name = xmlDoc->getNodeValue(ARDOM_NAME_EXPR); std::string exDateStr = xmlDoc->getNodeValue(ARDOM_EX_DATE_EXPR); - exDate = std::auto_ptr( + exDate = std::auto_ptr( EPPDateFormatter::fromXSDateTime(exDateStr)); } diff --git a/AusRegEPPTK/se/ArDomainUnrenewResponseTest.cpp b/AusRegEPPTK/se/ArDomainUnrenewResponseTest.cpp index 49c3f23..08a895e 100644 --- a/AusRegEPPTK/se/ArDomainUnrenewResponseTest.cpp +++ b/AusRegEPPTK/se/ArDomainUnrenewResponseTest.cpp @@ -22,7 +22,7 @@ void doWork() response1.fromXML(doc.get()); { ASSERT_EQ(response1.getName(), "example.com"); - const XMLGregorianCalendar *exDate = response1.getExpiryDate(); + constXMLGC::XMLGregorianCalendar *exDate = response1.getExpiryDate(); string res = EPPDateFormatter::toXSDateTime(*exDate); ASSERT_EQ(res, "2009-04-03T22:00:00.0Z"); const vector& results(response1.getResults()); @@ -36,7 +36,7 @@ void doWork() response2.fromXML(doc2.get()); { ASSERT_EQ(response2.getName(), "example.com"); - const XMLGregorianCalendar *exDate = response2.getExpiryDate(); + constXMLGC::XMLGregorianCalendar *exDate = response2.getExpiryDate(); ASSERT_NULL(exDate); const vector& results(response2.getResults()); ASSERT_EQ(response2.getCLTRID(), "ABC-12345"); diff --git a/AusRegEPPTK/se/AuDomainTransferRegistrantCommand.cpp b/AusRegEPPTK/se/AuDomainTransferRegistrantCommand.cpp index 57c4491..de3a2fe 100644 --- a/AusRegEPPTK/se/AuDomainTransferRegistrantCommand.cpp +++ b/AusRegEPPTK/se/AuDomainTransferRegistrantCommand.cpp @@ -24,7 +24,7 @@ namespace { AuDomainTransferRegistrantCommand::AuDomainTransferRegistrantCommand ( const std::string& name, - const XMLGregorianCalendar& curExpDate, + constXMLGC::XMLGregorianCalendar& curExpDate, const std::string& eligibilityType, int policyReason, const std::string& registrantName, diff --git a/AusRegEPPTK/se/AuDomainTransferRegistrantCommandTest.cpp b/AusRegEPPTK/se/AuDomainTransferRegistrantCommandTest.cpp index fe9ccf5..fe3cc10 100644 --- a/AusRegEPPTK/se/AuDomainTransferRegistrantCommandTest.cpp +++ b/AusRegEPPTK/se/AuDomainTransferRegistrantCommandTest.cpp @@ -22,7 +22,7 @@ void doWork() const string eligibilityName = "Blah"; const string eligibilityID = "1231239523"; const string eligibilityIDType = "OTHER"; - auto_ptr curExpDate(EPPDateFormatter::fromXSDateTime("2014-01-01T01:01:01.0Z")); + auto_ptr curExpDate(EPPDateFormatter::fromXSDateTime("2014-01-01T01:01:01.0Z")); { Timer::setTime("20070101.010101"); diff --git a/AusRegEPPTK/se/AuDomainTransferRegistrantResponse.cpp b/AusRegEPPTK/se/AuDomainTransferRegistrantResponse.cpp index e18b0f6..ee7a5a0 100644 --- a/AusRegEPPTK/se/AuDomainTransferRegistrantResponse.cpp +++ b/AusRegEPPTK/se/AuDomainTransferRegistrantResponse.cpp @@ -31,7 +31,7 @@ void AuDomainTransferRegistrantResponse::fromXML(XMLDocument* xmlDoc) throw (Par name = xmlDoc->getNodeValue(AUDOM_NAME_EXPR); std::string exDateStr = xmlDoc->getNodeValue(AUDOM_EX_DATE_EXPR); - exDate = std::auto_ptr( + exDate = std::auto_ptr( EPPDateFormatter::fromXSDateTime(exDateStr)); } diff --git a/AusRegEPPTK/se/AuDomainTransferRegistrantResponseTest.cpp b/AusRegEPPTK/se/AuDomainTransferRegistrantResponseTest.cpp index 33dd381..99df987 100644 --- a/AusRegEPPTK/se/AuDomainTransferRegistrantResponseTest.cpp +++ b/AusRegEPPTK/se/AuDomainTransferRegistrantResponseTest.cpp @@ -20,7 +20,7 @@ void doWork() response.fromXML(doc.get()); { ASSERT_EQ(response.getName(), "example.com"); - const XMLGregorianCalendar *exDate = response.getExpiryDate(); + constXMLGC::XMLGregorianCalendar *exDate = response.getExpiryDate(); string res = EPPDateFormatter::toXSDateTime(*exDate); ASSERT_EQ(res, "2009-04-03T22:00:00.0Z"); const vector& results(response.getResults()); diff --git a/AusRegEPPTK/se/CreateResponse.cpp b/AusRegEPPTK/se/CreateResponse.cpp index a565930..d7b806d 100644 --- a/AusRegEPPTK/se/CreateResponse.cpp +++ b/AusRegEPPTK/se/CreateResponse.cpp @@ -35,7 +35,7 @@ void CreateResponse::fromXML(XMLDocument *xmlDoc) throw (ParsingException) try { std::string crDateStr = xmlDoc->getNodeValue(crDateExpr()); - crDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(crDateStr)); + crDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(crDateStr)); } catch (IllegalArgException& iae) { diff --git a/AusRegEPPTK/se/DomainCreateResponse.cpp b/AusRegEPPTK/se/DomainCreateResponse.cpp index 2f77d07..db1d486 100644 --- a/AusRegEPPTK/se/DomainCreateResponse.cpp +++ b/AusRegEPPTK/se/DomainCreateResponse.cpp @@ -35,7 +35,7 @@ void DomainCreateResponse::fromXML (XMLDocument *xmlDoc) throw (ParsingException { name = xmlDoc->getNodeValue (DOM_NAME_EXPR); std::string exDateStr = xmlDoc->getNodeValue (DOM_EX_DATE_EXPR); - exDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(exDateStr)); + exDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(exDateStr)); } catch (XPathExpressionException& e) { diff --git a/AusRegEPPTK/se/DomainInfoResponse.cpp b/AusRegEPPTK/se/DomainInfoResponse.cpp index 5601685..78c3684 100644 --- a/AusRegEPPTK/se/DomainInfoResponse.cpp +++ b/AusRegEPPTK/se/DomainInfoResponse.cpp @@ -160,7 +160,7 @@ void DomainInfoResponse::fromXML(XMLDocument *xmlDoc) throw (ParsingException) name = xmlDoc->getNodeValue(DOM_NAME_EXPR()); pw = xmlDoc->getNodeValue(DOM_PW_EXPR()); registrantID = xmlDoc->getNodeValue (DOM_REGISTRANT_EXPR()); - exDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime + exDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime (xmlDoc->getNodeValue (DOM_EX_DATE_EXPR()))); delHosts = xmlDoc->getNodeValues(DOM_NS_EXPR()); subHosts = xmlDoc->getNodeValues(DOM_HOST_EXPR()); diff --git a/AusRegEPPTK/se/DomainRegistrantTransferCommand.cpp b/AusRegEPPTK/se/DomainRegistrantTransferCommand.cpp index 79ae7af..92a233f 100644 --- a/AusRegEPPTK/se/DomainRegistrantTransferCommand.cpp +++ b/AusRegEPPTK/se/DomainRegistrantTransferCommand.cpp @@ -24,7 +24,7 @@ RegistrantObjectType& registrantObjectType() { } // anonymous namespace DomainRegistrantTransferCommand::DomainRegistrantTransferCommand(const std::string& name, - const XMLGregorianCalendar& curExpDate, + constXMLGC::XMLGregorianCalendar& curExpDate, const std::string& kvListName, const std::string& explanation, const Period* period) : diff --git a/AusRegEPPTK/se/DomainRegistrantTransferCommandTest.cpp b/AusRegEPPTK/se/DomainRegistrantTransferCommandTest.cpp index 3ff3343..6542c16 100644 --- a/AusRegEPPTK/se/DomainRegistrantTransferCommandTest.cpp +++ b/AusRegEPPTK/se/DomainRegistrantTransferCommandTest.cpp @@ -16,7 +16,7 @@ const static std::string policyReason = "1"; const static std::string eligibilityName = "Blah"; const static std::string eligibilityIDValue = "1231239523"; const static std::string eligibilityIDType = "Trademark"; -const auto_ptr curExpDate(EPPDateFormatter::fromXSDateTime("2014-01-01T01:01:01.0Z")); +const auto_ptr curExpDate(EPPDateFormatter::fromXSDateTime("2014-01-01T01:01:01.0Z")); const static std::string kvListName = "ae"; void addSampleKVItems(DomainRegistrantTransferCommand *command); diff --git a/AusRegEPPTK/se/DomainRegistrantTransferResponse.cpp b/AusRegEPPTK/se/DomainRegistrantTransferResponse.cpp index 1c6d011..068fd0f 100644 --- a/AusRegEPPTK/se/DomainRegistrantTransferResponse.cpp +++ b/AusRegEPPTK/se/DomainRegistrantTransferResponse.cpp @@ -31,7 +31,7 @@ void DomainRegistrantTransferResponse::fromXML(XMLDocument* xmlDoc) throw (Parsi name = xmlDoc->getNodeValue(REGISTRANT_NAME_EXPR); std::string exDateStr = xmlDoc->getNodeValue(REGISTRANT_EX_DATE_EXPR); - exDate = std::auto_ptr( + exDate = std::auto_ptr( EPPDateFormatter::fromXSDateTime(exDateStr)); } diff --git a/AusRegEPPTK/se/DomainRegistrantTransferResponseTest.cpp b/AusRegEPPTK/se/DomainRegistrantTransferResponseTest.cpp index 6422216..a33c6c3 100644 --- a/AusRegEPPTK/se/DomainRegistrantTransferResponseTest.cpp +++ b/AusRegEPPTK/se/DomainRegistrantTransferResponseTest.cpp @@ -20,7 +20,7 @@ void doWork() response.fromXML(doc.get()); { ASSERT_EQ(response.getName(), "example.com"); - const XMLGregorianCalendar *exDate = response.getExpiryDate(); + constXMLGC::XMLGregorianCalendar *exDate = response.getExpiryDate(); string res = EPPDateFormatter::toXSDateTime(*exDate); ASSERT_EQ(res, "2009-04-03T22:00:00.0Z"); const vector& results(response.getResults()); diff --git a/AusRegEPPTK/se/DomainRenewCommand.cpp b/AusRegEPPTK/se/DomainRenewCommand.cpp index 664c705..1df2e5d 100644 --- a/AusRegEPPTK/se/DomainRenewCommand.cpp +++ b/AusRegEPPTK/se/DomainRenewCommand.cpp @@ -6,7 +6,7 @@ #include "se/EPPDateFormatter.hpp" DomainRenewCommand::DomainRenewCommand (const std::string &name, - const XMLGregorianCalendar &exDate) + constXMLGC::XMLGregorianCalendar &exDate) : ObjectCommand(StandardCommandType::RENEW(), StandardObjectType::DOMAIN(), name) @@ -16,7 +16,7 @@ DomainRenewCommand::DomainRenewCommand (const std::string &name, DomainRenewCommand::DomainRenewCommand (const std::string &name, - const XMLGregorianCalendar &exDate, + constXMLGC::XMLGregorianCalendar &exDate, const Period &period) : ObjectCommand(StandardCommandType::RENEW(), StandardObjectType::DOMAIN(), @@ -29,7 +29,7 @@ DomainRenewCommand::DomainRenewCommand (const std::string &name, void DomainRenewCommand::Init (const std::string &name, - const XMLGregorianCalendar &exDate) + constXMLGC::XMLGregorianCalendar &exDate) { XMLHelper::setTextContent (xmlWriter->appendChild (objElement, "curExpDate"), diff --git a/AusRegEPPTK/se/DomainRenewResponse.cpp b/AusRegEPPTK/se/DomainRenewResponse.cpp index b1e4035..9936982 100644 --- a/AusRegEPPTK/se/DomainRenewResponse.cpp +++ b/AusRegEPPTK/se/DomainRenewResponse.cpp @@ -26,7 +26,7 @@ void DomainRenewResponse::fromXML (XMLDocument *xmlDoc) throw (ParsingException) { name = xmlDoc->getNodeValue (DOM_NAME_EXPR); std::string exDateStr = xmlDoc->getNodeValue (DOM_EX_DATE_EXPR); - exDate = std::auto_ptr( + exDate = std::auto_ptr( EPPDateFormatter::fromXSDateTime(exDateStr)); } catch (XPathExpressionException& e) diff --git a/AusRegEPPTK/se/DomainTransferResponse.cpp b/AusRegEPPTK/se/DomainTransferResponse.cpp index bd83417..9972d8a 100644 --- a/AusRegEPPTK/se/DomainTransferResponse.cpp +++ b/AusRegEPPTK/se/DomainTransferResponse.cpp @@ -48,7 +48,7 @@ void DomainTransferResponse::fromXML (XMLDocument *xmlDoc) throw (ParsingExcepti name = xmlDoc->getNodeValue(DOM_NAME_EXPR); std::string exDateStr = xmlDoc->getNodeValue(DOM_EXDATE_EXPR); if (exDateStr.length() > 0) - exDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(exDateStr)); + exDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(exDateStr)); } catch (XPathExpressionException& e) { diff --git a/AusRegEPPTK/se/DomainUpdateCommandTest.cpp b/AusRegEPPTK/se/DomainUpdateCommandTest.cpp index 9d0f117..6ee7a33 100644 --- a/AusRegEPPTK/se/DomainUpdateCommandTest.cpp +++ b/AusRegEPPTK/se/DomainUpdateCommandTest.cpp @@ -86,7 +86,7 @@ void testSyncExpiryDateExtension(void) CLTRID::setClID("JTKUTEST"); DomainUpdateCommand cmd("jtkutest.com.au"); - XMLGregorianCalendar *newExpiryDate = EPPDateFormatter::fromXSDateTime("2005-04-03T22:00:00.0Z"); + XMLGC::XMLGregorianCalendar *newExpiryDate = EPPDateFormatter::fromXSDateTime("2005-04-03T22:00:00.0Z"); DomainUpdateSyncCommandExtension extension(newExpiryDate); cmd.appendExtension(extension); diff --git a/AusRegEPPTK/se/EPPDateFormatter.cpp b/AusRegEPPTK/se/EPPDateFormatter.cpp index f897272..ecebfd0 100644 --- a/AusRegEPPTK/se/EPPDateFormatter.cpp +++ b/AusRegEPPTK/se/EPPDateFormatter.cpp @@ -2,12 +2,12 @@ #include "se/XMLGregorianCalendar.hpp" #include -std::string EPPDateFormatter::toXSDateTime(const XMLGregorianCalendar& date) +std::string EPPDateFormatter::toXSDateTime(constXMLGC::XMLGregorianCalendar& date) { return date.toXMLFormat(); } -std::string EPPDateFormatter::toXSDate(const XMLGregorianCalendar& date) +std::string EPPDateFormatter::toXSDate(constXMLGC::XMLGregorianCalendar& date) { return date.format("%Y-%M-%D"); } @@ -16,7 +16,7 @@ XMLGregorianCalendar* EPPDateFormatter::fromXSDateTime(const std::string &dateTi { try { - return new XMLGregorianCalendar(dateTime); + return newXMLGC::XMLGregorianCalendar(dateTime); } catch (MalformedDateException& e) { diff --git a/AusRegEPPTK/se/Greeting.cpp b/AusRegEPPTK/se/Greeting.cpp index d043112..77920dd 100644 --- a/AusRegEPPTK/se/Greeting.cpp +++ b/AusRegEPPTK/se/Greeting.cpp @@ -55,7 +55,7 @@ void Greeting::fromXML(XMLDocument *xmlDoc) throw (ParsingException) // debugLogger->info (xmlDoc->toString()); svID = xmlDoc->getNodeValue (SVID_EXPR); std::string svDateText = xmlDoc->getNodeValue (SVDATE_EXPR); - svDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(svDateText)); + svDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(svDateText)); versions = xmlDoc->getNodeValues(VERSIONS_EXPR); langs = xmlDoc->getNodeValues(LANGS_EXPR); objURIs = xmlDoc->getNodeValues(OBJ_URIS_EXPR); diff --git a/AusRegEPPTK/se/HostInfoResponseTest.cpp b/AusRegEPPTK/se/HostInfoResponseTest.cpp index 5babb22..35c2411 100644 --- a/AusRegEPPTK/se/HostInfoResponseTest.cpp +++ b/AusRegEPPTK/se/HostInfoResponseTest.cpp @@ -38,11 +38,11 @@ void doWork() { ASSERT_EQ("NS1_EXAMPLE1-REP", response.getROID()); - auto_ptr dt( + auto_ptr dt( EPPDateFormatter::fromXSDateTime("1999-04-03T22:00:00.0Z")); ASSERT_EQ(EPPDateFormatter::toXSDateTime(*dt), "1999-04-03T22:00:00.0Z"); - auto_ptr dt2( + auto_ptr dt2( EPPDateFormatter::fromXSDateTime("1999-04-03T22:00:00.0Z")); ASSERT_EQ(EPPDateFormatter::toXSDateTime(*dt2), "1999-04-03T22:00:00.0Z"); diff --git a/AusRegEPPTK/se/InfoResponse.cpp b/AusRegEPPTK/se/InfoResponse.cpp index f147f61..0e9942d 100644 --- a/AusRegEPPTK/se/InfoResponse.cpp +++ b/AusRegEPPTK/se/InfoResponse.cpp @@ -96,9 +96,9 @@ void InfoResponse::fromXML (XMLDocument *xmlDoc) throw (ParsingException) std::string upDateStr = xmlDoc->getNodeValue(upDateExpr()); std::string trDateStr = xmlDoc->getNodeValue(trDateExpr()); - crDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(crDateStr)); - upDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(upDateStr)); - trDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(trDateStr)); + crDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(crDateStr)); + upDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(upDateStr)); + trDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(trDateStr)); int statusCount = xmlDoc->getNodeCount (statusCountExpr()); statuses.clear(); diff --git a/AusRegEPPTK/se/NotificationResponse.cpp b/AusRegEPPTK/se/NotificationResponse.cpp index df1f4ca..2cd19e0 100644 --- a/AusRegEPPTK/se/NotificationResponse.cpp +++ b/AusRegEPPTK/se/NotificationResponse.cpp @@ -86,7 +86,7 @@ void NotificationResponse::fromXML(XMLDocument *xmlDoc) throw (ParsingException) padateStr = xmlDoc->getNodeValue(padateExpr()); result = (resultStr == "1"); - paDate = std::auto_ptr( + paDate = std::auto_ptr( EPPDateFormatter::fromXSDateTime(padateStr)); } catch (XPathExpressionException& e) diff --git a/AusRegEPPTK/se/PollResponseTest.cpp b/AusRegEPPTK/se/PollResponseTest.cpp index df50907..5f27e56 100644 --- a/AusRegEPPTK/se/PollResponseTest.cpp +++ b/AusRegEPPTK/se/PollResponseTest.cpp @@ -44,7 +44,7 @@ void testContactTransferApprovePoll() results[0].getResultMessage()); ASSERT_EQ("ABC-12345", response.getCLTRID()); - const XMLGregorianCalendar *qDate1 = response.getMessageEnqueueDate(); + constXMLGC::XMLGregorianCalendar *qDate1 = response.getMessageEnqueueDate(); std::string res = EPPDateFormatter::toXSDateTime(*qDate1); ASSERT_EQ(res, "2000-06-08T22:00:00.0Z"); @@ -76,7 +76,7 @@ void testDomainTransferApprovePoll() results[0].getResultMessage()); ASSERT_EQ("ABC-12345", response.getCLTRID()); - const XMLGregorianCalendar *qDate1 = response.getMessageEnqueueDate(); + constXMLGC::XMLGregorianCalendar *qDate1 = response.getMessageEnqueueDate(); std::string res = EPPDateFormatter::toXSDateTime(*qDate1); ASSERT_EQ(res, "2000-06-08T22:00:00.0Z"); diff --git a/AusRegEPPTK/se/Response.cpp b/AusRegEPPTK/se/Response.cpp index ae35c1e..779a5f3 100644 --- a/AusRegEPPTK/se/Response.cpp +++ b/AusRegEPPTK/se/Response.cpp @@ -124,7 +124,7 @@ void Response::fromXML (XMLDocument *xmlDoc) throw (ParsingException) std::string msgQqDate = xmlDoc->getNodeValue(MSGQ_QDATE_EXPR()); if (msgQqDate != "") - qDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(msgQqDate)); + qDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(msgQqDate)); msg = xmlDoc->getNodeValue(MSGQ_MSG_EXPR()); msgLang = xmlDoc->getNodeValue (MSGQ_MSG_LANG_EXPR()); diff --git a/AusRegEPPTK/se/TransferResponse.cpp b/AusRegEPPTK/se/TransferResponse.cpp index 1f3048e..f2e89e5 100644 --- a/AusRegEPPTK/se/TransferResponse.cpp +++ b/AusRegEPPTK/se/TransferResponse.cpp @@ -60,12 +60,12 @@ void TransferResponse::fromXML (XMLDocument *xmlDoc) throw (ParsingException) reID = xmlDoc->getNodeValue (reIDExpr()); string reDateStr = xmlDoc->getNodeValue(reDateExpr()); if (reDateStr.length() > 0) - reDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(reDateStr)); + reDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(reDateStr)); acID = xmlDoc->getNodeValue(acIDExpr()); string acDateStr = xmlDoc->getNodeValue (acDateExpr()); if (acDateStr.length() > 0) - acDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(acDateStr)); + acDate = std::auto_ptr(EPPDateFormatter::fromXSDateTime(acDateStr)); } catch (XPathExpressionException& e) { diff --git a/AusRegEPPTK/se/XMLGregorianCalendar.cpp b/AusRegEPPTK/se/XMLGregorianCalendar.cpp index 5b1fbe2..91aef51 100644 --- a/AusRegEPPTK/se/XMLGregorianCalendar.cpp +++ b/AusRegEPPTK/se/XMLGregorianCalendar.cpp @@ -9,7 +9,7 @@ using namespace std; -const char * XMLGregorianCalendar::FIELD_NAME[] = +const char *XMLGC::XMLGregorianCalendar::FIELD_NAME[] = { "Year", "Month", "Day", @@ -19,7 +19,7 @@ const char * XMLGregorianCalendar::FIELD_NAME[] = "Millisecond", "Timezone" }; -const int XMLGregorianCalendar::daysInMonth[] = +const intXMLGC::XMLGregorianCalendar::daysInMonth[] = { 0, // XML Schema months start at 1. 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; @@ -68,7 +68,7 @@ class Parser public: Parser (const string &format, const string &value, - XMLGregorianCalendar *calendar) + XMLGC::XMLGregorianCalendar *calendar) : calendar(calendar), format(format), value(value), flen(format.length()), vlen(value.length()), fidx(0), vidx(0) { } @@ -148,7 +148,7 @@ public: // End parse() private: - XMLGregorianCalendar *calendar; + XMLGC::XMLGregorianCalendar *calendar; string format, value; int flen, vlen; @@ -348,7 +348,7 @@ XMLGregorianCalendar::XMLGregorianCalendar(const string &lexicalRepresentation) if (!isValid()) throw MalformedDateException("common.date.format"); } -bool XMLGregorianCalendar::isValid() const +boolXMLGC::XMLGregorianCalendar::isValid() const { if (year == 0) return false; @@ -373,7 +373,7 @@ bool XMLGregorianCalendar::isValid() const return true; } -void XMLGregorianCalendar::setMonth (int month) +void XMLGC::XMLGregorianCalendar::setMonth (int month) { if ((month < JANUARY || DECEMBER < month) && month != FIELD_UNDEFINED) invalidFieldValue (MONTH, month); @@ -381,7 +381,7 @@ void XMLGregorianCalendar::setMonth (int month) this->month = month; } -void XMLGregorianCalendar::setDay (int day) +void XMLGC::XMLGregorianCalendar::setDay (int day) { if ((day < 1 || 31 < day) && day != FIELD_UNDEFINED) invalidFieldValue (DAY, day); @@ -389,7 +389,7 @@ void XMLGregorianCalendar::setDay (int day) this->day = day; } -void XMLGregorianCalendar::setTimezone (int offset) +void XMLGC::XMLGregorianCalendar::setTimezone (int offset) { if ((offset < -14*60 || 14*60 < offset) && offset != FIELD_UNDEFINED) invalidFieldValue (TIMEZONE, offset); @@ -397,7 +397,7 @@ void XMLGregorianCalendar::setTimezone (int offset) this->timezone = offset; } -void XMLGregorianCalendar::setTime (int hour, +void XMLGC::XMLGregorianCalendar::setTime (int hour, int minute, int second, long double fractional) @@ -419,7 +419,7 @@ void XMLGregorianCalendar::setTime (int hour, testHour(); } -void XMLGregorianCalendar::testHour() +void XMLGC::XMLGregorianCalendar::testHour() { if (hour == 24 && (getMinute() != 0 || getSecond() != 0)) @@ -427,7 +427,7 @@ void XMLGregorianCalendar::testHour() } -void XMLGregorianCalendar::setHour (int hour, bool validate) +void XMLGC::XMLGregorianCalendar::setHour (int hour, bool validate) { if ((hour < 0 || hour > 24) && hour != FIELD_UNDEFINED) invalidFieldValue (HOUR, hour); @@ -438,7 +438,7 @@ void XMLGregorianCalendar::setHour (int hour, bool validate) testHour(); } -void XMLGregorianCalendar::setMinute (int minute) +void XMLGC::XMLGregorianCalendar::setMinute (int minute) { if ((minute < 0 || 59 < minute) && minute != FIELD_UNDEFINED) invalidFieldValue (MINUTE, minute); @@ -446,7 +446,7 @@ void XMLGregorianCalendar::setMinute (int minute) this->minute = minute; } -void XMLGregorianCalendar::setSecond (int second) +void XMLGC::XMLGregorianCalendar::setSecond (int second) { if ((second < 0 || 60 < second) && // leap second allows for 60 second != FIELD_UNDEFINED) @@ -457,7 +457,7 @@ void XMLGregorianCalendar::setSecond (int second) this->second = second; } -void XMLGregorianCalendar::setFractionalSecond(long double fractional) +void XMLGC::XMLGregorianCalendar::setFractionalSecond(long double fractional) { if (fractional < 0.0 || fractional >= 1.0) throw IllegalArgException ("Invalid fractional seconds"); @@ -470,12 +470,12 @@ QName getXMLSchemaType(int year, int month, int day, int hour, int minute, int s throw (IllegalStateException) { unsigned int mask = - (year != XMLGregorianCalendar::FIELD_UNDEFINED ? 0x20 : 0) | - (month != XMLGregorianCalendar::FIELD_UNDEFINED ? 0x10 : 0) | - (day != XMLGregorianCalendar::FIELD_UNDEFINED ? 0x08 : 0) | - (hour != XMLGregorianCalendar::FIELD_UNDEFINED ? 0x04 : 0) | - (minute != XMLGregorianCalendar::FIELD_UNDEFINED ? 0x02 : 0) | - (second != XMLGregorianCalendar::FIELD_UNDEFINED ? 0x01 : 0); + (year !=XMLGC::XMLGregorianCalendar::FIELD_UNDEFINED ? 0x20 : 0) | + (month !=XMLGC::XMLGregorianCalendar::FIELD_UNDEFINED ? 0x10 : 0) | + (day !=XMLGC::XMLGregorianCalendar::FIELD_UNDEFINED ? 0x08 : 0) | + (hour !=XMLGC::XMLGregorianCalendar::FIELD_UNDEFINED ? 0x04 : 0) | + (minute !=XMLGC::XMLGregorianCalendar::FIELD_UNDEFINED ? 0x02 : 0) | + (second !=XMLGC::XMLGregorianCalendar::FIELD_UNDEFINED ? 0x01 : 0); switch (mask) { @@ -517,7 +517,7 @@ QName getXMLSchemaType(int year, int month, int day, int hour, int minute, int s // End switch } -string XMLGregorianCalendar::toXMLFormat() const +stringXMLGC::XMLGregorianCalendar::toXMLFormat() const { string formatString; @@ -563,7 +563,7 @@ string XMLGregorianCalendar::toXMLFormat() const return format (formatString); } -string XMLGregorianCalendar::format (const string &format) const +stringXMLGC::XMLGregorianCalendar::format (const string &format) const { string buf; @@ -646,7 +646,7 @@ string XMLGregorianCalendar::format (const string &format) const } -long double XMLGregorianCalendar::getSeconds() const +long doubleXMLGC::XMLGregorianCalendar::getSeconds() const { if (second == FIELD_UNDEFINED) return 0.0L; @@ -655,7 +655,7 @@ long double XMLGregorianCalendar::getSeconds() const } -int XMLGregorianCalendar::maximumDayInMonthFor (long long year, int month) +intXMLGC::XMLGregorianCalendar::maximumDayInMonthFor (long long year, int month) { if (month != FEBRUARY) return daysInMonth[month]; @@ -670,7 +670,7 @@ int XMLGregorianCalendar::maximumDayInMonthFor (long long year, int month) } } -void XMLGregorianCalendar::invalidFieldValue (int field, int value) +void XMLGC::XMLGregorianCalendar::invalidFieldValue (int field, int value) throw (IllegalArgException) { throw IllegalArgException( diff --git a/AusRegEPPTK/se/XMLGregorianCalendarTest.cpp b/AusRegEPPTK/se/XMLGregorianCalendarTest.cpp index 8f589a5..1a5c3f7 100644 --- a/AusRegEPPTK/se/XMLGregorianCalendarTest.cpp +++ b/AusRegEPPTK/se/XMLGregorianCalendarTest.cpp @@ -13,27 +13,27 @@ using namespace std; void testNoFractionalSecondSet() { - XMLGregorianCalendar calendar; + XMLGC::XMLGregorianCalendar calendar; ASSERT_EQ(calendar.getFractionalSecond(), 0); } void testSetZeroFractionalSecond() { - XMLGregorianCalendar calendar; + XMLGC::XMLGregorianCalendar calendar; calendar.setFractionalSecond(0.0); ASSERT_EQ(calendar.getFractionalSecond(), 0); } void testSetNonZeroFractionalSecond() { - XMLGregorianCalendar calendar; + XMLGC::XMLGregorianCalendar calendar; calendar.setFractionalSecond(0.123); ASSERT_EQ(calendar.getFractionalSecond(), 0.123); } void testSetNegativeFractionalSecond() { - XMLGregorianCalendar calendar; + XMLGC::XMLGregorianCalendar calendar; try { @@ -48,7 +48,7 @@ void testSetNegativeFractionalSecond() void testSetFractionalSecondToWholeSecond() { - XMLGregorianCalendar calendar; + XMLGC::XMLGregorianCalendar calendar; try { @@ -69,7 +69,7 @@ void testSetFractionalSecondToWholeSecond() */ void testValidYearSet() { - XMLGregorianCalendar calendar; + XMLGC::XMLGregorianCalendar calendar; calendar.setDay(1); calendar.setMonth(3); calendar.setYear(2010); @@ -78,7 +78,7 @@ void testValidYearSet() void testInvalidNoYearSet() { - XMLGregorianCalendar calendar("2015-04-08T04:23:29.0Z"); + XMLGC::XMLGregorianCalendar calendar("2015-04-08T04:23:29.0Z"); ASSERT_EQ(calendar.isValid(), true); calendar.setYear(0); ASSERT_EQ(calendar.isValid(), false); @@ -86,7 +86,7 @@ void testInvalidNoYearSet() void testInvalidNonLeapYear() { - XMLGregorianCalendar calendar("2009-02-08T04:23:29.0Z"); + XMLGC::XMLGregorianCalendar calendar("2009-02-08T04:23:29.0Z"); ASSERT_EQ(calendar.isValid(), true); calendar.setDay(29); ASSERT_EQ(calendar.isValid(), false); @@ -94,7 +94,7 @@ void testInvalidNonLeapYear() void testFormatYear() { - XMLGregorianCalendar calendar; + XMLGC::XMLGregorianCalendar calendar; calendar.setYear(2015); ASSERT_EQ(calendar.format("%Y"), "2015"); } @@ -106,14 +106,14 @@ void testFormatYear() void testValidNegativeYear() { - XMLGregorianCalendar calendar; + XMLGC::XMLGregorianCalendar calendar; calendar.setYear(-2102); ASSERT_EQ(calendar.isValid(), true); } void testFormatNegativeYear() { - XMLGregorianCalendar calendar; + XMLGC::XMLGregorianCalendar calendar; calendar.setYear(-2015); ASSERT_EQ(calendar.format("%Y"), "-2015"); }