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

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

uniUserReleaseRequest *uniUserReleaseRequest :: _only = 0;

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

uniUserReleaseRequest :: uniUserReleaseRequest(void)
    : uniState(),
      sigReleaseRequest()
{
    return;
}

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

void uniUserReleaseRequest :: uniSTATUSpduAct(uniSTATUSpdu *message_,
                                              pfProtocol *protocol_)
{
    uniProtocol *protocol = uniState::protocolCast(protocol_);
    protocol->clearCallIfNullState(message_);
    return;
}

void uniUserReleaseRequest :: uniLINK_ESTABLISHindAct(
    uniLINK_ESTABLISHind *,
    pfProtocol *)
{
    return;
}


void uniUserReleaseRequest :: uniDROP_PARTYrespAct(
    uniDROP_PARTYresp *message_,
    pfProtocol *protocol_)
{
    uniProtocol *protocol = uniState::protocolCast(protocol_);
    if (protocol->isMultipointConnection() == true)
    {
        protocol->sendDROP_PARTY_ACKpduToCoOrd(message_);
        protocol->removePMP(message_);
    }
    return;
}

void uniUserReleaseRequest :: uniDROP_PARTYpduAct(
    uniDROP_PARTYpdu *,
    pfProtocol *)
{
    return;
}

void uniUserReleaseRequest :: uniDROP_PARTY_ACKpduAct(
    uniDROP_PARTY_ACKpdu *,
    pfProtocol *)
{
    return;
}

void uniUserReleaseRequest :: uniTREMOVEDtimeoutAct(
    pfProtocol *protocol_)
{
    uniProtocol *protocol = uniState::protocolCast(protocol_);
    protocol->setBooleanTrue(uniAllowFinalClearingStr);
    return;
}
