//Editor-Info: -*- C++ -*-
//
//Subject:
//
//File: ccostate_active.cpp
//
//Version: $ $
//
//State: $ $
//
//Date: $Date: 1998/06/11 15:29:34 $
//
//Organisation:
//      University of Technology
// 
//Author:
//      Pasi Nummisalo
//
//Description:
//     Not in use.
//
//Copyright:
//     University of Technology
//     Laboratory of Telecommunications and Multimedia 
//      
//Licence:
//     
//
//History:
//

#include "protocol/cc/ccprotocol.h"
#include "ccodp_disconnect.h"
#include "ccostate_suspended.h"

ccOstateSuspended *ccOstateSuspended :: _only = 0;

ccOstateSuspended :: ccOstateSuspended(void)
{
    return;
}

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

//
//Function:
//
//Description:
//      
//
//

ccOstateSuspended *ccOstateSuspended :: instance(void)
{
    if(_only == 0)
    {
        _only = new ccOstateSuspended;
        assert(_only != 0);
    }
    return _only;
}

//
//Function: proceed
//
//Description:  
//   Entry event: 
//
//

void ccOstateSuspended :: proceed(ccProtocol *)
{
#if CC_DEBUG
traceState(ccCC,"Suspended");
#endif
     
     // In case of error
     //changeState((pfProtocol*) protocol_, ccOexeption::instance());
     //ccOexception::instance()->proceed(protocol_);
     
     return;
}


//
//Function: sigRELEASEindAct
//
//Description:
//   This function is called when a disconnect indication is
//   received from the originating party (calling party).
//
//

void ccOstateSuspended :: sigRELEASEindAct(sigRELEASEind *,
                                           ccProtocol *protocol_)
{
    protocol_->changeState(ccOdpDisconnect::instance());
    ccOdpDisconnect::instance()->proceed(protocol_);

    return;
}


