This commit is contained in:
Ren RenJuan 2014-01-23 21:06:09 +00:00
parent ef7da26042
commit 231ae962bd
12 changed files with 142 additions and 181 deletions

123
.cproject
View File

@ -55,31 +55,8 @@
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
<buildTargets>
<target name="clean" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="all" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="tests" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>tests</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="libACTK1_0.so" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>libACTK1_0.so</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -87,6 +64,7 @@
</target>
<target name="clean" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -94,7 +72,6 @@
</target>
<target name="tests" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>tests</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -102,7 +79,6 @@
</target>
<target name="dirs" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>dirs</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -110,7 +86,6 @@
</target>
<target name="dclean" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>dclean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -118,6 +93,7 @@
</target>
<target name="all" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>all</buildTarget>
<stopOnError>false</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -126,13 +102,37 @@
<target name="adHoc" path="ACTK1_0" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>build/LPCommands.o</buildTarget>
<buildTarget>build/LPCheck.o</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>false</runAllBuilders>
</target>
<target name="clean" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="all" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="tests" path="ACTK1_3_2" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>tests</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="clean" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -140,7 +140,6 @@
</target>
<target name="dirs" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>dirs</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -148,7 +147,6 @@
</target>
<target name="apig-cli" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>apig-cli</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -156,6 +154,7 @@
</target>
<target name="build/commander.o" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>build/commander.o</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -163,6 +162,7 @@
</target>
<target name="build/ausreg-cd" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>build/ausreg-cd</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -170,6 +170,7 @@
</target>
<target name="cliever" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>cliever</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -177,45 +178,14 @@
</target>
<target name="all" path="APIG" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="cliever" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>cliever</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="clean" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget>
<stopOnError>false</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="distclean" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>distclean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="build/ausreg-md" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>build/ausreg-md</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="AusRegEPPTK.so" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -223,7 +193,6 @@
</target>
<target name="tests" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>tests</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
@ -231,12 +200,40 @@
</target>
<target name="clean" path="AusRegEPPTK" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>clean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="cliever" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>cliever</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="clean" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>clean</buildTarget>
<stopOnError>false</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="distclean" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>distclean</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="build/ausreg-md" path="AusRegCliever" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildTarget>build/ausreg-md</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
</buildTargets>
</storageModule>
</cproject>

View File

@ -115,7 +115,8 @@ $(BUILD_OBJ_DIR)/%: $(BUILD_OBJ_DIR)/%.o
#
# The toolkit raises the c++ "static initialization fiasco" situation. Use this as needed
#
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 \
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/AddRemType.o build/DomainCheckResponse.o build/EnumDomainUpdateCommand.o build/Properties.o build/SessionPoolImpl.o \
build/boolean.o build/DomainCreateCommand.o build/EnumType.o build/ProtocolExtensionCommand.o build/SSLException.o \
@ -124,10 +125,10 @@ build/CheckResponse.o build/DomainInfoKVResponseExtension.o
build/CLTRID.o build/DomainInfoResponse.o build/ErrorPkg.o build/NAPTR.o build/RegistrantTransferCommandType.o build/StringUtils.o \
build/CommandCounter.o build/DomainKVCommandExtension.o build/Greeting.o build/NotificationResponse.o build/ResponseExtension.o build/SyncExtension.o \
build/Command.o build/DomainNotificationResponse.o build/HostAddRem.o build/ObjectCommand.o build/Response.o build/SystemProperties.o \
build/config.o build/DomainRegistrantTransferCommand.o build/HostCheckResponse.o build/LPRespExtender.o build/ResultCounter.o build/Timer.o \
build/Constants.o build/DomainRegistrantTransferResponse.o build/HostCreateCommand.o build/LPCmdExtender.o build/Result.o build/TLSContext.o \
build/config.o build/DomainRegistrantTransferCommand.o build/HostCheckResponse.o build/ResultCounter.o build/Timer.o \
build/Constants.o build/DomainRegistrantTransferResponse.o build/HostCreateCommand.o build/LPCheck.o build/Result.o build/TLSContext.o \
build/ContactCheckResponse.o build/DomainRenewCommand.o build/HostCreateResponse.o build/LPLaunch.o build/SecDNSChgType.o build/TLSSession.o \
build/ContactCreateCommand.o build/DomainRenewResponse.o build/HostInfoResponse.o build/LPExtension.o build/SecDNSDSData.o build/TLSSocket.o \
build/ContactCreateCommand.o build/DomainRenewResponse.o build/HostInfoResponse.o build/LPCreate.o build/SecDNSDSData.o build/TLSSocket.o \
build/ContactCreateResponse.o build/DomainSecDNSCreateCommandExtension.o build/HostUpdateCommand.o build/SecDNSDSOrKeyType.o build/TransferCommand.o \
build/ContactInfoResponse.o build/DomainSecDNSInfoResponseExtension.o build/InetAddress.o build/SecDNSExtension.o build/TransferOp.o \
build/ContactNotificationResponse.o build/DomainSecDNSUpdateCommandExtension.o build/InfoResponse.o build/SecDNSKeyData.o build/TransferResponse.o \

View File

@ -0,0 +1,20 @@
#include "LPCheck.hpp"
#include "xml/XMLHelper.hpp"
namespace {
Extension& launchPhaseExtension() {
static Extension* lpExtension = new LPLaunch();
return *lpExtension;
}
}; // anonymous namespace
void LPCheck::setExtension ()
{
DOMElement *lpeCreate =
xmlWriter->appendChild( xmlWriter->appendChild( command, "extension"),
"check", launchPhaseExtension().getURI());
}

View File

@ -0,0 +1,33 @@
#ifndef _LPE_CHK_EXTENSION_HPP_
#define _LPE_CHK_EXTENSION_HPP_
#include "se/DomainCheckCommand.hpp"
#include "LPLaunch.hpp"
class LPCheck : public DomainCheckCommand
{
private:
LPLaunch *draft_tan_epp_launchphase_12;
void setExtension ();
public:
/**
* Check the availability of the single identified domain.
*
* @param name The name of the domain to check the availability of.
*/
LPCheck (const std::string &name )
: DomainCheckCommand (name) { setExtension(); }
/**
* Check the availability of at least one domain.
*
* @param names The names of the domains to check the availability of.
*/
LPCheck (std::vector<std::string> &names )
: DomainCheckCommand ( names ) {}
};
#endif /* _LPE_COMMAND_EXTENSION_HPP_ */

View File

@ -1,28 +0,0 @@
#include "se/Command.hpp"
#include "se/CommandType.hpp"
#include "LPExtension.hpp"
#include "xml/XMLHelper.hpp"
#include "LPCmdExtender.hpp"
namespace {
LPExtension& launchPhaseExtension() {
static LPExtension* lpExtension = new LPExtension();
return *lpExtension;
}
}; // anonymous namespace
void LPCmdExtender::addToCommand(const Command &command) const
{
XMLWriter* xmlWriter = command.getXmlWriter();
DOMElement* extensionElement = command.getExtensionElement();
DOMElement* createElement;
createElement = xmlWriter->appendChild(extensionElement,
t->getCommandName().c_str(), launchPhaseExtension().getURI());
if (createData.get() != NULL)
{
createData->createXMLElement(xmlWriter, createElement);
}
}

View File

@ -1,30 +0,0 @@
#ifndef _LPE_COMMAND_EXTENSION_HPP_
#define _LPE_COMMAND_EXTENSION_HPP_
#include "se/Command.hpp"
#include "se/CommandExtension.hpp"
#include "LPLaunch.hpp"
class LPCmdExtender : public CommandExtension
{
public:
virtual void addToCommand(const Command &command) const;
void setCreateData(LPLaunch* createData);
void createXMLElement(XMLWriter* xmlWriter, DOMElement* addElement);
LPCmdExtender(Command x) : t(x.getCommandType()) {}
private:
const CommandType *t;
std::auto_ptr<LPLaunch> createData;
};
inline void LPCmdExtender::setCreateData(LPLaunch* createData)
{
this->createData.reset(createData);
}
#endif /* _LPE_COMMAND_EXTENSION_HPP_ */

View File

@ -1,14 +0,0 @@
#include "se/LPE/LPExtension.hpp"
std::string& LPExtension::getURI() const
{
static std::string uri = "urn:ietf:params:xml:ns:launch-1.0";
return uri;
}
std::string& LPExtension::getSchemaLocation() const
{
static std::string loc = "urn:ietf:params:xml:ns:launch-1.0 launch-1.0.xsd";
return loc;
}

View File

@ -1,29 +0,0 @@
#ifndef __LPEXTENSION_HPP
#define __LPEXTENSION_HPP
#include "se/Extension.hpp"
/**
* A bundled set of constants representing the .ae EPP extension
* schema. The namespace URI uniquely identifies the extension.
*/
class LPExtension : public Extension
{
public:
virtual ~LPExtension(void) { }
/**
* Get the globally unique namespace URI which identifies this extension.
*/
virtual std::string& getURI() const;
/**
* Get the location hint for the XML schema used to validate EPP service
* element instances using this extension.
*/
virtual std::string& getSchemaLocation() const;
};
#endif // __LPEXTENSION_HPP

View File

@ -14,3 +14,14 @@ void LPLaunch::createXMLElement(XMLWriter* xmlWriter, DOMElement* addElement)
}
std::string& LPLaunch::getURI() const
{
static std::string uri = "urn:ietf:params:xml:ns:launch-1.0";
return uri;
}
std::string& LPLaunch::getSchemaLocation() const
{
static std::string loc = "urn:ietf:params:xml:ns:launch-1.0 launch-1.0.xsd";
return loc;
}

View File

@ -5,10 +5,11 @@
#include "xercesc/dom/DOMElement.hpp"
#include "xml/XMLWriter.hpp"
#include "se/Extension.hpp"
using namespace std;
class LPLaunch
class LPLaunch : public Extension
{
public:
LPLaunch() :
@ -23,6 +24,10 @@ class LPLaunch
void appendData(XMLWriter* xmlWriter, DOMElement* addElement);
void createXMLElement(XMLWriter* xmlWriter, DOMElement* addElement);
std::string& getURI() const;
std::string& getSchemaLocation() const;
private:
string phase;
string status;

View File

@ -49,5 +49,5 @@ SendSE::~SendSE()
void SendSE::init ()
{
userLogger = Logger::getLogger("com.ausregistry.cpptoolkit.se.user");
userLogger = Logger::getLogger("biz.meansofproduction.dnseppus.se.user");
}

View File

@ -8,7 +8,8 @@
#include "session/StatsManager.hpp"
#include "se/DomainCheckCommand.hpp"
#include "se/DomainCheckResponse.hpp"
#include "se/LPE/LPCmdExtender.hpp"
#include "se/LPE/LPCheck.hpp"
#include "se/LPE/LPCreate.hpp"
#include "se/TransferOp.hpp"
#include "se/IntPostalInfo.hpp"
#include "se/ContactCreateCommand.hpp"
@ -109,6 +110,7 @@ void ausRegEPPTK::doOTEB()
string op("newInstance");
Transaction thisTest;
LPLaunch *lpExts;
scenario(thisConfig->tkScenario,thisConfig->cfg_path);
@ -183,10 +185,7 @@ void ausRegEPPTK::doOTEB()
theseLogs->logN(1,"(%d) LPE Check of unicycles.bike",cmd++);
DomainCheckCommand oteCommand_2("unicycles.bike");
LPCmdExtender oteCX(oteCommand_2);
oteCommand_2.appendExtension(oteCX);
LPCheck oteCommand_2("unicycles.bike");
DomainCheckResponse oteResponse_2;
try {
@ -288,9 +287,7 @@ void ausRegEPPTK::doOTEB()
theseLogs->logN(1,"(%d) Sunrise create %s with ICANN SMD test files.",cmd++,name5);
DomainCreateCommand oteCommand_5(name5,pw,&RID, &tech, &ns, &admin, &billing);
LPCmdExtender oteC5X(oteCommand_5);
oteC5X.addToCommand(oteCommand_5);
LPCreate oteCommand_5(name5,pw,&RID, &tech, &ns, &admin, &billing);
DomainCreateResponse oteResponse_5;
thisTest = Transaction(&oteCommand_5, &oteResponse_5);
@ -298,9 +295,7 @@ void ausRegEPPTK::doOTEB()
theseLogs->logN(1,"(%d) Create test-validate.claimsgasix (TCN).",cmd++);
DomainCreateCommand oteCommand_6("test-validate.claimsgasix",pw,&RID, &tech, &ns, &admin, &billing);
LPCmdExtender oteC6X(oteCommand_6);
oteC6X.addToCommand(oteCommand_6);
LPCreate oteCommand_6("test-validate.claimsgasix",pw,&RID, &tech, &ns, &admin, &billing);
DomainCreateResponse oteResponse_6;
thisTest = Transaction(&oteCommand_6, &oteResponse_6);