//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / SIGIF
//
//File: sigdownprimitives.h
//
//Version: $Revision: 1.27 $
//
//State: $State: Exp $
//
//Date: $Date: 1999/03/08 07:28:25 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Jari Katajavuori
//      Sami Raatikainen
//
//Description:
//      Messages for signaling interface down direction.
//
//Copyright:
//
//
//Licence:
//
//
//History: 

#ifndef __SIGIF_SIGDOWNPRIMITIVES_H__
#define __SIGIF_SIGDOWNPRIMITIVES_H__

#include <typeinfo>
#include <string>

#include "pf/messenge.h"
#include "pf/protocol.h"
#include "pf/state.h"

#include "sigprimitive.h"

//
// Class: sigSETUPreq
//
// Description:
//      This message is for originating end to begin call
//      establishing.
//
// Required fields for SETUPreq:
//  - Called Party Number 
//  - ATM Traffic Descriptor 
//  - Broadband Bearer Capability
//  - Quality of Service Parameters
//  - Endpoint Reference, used with point-to-multipoint connections only 
// Optional fields for SETUPreq:
//  - AAL Parameters 
//  - Broadband High Layer Info
//  - Broadband Repeat Indicator
//  - Broadband Low Layer Info
//  - Called Party Subaddress
//  - Calling Party Number
//  - Calling Party Subaddress
//  - Broadband Sending Complete (actually not used)
//  - Transit Network Selection
//

class sigSETUPreq : public sigPrimitive
{
    public:
        sigSETUPreq(void);
        virtual ~sigSETUPreq(void);
        virtual void apply(pfState *state_, pfProtocol *const protocol_);
};

//
// Class: sigPROCEEDINGreq
//
// Description:
//      This message is for terminating end to indicate that call
//      is proceeding [that is, it is ok with current network element
//      (switch) to proceed connecting]
//

class sigPROCEEDINGreq : public sigPrimitive
{
    public:
        sigPROCEEDINGreq(void);
        virtual ~sigPROCEEDINGreq(void);
        virtual void apply(pfState *state_, pfProtocol *const protocol_);
};

//
// Class: sigALERTINGreq
//
// Description:
//
//

class sigALERTINGreq : public sigPrimitive
{
    public:
        sigALERTINGreq(void);
        virtual ~sigALERTINGreq(void);
        virtual void apply(pfState *state_, pfProtocol *const protocol_);
};

//
// Class: sigPROGRESSreq
//
// Description:
//
//

class sigPROGRESSreq : public sigPrimitive
{
    public:
        sigPROGRESSreq(void);
        virtual ~sigPROGRESSreq(void);
        virtual void apply(pfState *state_, pfProtocol *const protocol_);
};




//
// Class: sigSETUPresp
//
// Description:
//      This message is for terminating end to indicate that call
//      is established for current network element on.
//

class sigSETUPresp : public sigPrimitive
{
    public:
        sigSETUPresp(void);
        virtual ~sigSETUPresp(void);
        virtual void apply(pfState *state_, pfProtocol *const protocol_);
};

//
// Class: sigSETUP_COMPLETEreq
//
// Description:
//      This message is for originating end to indicate that
//      established connection is approved.
//

class sigSETUP_COMPLETEreq : public sigPrimitive
{
    public:
        sigSETUP_COMPLETEreq(void);
        virtual ~sigSETUP_COMPLETEreq(void);
        virtual void apply(pfState *state_, pfProtocol *const protocol_);
};

//
// Class: sigRELEASEreq
//
// Description:
//      Requests the release process to be started.
//

class sigRELEASEreq : public sigPrimitive
{
    public:
        sigRELEASEreq(void);
        virtual ~sigRELEASEreq(void);
        virtual void apply(pfState *state_, pfProtocol *const protocol_);
};

//
// Class: sigRELEASEresp
//
// Description:
//      Connection should be released instantly.
//

class sigRELEASEresp : public sigPrimitive
{
    public:
        sigRELEASEresp(void);
        virtual ~sigRELEASEresp(void);
        virtual void apply(pfState *state_, pfProtocol *const protocol_);
};

//
// Class: sigRESETreq
//
// Description:
//      Requests the VPI/VCI resources to be freed.
//

class sigRESETreq : public sigPrimitive
{
    public:
        sigRESETreq(void);
        virtual ~sigRESETreq(void);
        virtual void apply(pfState *state_, pfProtocol *const protocol_);
};

//
// Class: sigRESETresp
//
// Description:
//      Indicates that VPI/VCI resources are freed as requested.
//

class sigRESETresp : public sigPrimitive
{
    public:
        sigRESETresp(void);
        virtual ~sigRESETresp(void);
        virtual void apply(pfState *state_, pfProtocol *const protocol_);
};

//
// Class: sigRESET_ERRORresp
//
// Description:
//      Indicates that requested VPI/VCI can't be freed.
//

class sigRESET_ERRORresp : public sigPrimitive
{
    public:
        sigRESET_ERRORresp(void);
        virtual ~sigRESET_ERRORresp(void);
        virtual void apply(pfState *state_, pfProtocol *const protocol_);
};


// 
// Class: sigDownInputs
//
// Description:
//      Abstract class to be inherited at such (state) classes, which
//      wish to get previouly represented primitives as input messages.
//

class sigDownInputs
{
    public:
        virtual void sigSETUPreqAct(
            sigSETUPreq *message_,
            pfProtocol *protocol_) = 0;
        virtual void sigPROCEEDINGreqAct(
            sigPROCEEDINGreq *message_,
            pfProtocol *protocol_) = 0;
        // ++TODO++ change to pure virtual when possible
        virtual void sigALERTINGreqAct(
            sigALERTINGreq *message_,
            pfProtocol *protocol_){}
        // ++TODO++ change to pure virtual when possible
        virtual void sigPROGRESSreqAct(
            sigPROGRESSreq *message_,
            pfProtocol *protocol_){}
        virtual void sigSETUPrespAct(
            sigSETUPresp *message_,
            pfProtocol *protocol_) = 0;
        virtual void sigSETUP_COMPLETEreqAct(
            sigSETUP_COMPLETEreq *message_,
            pfProtocol *protocol_) = 0;
        virtual void sigRELEASEreqAct(
            sigRELEASEreq *message_,
            pfProtocol *protocol_) = 0;
        virtual void sigRELEASErespAct(
            sigRELEASEresp *message_,
            pfProtocol *protocol_) = 0;
        virtual void sigRESETreqAct(
            sigRESETreq *message_,
            pfProtocol *protocol_) = 0;
        virtual void sigRESETrespAct(
            sigRESETresp *message_,
            pfProtocol *protocol_) = 0;
        virtual void sigRESET_ERRORrespAct(
            sigRESET_ERRORresp *message_,
            pfProtocol *protocol_) = 0;
};

        
#endif // __SIGIF_SIGDOWNPRIMITIVES_H__


