//Editor-Info: -*- C++ -*-
//
//Subject: TOVE-project / UNI-AAL interface
//
//File: lapddownprimitives.h
//
//State: $State: Exp $
//
//Version: $Revision: 1.2 $
//
//Date: $Date: 1999/02/26 06:38:48 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications and Multimedia
//
//Author:
//	Teemu Tynjälä
//
//Description:
//      This file contains the primitives passed from DSS1
//      Coordprotocol to LAPD protocol.  They include only
//      two primitives, namely lapdDATAreq and lapdESTABLISHreq.
//      These two primitives are called from the Coordprotocol,
//      and the LAPD protocol must implement the lapdDownInputs
//      primitives in its state machine.
//
//Copyright:
//
//
//Licence:
//
//
//History:
//
 

#ifndef __LAPDDOWNPRIMITIVES_H__
#define __LAPDDOWNPRIMITIVES_H__


class pfProtocol;
class pfState;


#include "pf/types.h"
#include "pf/transp.h"
#include "pf/frame.h"


//
// Index of Classes
//
// 1. lapdESTABLISHreq
// 2. lapdDATAreq
//


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

class lapdESTABLISHreq : public pfMsgTransporter
{
    public:
        lapdESTABLISHreq(void);
        virtual ~lapdESTABLISHreq(void);
        const lapdESTABLISHreq& operator=(const lapdESTABLISHreq &other_);

        virtual void atProtocol(pfProtocol *protocol_, pfState *state_);
};


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

class lapdDATAreq : public pfMsgTransporter
{
    public:
        lapdDATAreq(void);
        lapdDATAreq(const pfFrame &frame_);
        virtual ~lapdDATAreq(void);
        const lapdDATAreq& operator=(const lapdDATAreq &other_);

        virtual void atProtocol(pfProtocol *protocol_, pfState *state_);
        void setMessageUnit(const pfFrame &frame_);
        pfFrame getMessageUnit(void) const;

    private:
        pfFrame _messageUnit;
};


class lapdDownInputs
{
    public:
        virtual void lapdESTABLISHreqAct(
            lapdESTABLISHreq *messenger_,
            pfProtocol *protocol_) = 0;
        virtual void lapdDATAreqAct(
            lapdDATAreq *messenger_,
            pfProtocol *protocol_) = 0;
};


#endif // __UAALDOWNPRIMITIVES_H__
