/***************************************************************************
                   Job Control Class (JobControl.cpp)
                -----------------------------------------

	begin      : 2013/02/20
	copyright  : (C) 2013 Solbox Inc.
	author     : Development 1 Team
					- 2013/02/20 - 1st dadamin
	email      : dev1@solbox.com
	version    : 3.2.0

	CopyRight(C) 2005 Solbox Inc. All Rights reserved.
	Redistribution and use in source and binary forms, with or with out
	modification, are not permitted in outside of Solbox Inc.
***************************************************************************/
#include "rc_mngd.h"
#include "JobControl.h"
#include "Job.h"
#include "Logger.h"

CJobControl::CJobControl()
{

}

CJobControl::~CJobControl()
{

}

int CJobControl::run()
{	
	CJobFactory jobf;
	CJob *pJob = NULL;

	pJob = jobf.CreateJob(m_jobData);

	if(pJob == NULL)
	{
		// error
		return JOB_ERR_CREATION_FAIL;
	}

	int r = pJob->run( m_jobData );
	delete pJob;

	return r;
}
