RequestFramesGet.cpp 1.38 KB
#include "RequestFramesGet.h"

#include "../FrameManager/FrameManager.h"
#include "../Common/Toolbox.h"

using namespace TREPS::Common;
using namespace TREPS::FrameManager;

namespace TREPS
{
	namespace RequestManager
	{
		RequestFramesGetClass::RequestFramesGetClass(void):RequestAbstractClass()
		{
			this->outputType = OUTPUT_XMLFILE;
		}

		RequestFramesGetClass::~RequestFramesGetClass(void)
		{
		}

		string RequestFramesGetClass::getRequestId(void)
                {
                        return "frames_get";
                }

		bool RequestFramesGetClass::load(RequestLoaderClass *loader)
		{
			//nothing to do
			return true;
		}

		bool RequestFramesGetClass::run(void)
		{
			string framesFile = this->app->getConf()->getFramesFilePath();

			if (framesFile.compare("") == 0)
				return false;

			//init frame manager
			FrameManagerClass *frameMgr = new FrameManagerClass();

			//file validation
			bool fileOK = frameMgr->init(framesFile.c_str());

			delete frameMgr;

			return fileOK;
		}
		
		void RequestFramesGetClass::writeResult(ResultWriterClass *writer)
		{
			//No result file for this request
		}

		string RequestFramesGetClass::getResultFileSuffix(void)
		{
			return "";
		}

		string RequestFramesGetClass::getXMLFilePath(void)
		{
			return this->app->getConf()->getFramesFilePath();
		}

		string RequestFramesGetClass::getStringResult(void)
		{
			return "";
		}
	}
}