2014-01-06 19:19:17 +00:00
|
|
|
#include "common/SystemProperties.hpp"
|
|
|
|
#include "common/Logger.hpp"
|
|
|
|
#include "common/ErrorPkg.hpp"
|
|
|
|
#include "se/SendSE.hpp"
|
|
|
|
#include "se/ReceiveSE.hpp"
|
|
|
|
#include "se/IPVersion.hpp"
|
|
|
|
#include "se/PostalInfoType.hpp"
|
|
|
|
#include "se/StandardCommandType.hpp"
|
|
|
|
#include "se/AddRemType.hpp"
|
|
|
|
#include "se/StandardObjectType.hpp"
|
|
|
|
#include "se/PeriodUnit.hpp"
|
|
|
|
#include "se/PollOperation.hpp"
|
|
|
|
#include "se/TransferOp.hpp"
|
|
|
|
#include "xml/XMLParser.hpp"
|
|
|
|
#include "xml/XMLInit.hpp"
|
|
|
|
#include <xercesc/util/PlatformUtils.hpp>
|
|
|
|
#include <xalanc/XalanTransformer/XalanTransformer.hpp>
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <signal.h>
|
|
|
|
|
2014-01-10 20:05:42 +00:00
|
|
|
const char *otePeer="epp.ote.donuts.co";
|
2014-01-10 22:26:28 +00:00
|
|
|
int tkScenario=0;
|
2014-01-10 20:05:42 +00:00
|
|
|
|
2014-01-06 19:19:17 +00:00
|
|
|
namespace {
|
|
|
|
|
|
|
|
void initEnumTypes()
|
|
|
|
{
|
|
|
|
// These classes are decendants of EnumType and so have static storage
|
|
|
|
// listing valid values. The init() method must be called to establish
|
|
|
|
// these values.
|
|
|
|
IPVersion::init();
|
|
|
|
PostalInfoType::init();
|
|
|
|
StandardCommandType::init();
|
|
|
|
AddRemType::init();
|
|
|
|
StandardObjectType::init();
|
|
|
|
PeriodUnit::init();
|
|
|
|
PollOperation::init();
|
|
|
|
TransferOp::init();
|
|
|
|
}
|
|
|
|
|
|
|
|
class Init
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Init(const std::string& system_props_file)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
// SystemProperties, Logger and ErrorPkg must be initialised in
|
|
|
|
// this order.
|
|
|
|
sigset_t new_set, old_set;
|
|
|
|
sigemptyset(&new_set);
|
|
|
|
sigaddset(&new_set,SIGPIPE);
|
|
|
|
sigprocmask(SIG_BLOCK,&new_set,&old_set);
|
|
|
|
|
|
|
|
SystemProperties::init(system_props_file);
|
|
|
|
Logger::init();
|
|
|
|
ErrorPkg::init();
|
|
|
|
|
|
|
|
|
|
|
|
XMLInit::init();
|
|
|
|
XMLParser::init();
|
|
|
|
XMLWriter::init();
|
|
|
|
ReceiveSE::init();
|
|
|
|
SendSE::init();
|
|
|
|
|
|
|
|
initEnumTypes();
|
|
|
|
|
|
|
|
}
|
|
|
|
catch (EPPException& e)
|
|
|
|
{
|
|
|
|
std::cerr << "Toolkit initialisation exception: " << e.getMessage() << std::endl;
|
|
|
|
throw;
|
|
|
|
}
|
|
|
|
catch (std::exception& e)
|
|
|
|
{
|
|
|
|
std::cerr << "Toolkit initialisation exception: " << e.what() << std::endl;
|
|
|
|
throw;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-01-10 20:05:42 +00:00
|
|
|
} // anonymous namespace
|
2014-01-06 19:19:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
void init(const std::string& system_props_file)
|
|
|
|
{
|
|
|
|
static const Init doInit(system_props_file);
|
|
|
|
}
|
2014-01-10 20:05:42 +00:00
|
|
|
|
2014-01-10 22:26:28 +00:00
|
|
|
std::string stdPropsPath("/home/jdaugherty/dnseppus/etc/toolkit2.conf");
|
|
|
|
|
2014-01-10 20:05:42 +00:00
|
|
|
void scenario(int scenario)
|
|
|
|
{
|
|
|
|
|
|
|
|
tkScenario = scenario;
|
|
|
|
static const Init doInit(stdPropsPath);
|
|
|
|
}
|