//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / UNI
//
//File: unistate_u6.cpp
//
//Version: $Revision: 1.8 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/12/10 11:47:29 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Jari Katajavuori
//      Sami Raatikainen (based on version 1.9)
//
//Description:
//
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 

#include "unistate_u6.h"
#include "uniprotocol.h"
#include "protocol/uni/unistrings.h"

uniUserCallPresent *uniUserCallPresent :: _only = 0;

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

uniUserCallPresent :: uniUserCallPresent(void)
    : uniState(),
      sigCallPresent()
{
    return;
}

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

// ++TODO++ user always, network if symmetric
void uniUserCallPresent :: sigALERTINGreqAct(
    sigALERTINGreq *message_,
    pfProtocol *protocol_)
{
    uniProtocol *protocol = uniState::protocolCast(protocol_);
    protocol->changeToCallReceivedState();
    protocol->sendALERTINGreqToDown(message_);
    return;
}

// ++TODO++ user always, network if symmetric
void uniUserCallPresent :: sigSETUPrespAct(
    sigSETUPresp *message_,
    pfProtocol *protocol_)
{
    uniProtocol *protocol = uniState::protocolCast(protocol_);
    protocol->changeToUserConnectRequestState();
    protocol->startTimer(uniT313Str);
    protocol->sendSETUPrespToDown(message_);
    return;
}
