//Editor-Info: -*- C++ -*-
//
//Subject: TOVE-project / SAAL
//
//File: unisaalrelaystate1.cpp
//
//Version: $Revision: 1.1 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/08/06 12:44:24 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications and Multimedia
//
//Author:
//      Juhana Räsänen
//
//Description:
//	See corresponding header file.
//
//Copyright:
//
//
//Licence:
//
//
//History: 
//


#include "unisaalrelaystate1.h"
#include "unisaalrelay.h"
#include "iface/uaalif/uaaldownprimitives.h"



// ----------------------------------------------------------------------

uniSaalRelayIdle *uniSaalRelayIdle :: _only = 0;

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

uniSaalRelayIdle :: uniSaalRelayIdle(void)
{
    return;
}

uniSaalRelayIdle :: ~uniSaalRelayIdle(void)
{
    _only = 0;
    return;
}


// ----------------------------------------------------------------------

void uniSaalRelayIdle :: uaalRELEASEreqAct(
    uaalRELEASEreq *messenger_,
    pfProtocol *protocol_)
{
    uniSaalRelay *protocol = (uniSaalRelay *) protocol_;
    if (messenger_->isFromA() != 0)
    {
        protocol->sendUaalRELEASEconf(1);
    }
    else
    {
        protocol->sendUaalRELEASEconf(0);
    }
    return;
}
