//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project
//
//File: unitimeouts.h
//
//Version: $Revision: 1.11 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/10/10 15:57:13 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Jari Pusa
//
//Description:
//
//
//Copyright:
//
//
//Licence:
//
//
//History: 

#ifndef __UNI_UNITIMEOUTS_H__
#define __UNI_UNITIMEOUTS_H__

#include "pf/timer.h"

class pfState;
class pfProtocol;

//
// Class: uniT301timeout
//
// Description:
//      Timer T301 is started when ALERTING is received (Q.2931 only)
//

class uniT301timeout : pfTimerMessenger
{
    public:
        static pfTimerMessenger *create(void);

        uniT301timeout(const uniT301timeout &other_);
        virtual ~uniT301timeout(void);
        virtual pfTimerMessenger *clone(void) const;
        
        virtual void apply(pfState *state_, pfProtocol *protocol_);

    protected:
        uniT301timeout(void);
};

//
// Class: uniT303timeout
//
// Description:
//      Timer T303 is started when SETUP is sent.
//

class uniT303timeout : pfTimerMessenger
{
    public:
        static pfTimerMessenger *create(void);

        uniT303timeout(const uniT303timeout &other_);
        virtual ~uniT303timeout(void);
        virtual pfTimerMessenger *clone(void) const;
        
        virtual void apply(pfState *state_, pfProtocol *protocol_);

    protected:
        uniT303timeout(void);
};

//
// Class: uniT308timeout
//
// Description:
//      Timer T308 is started when RELEASE is sent.
//

class uniT308timeout : pfTimerMessenger
{
    public:
        static pfTimerMessenger *create(void);

        uniT308timeout(const uniT308timeout &other_);
        virtual ~uniT308timeout(void);
        virtual pfTimerMessenger *clone(void) const;

        virtual void apply(pfState *state_, pfProtocol *protocol_);

    protected:
        uniT308timeout(void);
};

//
// Class: uniT309timeout
//
// Description:
//      Timer T309 is started when SAAL is disconnected.
//

class uniT309timeout : pfTimerMessenger
{
    public:
        static pfTimerMessenger *create(void);

        uniT309timeout(const uniT309timeout &other_);
        virtual ~uniT309timeout(void);
        virtual pfTimerMessenger *clone(void) const;

        virtual void apply(pfState *state_, pfProtocol *protocol_);

    protected:
        uniT309timeout(void);
};

//
// Class: uniT310timeout
//
// Description:
//      Timer T310 is started when CALL PROCEEDING is received.
//

class uniT310timeout : pfTimerMessenger
{
    public:
        static pfTimerMessenger *create(void);

        uniT310timeout(const uniT310timeout &other_);
        virtual ~uniT310timeout(void);
        virtual pfTimerMessenger *clone(void) const;

        virtual void apply(pfState *state_, pfProtocol *protocol_);

    protected:
        uniT310timeout(void);
};

//
// Class: uniT313timeout
//
// Description:
//      Timer T313 is started when CONNECT is sent.
//

class uniT313timeout : pfTimerMessenger
{
    public:
        static pfTimerMessenger *create(void);

        uniT313timeout(const uniT313timeout &other_);
        virtual ~uniT313timeout(void);
        virtual pfTimerMessenger *clone(void) const;

        virtual void apply(pfState *state_, pfProtocol *protocol_);

    protected:
        uniT313timeout(void);
};

//
// Class: uniT316timeout
//
// Description:
//      Timer T316 is started when RESTART is sent.
//

class uniT316timeout : pfTimerMessenger
{
    public:
        static pfTimerMessenger *create(void);

        uniT316timeout(const uniT316timeout &other_);
        virtual ~uniT316timeout(void);        
        virtual pfTimerMessenger *clone(void) const;
        
        virtual void apply(pfState *state_, pfProtocol *protocol_);

    protected:
        uniT316timeout(void);
};

//
// Class: uniT317timeout
//
// Description:
//      Timer T317 is started when RESTART is received.
//

class uniT317timeout : pfTimerMessenger
{
    public:
        static pfTimerMessenger *create(void);

        uniT317timeout(const uniT317timeout &other_);
        virtual ~uniT317timeout(void);        
        virtual pfTimerMessenger *clone(void) const;
        
        virtual void apply(pfState *state_, pfProtocol *protocol_);

    protected:
        uniT317timeout(void);
};

//
// Class: uniT322timeout
//
// Description:
//      Timer T322 is started when STATUS ENQUIRY is sent.
//

class uniT322timeout : pfTimerMessenger
{
    public:
        static pfTimerMessenger *create(void);

        uniT322timeout(const uniT322timeout &other_);
        virtual ~uniT322timeout(void);        
        virtual pfTimerMessenger *clone(void) const;
        
        virtual void apply(pfState *state_, pfProtocol *protocol_);

    protected:
        uniT322timeout(void);
};

//
// Class: uniT398timeout
//
// Description:
//      Timer T398 is started when DROP PARTY is sent.
//

class uniT398timeout : pfTimerMessenger
{
    public:
        static pfTimerMessenger *create(void);

        uniT398timeout(const uniT398timeout &other_);
        virtual ~uniT398timeout(void);        
        virtual pfTimerMessenger *clone(void) const;
        
        virtual void apply(pfState *state_, pfProtocol *protocol_);

    protected:
        uniT398timeout(void);
};

//
// Class: uniT399timeout
//
// Description:
//      Timer T399 is started when ADD PARTY is sent.
//

class uniT399timeout : pfTimerMessenger
{
    public:
        static pfTimerMessenger *create(void);

        uniT399timeout(const uniT399timeout &other_);
        virtual ~uniT399timeout(void);        
        virtual pfTimerMessenger *clone(void) const;
        
        virtual void apply(pfState *state_, pfProtocol *protocol_);

    protected:
        uniT399timeout(void);
};

//
// Class: uniTREMOVEDtimeout
//
// Description:
//      uni TREMOVED is started when DROP PARTY is sent to all
//      PMPs and we are waiting for ACKs.
//

class uniTREMOVEDtimeout : pfTimerMessenger
{
    public:
        static pfTimerMessenger *create(void);

        uniTREMOVEDtimeout(const uniTREMOVEDtimeout &other_);
        virtual ~uniTREMOVEDtimeout(void);        
        virtual pfTimerMessenger *clone(void) const;
        
        virtual void apply(pfState *state_, pfProtocol *protocol_);

    protected:
        uniTREMOVEDtimeout(void);
};

//
// Class: uni*TimeoutInputs
//
// Description:
//      Abstract classes for timer inputs.
//

class uniTimeoutInputs
{
    public:
        virtual void uniT301timeoutAct(pfProtocol *protocol_) = 0;
        virtual void uniT303timeoutAct(pfProtocol *protocol_) = 0;
        virtual void uniT308timeoutAct(pfProtocol *protocol_) = 0;
        virtual void uniT310timeoutAct(pfProtocol *protocol_) = 0;
        virtual void uniT313timeoutAct(pfProtocol *protocol_) = 0;        
        virtual void uniT322timeoutAct(pfProtocol *protocol_) = 0;
        virtual void uniTREMOVEDtimeoutAct(pfProtocol *protocol_) = 0;
};

class uniCoOrdTimeoutInputs
{
    public:
        virtual void uniT309timeoutAct(pfProtocol *protocol_) = 0;
};

class uniRSNTimeoutInputs
{
    public:
        virtual void uniT316timeoutAct(pfProtocol *protocol_) = 0;
};

class uniRRNTimeoutInputs
{
    public:
        virtual void uniT317timeoutAct(pfProtocol *protocol_) = 0;
};

class uniPMPTimeoutInputs
{
    public:
        virtual void uniT398timeoutAct(pfProtocol *protocol_) = 0;
        virtual void uniT399timeoutAct(pfProtocol *protocol_) = 0;
};

#endif // __UNI_UNITIMEOUTS_H__



