This commit is contained in:
Ren RenJuan 2014-01-23 03:03:18 +00:00
parent 0bf70c6e42
commit 57a6d20857
14 changed files with 147 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -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

View File

@ -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_ */

View File

@ -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

View File

@ -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

4
ACTK1_0/se/LPE/LPData.d Normal file
View File

@ -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

View File

@ -0,0 +1,2 @@
build/LPExtension.o se/LPE/LPExtension.d: se/LPE/LPExtension.cpp \
se/LPE/LPExtension.hpp se/Extension.hpp

4
ACTK1_0/se/LPE/LPKey.d Normal file
View File

@ -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

View File

@ -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

4
ACTK1_0/se/LPE/LPMap.d Normal file
View File

@ -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

View File

@ -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;}

View File

@ -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

View File

@ -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;
};

View File

@ -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