//Editor-Info: -*- C++ -*-
//
//Subject:
//
//File:
//
//Version: $Revision: 1.6 $
//
//State: $State: Exp $
//
//Date: $Date: 1999/03/10 09:34:16 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Sami Raatikainen
//
//Description:
//      See corresponding header file.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 

#include "bisupstate_callanswered.h"

bisupCallAnswered *bisupCallAnswered :: _only = 0;

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

bisupCallAnswered :: bisupCallAnswered(void)
    : bisupState()
{
    return;
}

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

void bisupCallAnswered :: sigRELEASEreqAct(
    sigRELEASEreq *primitive_,
    pfProtocol *protocol_)
{
    bisupProtocol *protocol = protocolCast(protocol_);
    protocol->stopAllTimers();
    protocol->changeToAwaitRLCState();
    protocol->startRLCtimer();
    protocol->sendRELpduToDown(primitive_);
    return;
}

void bisupCallAnswered :: sigRELEASErespAct(
    sigRELEASEresp *primitive_,
    pfProtocol *protocol_)
{
    bisupProtocol *protocol = protocolCast(protocol_);
    protocol->stopAllTimers();
    protocol->sendRLCpduToDown(primitive_);
    protocol->finalClearing();
    return;
}

void bisupCallAnswered :: nniRELpduAct(
    nniRELpdu *primitive_,
    pfProtocol *protocol_)
{
    bisupProtocol *protocol = protocolCast(protocol_);
    protocol->stopAllTimers();
    protocol->changeToAwaitReleaseRespState();
    protocol->sendRELEASEindToCC(primitive_);
    return;
}

void bisupCallAnswered :: nniRLCpduAct(
    nniRLCpdu *primitive_,
    pfProtocol *protocol_)
{
    bisupProtocol *protocol = protocolCast(protocol_);
    protocol->stopAllTimers();
    protocol->changeToNullState();
    protocol->sendRELEASEconfToCC(primitive_);
    return;
}
