//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / UNI
//
//File: unistate_u6.cpp
//
//Version: $Revision: 1.10 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/12/14 06:56:33 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Jari Katajavuori
//
//Description:
//
//
//Copyright:
//
//
//Licence:
//
//
//History: 

#include "unistate_u6.h"

#include "unistrings.h"
#include "uniprotocol.h"

uniUserCallPresent *uniUserCallPresent :: _only = 0;

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

uniUserCallPresent :: uniUserCallPresent(void)
    : uniUserState()
{
    return;
}

uniUserCallPresent :: ~uniUserCallPresent(void)
{
    return;
}

void uniUserCallPresent :: sigRELEASErespAct(sigRELEASEresp *message_,
                                        pfProtocol *protocol_)
{
    uniProtocol *protocol = dynamic_cast<uniProtocol*>(protocol_);
    protocol->sendRELEASE_COMPLETEpduToCoOrd(message_);
    protocol->clearCall();
    return;
}
    
void uniUserCallPresent :: sigPROCEEDINGreqAct(sigPROCEEDINGreq *message_,
                                          pfProtocol *protocol_)
{
    uniProtocol *protocol = dynamic_cast<uniProtocol*>(protocol_);
    protocol->sendCALL_PROCEEDINGpduToCoOrd(message_);
    protocol->changeToIncomingCallProceedingState();
    return;
}

void uniUserCallPresent :: sigSETUPrespAct(sigSETUPresp *message_,
                                      pfProtocol *protocol_)
{
    uniProtocol *protocol = dynamic_cast<uniProtocol*>(protocol_);
    protocol->sendCONNECTpduToCoOrd(message_);
    protocol->startTimer(uniT313Str);
    protocol->changeToConnectRequestState();
    return;
}

