//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project
//
//File: tastate.h
//
//Version: $Revision: 1.9 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/08/20 13:09:34 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Jussi Turunen
//
//Description:
//      Definition of a state class for implementations which
//      need to react only to taMessengers. Act method sends
//      data from received taMessenger to a CORBA object which
//      implements the otMessage_var interface.
//      A better name for the file and the class are in the works.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 

#ifndef __ADAPTER_TASTATE_H__
#define __ADAPTER_TASTATE_H__

#include "pf/state.h"
#include "iface/uaalif/uaalupprimitives.h"
#include "taprimitives.h"
#include "msg.h"

class pfProtocol;

// uaalUpInputs inherits virtually pfState
// uaalInputs are cosmetic additions and do nothing useful.
// Remove from the final version.
class taState : public pfState,
                public taInputs,
                public uaalUpInputs
{
    public:
        taState(void);
        virtual ~taState(void);
        static taState *instance(void);
        void taMessengerAct(taMessenger *messenger_,
                            pfProtocol *protocol_);
        void setReceiver(CORBA_ORB_ptr orb_, const string &peerName_);

        void uaalESTABLISHindAct(
            uaalESTABLISHind *messenger_,
            pfProtocol *protocol_);
        void uaalESTABLISHconfAct(
            uaalESTABLISHconf *messenger_,
            pfProtocol *protocol_);
        void uaalRELEASEindAct(
            uaalRELEASEind *messenger_,
            pfProtocol *protocol_);
        void uaalRELEASEconfAct(
            uaalRELEASEconf *messenger_,
            pfProtocol *protocol_);
        void uaalDATAindAct(
            uaalDATAind *messenger_,
            pfProtocol *protocol_);
        void uaalUNITDATAindAct(
            uaalUNITDATAind *messenger_,
            pfProtocol *protocol_);

    private:
        otMessage_var _receiver;
        static taState *_only;
};

#endif //  __ADAPTER_TASTATE_H__

