//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project/CC
//
//File: ccostate_authattempt.cpp
//
//Version: $Revision: 1.8 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/06/11 15:29:33 $
//
//Organisation:
//      University of Technology
// 
//Author:
//      Pasi Nummisalo
//
//Description:
//     See header.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//      
//Licence:
//     
//
//History:
//

#include "ccodp_attemptauthorized.h"
#include "ccostate_authattempt.h"

ccOstateAuthorizeAttempt *ccOstateAuthorizeAttempt :: _only = 0;

ccOstateAuthorizeAttempt :: ccOstateAuthorizeAttempt(void)
    : ccOstate()
{
    return;
}

ccOstateAuthorizeAttempt :: ~ccOstateAuthorizeAttempt(void)
{
    _only = 0;
    return;
}

ccOstateAuthorizeAttempt *ccOstateAuthorizeAttempt :: instance(void)
{
    if(_only == 0)
    {
        _only = new ccOstateAuthorizeAttempt;
    }  
    return _only;
}

//
//Function: proceed
//
//Description:
//   Entry event: An idication is available that the originating
//   terminal needs to be authorized.(DP: Origination_Attempt)
//
//

void ccOstateAuthorizeAttempt :: proceed(ccProtocol *protocol_)
{
#if CC_DEBUG
traceState(ccCC,"Authorize Attempt");
#endif

     
     exitAction(protocol_, ccOdpAttemptAuthorized::instance());
     
     return;
}

