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

#include "unistate_u0.h"
#include "uniprotocol.h"
#include "ie/callstate.h"
#include "protocol/uni/unistrings.h"

uniUserNull *uniUserNull :: _only = 0;

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

uniUserNull :: uniUserNull(void)
    : uniState(),
      sigNull()
{
    return;
}

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

    
// Following methods resets some inputs. This is because there is several
// inputs which are allowed anywhere except N0.

void uniUserNull :: sigRELEASEreqAct(sigRELEASEreq *,
                                     pfProtocol *)
{
    return;
}

void uniUserNull :: sigPROCEEDINGindAct(sigPROCEEDINGind *,
                                        pfProtocol *)
{
    return;
}

void uniUserNull :: sigSETUPconfAct(sigSETUPconf *,
                                    pfProtocol *)
{
    return;
}

void uniUserNull :: sigSETUP_COMPLETEindAct(sigSETUP_COMPLETEind *,
                                            pfProtocol *)
{
    return;
}

void uniUserNull :: sigRELEASEindAct(sigRELEASEind *,
                                     pfProtocol *)
{
    return;
}

void uniUserNull :: sigRELEASEconfAct(sigRELEASEconf *,
                                      pfProtocol *)
{
    return;
}

void uniUserNull :: uniSTATUSpduAct(uniSTATUSpdu *message_,
                                    pfProtocol *protocol_)
{
    uniProtocol *protocol = uniState::protocolCast(protocol_);
    pfUlong cs =
        message_->getStorage(uniCallStateStr).getInteger(uniCallState_StateStr);
    if (cs != ieCallState::callState_Null)
    {
        protocol->sendRELEASErespToDown(
            uniCauseValue_MessageNotCompatibleWithCallState);
    }
    return;
}

void uniUserNull :: uniADD_PARTYpduAct(uniADD_PARTYpdu *,
                                       pfProtocol *)
{
    return;
}

void uniUserNull :: uniADD_PARTY_ACKpduAct(uniADD_PARTY_ACKpdu *,
                                           pfProtocol *)
{
    return;
}

void uniUserNull :: uniADD_PARTY_REJECTpduAct(uniADD_PARTY_REJECTpdu *,
                                              pfProtocol *)
{
    return;
}

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

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

void uniUserNull :: uniT322timeoutAct(pfProtocol *)
{
    return;
}

void uniUserNull :: uniTREMOVEDtimeoutAct(pfProtocol *)
{
    return;
}
