diff --git a/ACTK1_0/se/LPE/LPCmdExtender.cpp b/ACTK1_0/se/LPE/LPCmdExtender.cpp new file mode 100644 index 0000000..9e8063c --- /dev/null +++ b/ACTK1_0/se/LPE/LPCmdExtender.cpp @@ -0,0 +1,25 @@ +#include "se/Command.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 = xmlWriter->appendChild(extensionElement, + "create", launchPhaseExtension().getURI()); + + if (createData.get() != NULL) + { + createData->createXMLElement(xmlWriter, createElement); + } +} diff --git a/ACTK1_0/se/LPE/LPCmdExtender.d b/ACTK1_0/se/LPE/LPCmdExtender.d new file mode 100644 index 0000000..5751a55 --- /dev/null +++ b/ACTK1_0/se/LPE/LPCmdExtender.d @@ -0,0 +1,7 @@ +build/LPCmdExtender.o se/LPE/LPCmdExtender.d: se/LPE/LPCmdExtender.cpp \ + se/Command.hpp se/SendSE.hpp xml/EPPWriter.hpp xml/XMLWriter.hpp \ + common/Logger.hpp common/Properties.hpp config/config.h \ + common/EPPException.hpp common/ConfigurationError.hpp \ + xml/ParsingException.hpp se/Extension.hpp se/CommandExtension.hpp \ + se/LPE/LPExtension.hpp xml/XMLHelper.hpp xml/XStr.hpp \ + se/LPE/LPCmdExtender.hpp se/LPE/LPLaunch.hpp diff --git a/ACTK1_0/se/LPE/LPCmdExtender.hpp b/ACTK1_0/se/LPE/LPCmdExtender.hpp new file mode 100644 index 0000000..9ca5038 --- /dev/null +++ b/ACTK1_0/se/LPE/LPCmdExtender.hpp @@ -0,0 +1,24 @@ +#ifndef _LPE_COMMAND_EXTENSION_HPP_ +#define _LPE_COMMAND_EXTENSION_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); + private: + std::auto_ptr createData; +}; + +inline void LPCmdExtender::setCreateData(LPLaunch* createData) +{ + this->createData.reset(createData); +} + +#endif /* _LPE_COMMAND_EXTENSION_HPP_ */ diff --git a/ACTK1_0/se/LPE/LPCommandExtension.d b/ACTK1_0/se/LPE/LPCommandExtension.d new file mode 100644 index 0000000..8cb37b7 --- /dev/null +++ b/ACTK1_0/se/LPE/LPCommandExtension.d @@ -0,0 +1,8 @@ +build/LPCommandExtension.o se/LPE/LPCommandExtension.d: \ + se/LPE/LPCommandExtension.cpp se/Command.hpp se/SendSE.hpp \ + xml/EPPWriter.hpp xml/XMLWriter.hpp common/Logger.hpp \ + common/Properties.hpp config/config.h common/EPPException.hpp \ + common/ConfigurationError.hpp xml/ParsingException.hpp se/Extension.hpp \ + se/CommandExtension.hpp se/LPE/LPExtension.hpp xml/XMLHelper.hpp \ + xml/XStr.hpp se/LPE/LPCommandExtension.hpp se/LPE/LPMap.hpp \ + se/LPE/LPKey.hpp se/LPE/LPData.hpp diff --git a/ACTK1_0/se/LPE/LPCommands.d b/ACTK1_0/se/LPE/LPCommands.d new file mode 100644 index 0000000..1d7bee0 --- /dev/null +++ b/ACTK1_0/se/LPE/LPCommands.d @@ -0,0 +1,7 @@ +build/LPCommands.o se/LPE/LPCommands.d: se/LPE/LPCommands.cpp \ + se/Command.hpp se/SendSE.hpp xml/EPPWriter.hpp xml/XMLWriter.hpp \ + common/Logger.hpp common/Properties.hpp config/config.h \ + common/EPPException.hpp common/ConfigurationError.hpp \ + xml/ParsingException.hpp se/Extension.hpp se/CommandExtension.hpp \ + se/LPE/LPExtension.hpp xml/XMLHelper.hpp xml/XStr.hpp \ + se/LPE/LPCommands.hpp se/LPE/LPLaunch.hpp diff --git a/ACTK1_0/se/LPE/LPData.d b/ACTK1_0/se/LPE/LPData.d new file mode 100644 index 0000000..c27a791 --- /dev/null +++ b/ACTK1_0/se/LPE/LPData.d @@ -0,0 +1,4 @@ +build/LPData.o se/LPE/LPData.d: se/LPE/LPData.cpp xml/XMLHelper.hpp \ + xml/XStr.hpp se/LPE/LPData.hpp xml/XMLWriter.hpp common/Logger.hpp \ + common/Properties.hpp config/config.h common/EPPException.hpp \ + common/ConfigurationError.hpp diff --git a/ACTK1_0/se/LPE/LPExtension.d b/ACTK1_0/se/LPE/LPExtension.d new file mode 100644 index 0000000..0aacf84 --- /dev/null +++ b/ACTK1_0/se/LPE/LPExtension.d @@ -0,0 +1,2 @@ +build/LPExtension.o se/LPE/LPExtension.d: se/LPE/LPExtension.cpp \ + se/LPE/LPExtension.hpp se/Extension.hpp diff --git a/ACTK1_0/se/LPE/LPKey.d b/ACTK1_0/se/LPE/LPKey.d new file mode 100644 index 0000000..548a74b --- /dev/null +++ b/ACTK1_0/se/LPE/LPKey.d @@ -0,0 +1,4 @@ +build/LPKey.o se/LPE/LPKey.d: se/LPE/LPKey.cpp xml/XMLHelper.hpp \ + xml/XStr.hpp se/LPE/LPKey.hpp xml/XMLWriter.hpp common/Logger.hpp \ + common/Properties.hpp config/config.h common/EPPException.hpp \ + common/ConfigurationError.hpp diff --git a/ACTK1_0/se/LPE/LPLaunch.d b/ACTK1_0/se/LPE/LPLaunch.d new file mode 100644 index 0000000..9635ed5 --- /dev/null +++ b/ACTK1_0/se/LPE/LPLaunch.d @@ -0,0 +1,4 @@ +build/LPLaunch.o se/LPE/LPLaunch.d: se/LPE/LPLaunch.cpp xml/XMLHelper.hpp \ + xml/XStr.hpp se/LPE/LPLaunch.hpp xml/XMLWriter.hpp common/Logger.hpp \ + common/Properties.hpp config/config.h common/EPPException.hpp \ + common/ConfigurationError.hpp diff --git a/ACTK1_0/se/LPE/LPMap.d b/ACTK1_0/se/LPE/LPMap.d new file mode 100644 index 0000000..123dcdd --- /dev/null +++ b/ACTK1_0/se/LPE/LPMap.d @@ -0,0 +1,4 @@ +build/LPMap.o se/LPE/LPMap.d: se/LPE/LPMap.cpp xml/XMLHelper.hpp \ + xml/XStr.hpp se/LPE/LPMap.hpp xml/XMLWriter.hpp common/Logger.hpp \ + common/Properties.hpp config/config.h common/EPPException.hpp \ + common/ConfigurationError.hpp se/LPE/LPKey.hpp se/LPE/LPData.hpp diff --git a/ACTK1_0/se/LPE/LPRespExtender.cpp b/ACTK1_0/se/LPE/LPRespExtender.cpp new file mode 100644 index 0000000..c891dd5 --- /dev/null +++ b/ACTK1_0/se/LPE/LPRespExtender.cpp @@ -0,0 +1,29 @@ +#include + +#include "LPLaunch.hpp" +#include "LPRespExtender.hpp" + +using namespace std; + +void LPRespExtender::fromXML(XMLDocument *xmlDoc) +{ + infData.reset(new LPLaunch); + +// if (xmlDoc->getNodeCount("count(" + MAXSIGLIFE_EXPR() + ")") > 0) +// { +// int maxSigLifeInt = getInt(xmlDoc->getNodeValue(MAXSIGLIFE_EXPR())); + +// auto_ptr maxSigLife(new SecDNSMaxSigLifeType(maxSigLifeInt));// +// infData->setMaxSigLife(maxSigLife.release()); +// } + +// int secDnsCount = getResponseDSData(xmlDoc); +// initialised = (secDnsCount > 0) && (infData->getDSDataListSize() == secDnsCount); + + if (!initialised) + { + // secDnsCount = getResponseKeyData(xmlDoc); + //initialised = (secDnsCount > 0) && (infData->getKeyDataListSize() == secDnsCount); + } +} +bool LPRespExtender::isInitialised() const {return initialised;} diff --git a/ACTK1_0/se/LPE/LPRespExtender.d b/ACTK1_0/se/LPE/LPRespExtender.d new file mode 100644 index 0000000..fc85c8d --- /dev/null +++ b/ACTK1_0/se/LPE/LPRespExtender.d @@ -0,0 +1,5 @@ +build/LPRespExtender.o se/LPE/LPRespExtender.d: se/LPE/LPRespExtender.cpp \ + se/LPE/LPLaunch.hpp xml/XMLWriter.hpp common/Logger.hpp \ + common/Properties.hpp config/config.h common/EPPException.hpp \ + common/ConfigurationError.hpp se/LPE/LPRespExtender.hpp \ + se/ResponseExtension.hpp se/ReceiveSE.hpp xml/XMLDocument.hpp diff --git a/ACTK1_0/se/LPE/LPRespExtender.hpp b/ACTK1_0/se/LPE/LPRespExtender.hpp new file mode 100644 index 0000000..d197cb2 --- /dev/null +++ b/ACTK1_0/se/LPE/LPRespExtender.hpp @@ -0,0 +1,18 @@ + +#include "se/ResponseExtension.hpp" +#include "LPLaunch.hpp" + +class LPRespExtender : public ResponseExtension +{ + +public: + LPRespExtender() : + initialised(false), + infData(NULL) + {} + virtual void fromXML(XMLDocument *xmlDoc); + virtual bool isInitialised() const; +private: + bool initialised; + std::auto_ptr infData; +}; diff --git a/ACTK1_0/se/LPE/LPResponseExtension.d b/ACTK1_0/se/LPE/LPResponseExtension.d new file mode 100644 index 0000000..0097433 --- /dev/null +++ b/ACTK1_0/se/LPE/LPResponseExtension.d @@ -0,0 +1,6 @@ +build/LPResponseExtension.o se/LPE/LPResponseExtension.d: \ + se/LPE/LPResponseExtension.cpp se/LPE/LPMap.hpp xml/XMLWriter.hpp \ + common/Logger.hpp common/Properties.hpp config/config.h \ + common/EPPException.hpp common/ConfigurationError.hpp se/LPE/LPKey.hpp \ + se/LPE/LPData.hpp se/LPE/LPResponseExtension.hpp \ + se/ResponseExtension.hpp se/ReceiveSE.hpp xml/XMLDocument.hpp