//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project
//
//File: unistate_n7.cpp
//
//Version: $Revision: 1.5 $
//
//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:
//      State Call Received (N7) (Q.2931 only)
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 

#include "unistate_n7.h"

#include "iface/sigif/sigdownprimitives.h"

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

uniNetworkCallReceived *
uniNetworkCallReceived :: _only = 0;

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

uniNetworkCallReceived :: uniNetworkCallReceived(void)
    : uniNetworkState()
{
    return;
}

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

void uniNetworkCallReceived :: uniCONNECTpduAct(
    uniCONNECTpdu *message_,
    pfProtocol *protocol_)
{
    uniProtocol *protocol = dynamic_cast<uniProtocol *>(protocol_);
    protocol->verifyMessage(message_, uniState_ConnectRequest);
    protocol->stopTimer(uniT301Str);
    protocol->sendSETUPconfToCC(message_);
    protocol->changeToConnectRequestState();
    return;
}

void uniNetworkCallReceived :: uniT301timeoutAct(
    pfProtocol *protocol_)
{
    uniProtocol *protocol = dynamic_cast<uniProtocol *>(protocol_);
    protocol->startReleaseProcess(uniCauseValue_NoAnswerFromUserUserAlerted);
    return;
}

