This commit is contained in:
parent
0bf70c6e42
commit
57a6d20857
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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
|
|
@ -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<LPLaunch> createData;
|
||||
};
|
||||
|
||||
inline void LPCmdExtender::setCreateData(LPLaunch* createData)
|
||||
{
|
||||
this->createData.reset(createData);
|
||||
}
|
||||
|
||||
#endif /* _LPE_COMMAND_EXTENSION_HPP_ */
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,2 @@
|
|||
build/LPExtension.o se/LPE/LPExtension.d: se/LPE/LPExtension.cpp \
|
||||
se/LPE/LPExtension.hpp se/Extension.hpp
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,29 @@
|
|||
#include <sstream>
|
||||
|
||||
#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<SecDNSMaxSigLifeType> 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;}
|
|
@ -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
|
|
@ -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<LPLaunch> infData;
|
||||
};
|
|
@ -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
|
Loading…
Reference in New Issue