/*
 * paused.cpp
 *
 *  Created on: 16/06/2013
 *      Author: timothyw
 */

#include "victim_id/states/paused.hpp"

#include "victim_id/states/initial.hpp"
#include "victim_id/states/explore.hpp"
#include "victim_id/states/victim.hpp"

#define LOG_START   "VIDSPaused :: "

namespace casualty {

VIDSPaused::VIDSPaused() :
    VIDState(VID_STATE_PAUSED)
{}

VIDSReturnDataPtr VIDSPaused::doExecute(VIDDataPtr data) {
    //LOG("%s execute()\n", LOG_START);
    VIDSReturnDataPtr retData = new VIDSReturnData();

    if (data->previousState == "" ||
        data->previousState == VID_STATE_NO_STATE) {
        retData->nextState = VID_STATE_INTIAL;
    } else if(data->previousState == VID_STATE_VICTIM) {
        retData->nextState = VID_STATE_EXPLORE;
    } else {
        retData->nextState = data->previousState;
    }

    return retData;
}

} // namespace casualty

