//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / SIG
//
//File: sigtimeouts.h
//
//Version: $Revision: 1.1 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/11/11 13:30:52 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Sami Raatikainen
//
//Description:
//      This file contains all timer messengers used with signalling protocols.
//
//Copyright:
//
//
//Licence:
//
//
//History: 

#ifndef __SIG_SIGTIMEOUTS_H__
#define __SIG_SIGTIMEOUTS_H__

#include "pf/timer.h"

class pfState;
class pfProtocol;

//
// Class: awaitCONNECTtimeout
//
// Description:
//      Timer is started when ALERTING/ACM is received.
//

class sigAwaitCONNECTtimeout : pfTimerMessenger
{
    public:
        static pfTimerMessenger *create(void);
        
        sigAwaitCONNECTtimeout(const sigAwaitCONNECTtimeout &other_);
        virtual ~sigAwaitCONNECTtimeout(void);
        virtual pfTimerMessenger *clone(void) const;
        
        virtual void apply(pfState *state_, pfProtocol *protocol_);
        
    protected:
        sigAwaitCONNECTtimeout(void);
};

//
// Class: sigAwaitProceedingtimeout
//
// Description:
//      Timer is started when SETUP is sent.
//

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

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

    protected:
        sigAwaitPROCEEDINGtimeout(void);
};

//
// Class: sigAwaitRLCtimeout
//
// Description:
//      Timer is started when RELEASE is sent.
//

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

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

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

    protected:
        sigAwaitRLCtimeout(void);
};


//
// Class: bisupT7btimeout / Await Address Complete
//
// Description:
//      Timer is started when the latest address message is sent.
//

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

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

    protected:
        bisupT7btimeout(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: 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: sig*TimeoutInputs
//
// Description:
//      Abstract classes for timer inputs.
//

class sigTimeoutInputs
{
    public:
        virtual void sigAwaitCONNECTtimeoutAct(pfProtocol *protocol_) = 0;
        virtual void sigAwaitPROCEEDINGtimeoutAct(pfProtocol *protocol_) = 0;
        virtual void sigAwaitRLCtimeoutAct(pfProtocol *protocol_) = 0;
        virtual void bisupT7btimeoutAct(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;
};

#endif // __SIG_SIGTIMEOUTS_H__



