//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / OVOPS++
//
//File: ss7test.h
//
//Version: $Revision: 1.5 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/10/07 16:30:38 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Timo Pärnänen
//
//Description:
//      
//
//Copyright:
//
//
//Licence:
//
//
//History: 

#ifndef __SS7TEST_H_
#define __SS7TEST_H_

#include <typeinfo>
#include <string>

#include "pf/types.h"
#include "pf/protocol.h"
#include "pf/adapter.h"
#include "pf/messenge.h"
#include "pf/transp.h"
#include "pf/state.h"
#include "pf/storage.h"
#include "mgmt/mgmtdelegationbase.h"

#include "iface/sccpif/sccpupprimitives.h"

class mgmtCommand;

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

class tcapAdapter : public pfProtocol,
                    mgmtDelegationBase
{
    public:
        tcapAdapter(const string &pointCode_, pfBoolean acknowledge_ = 0);
        void sendSccpN_UNITDATAreq(pfStorage &calledAddress_,
                                   pfStorage &callingAddress_,
                                   pfFrame &frame_);
        void sendAcknowledge(sccpN_UNITDATAind *messenger_);
        void printAddressValues(pfStorage &address_);
        
        // Mgmt iface
        virtual string receiveGet(const string &name_);
        virtual void receiveSet(const string &name_, const string &value_);
        virtual void receiveExecute(mgmtCommand &command_);

    private:
        pfBoolean _acknowledge;
        pfUlong _counter;
};

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

class tcapAdapterState : public pfState,
			 public sccpUpInputs
{
    public:
        static tcapAdapterState *instance(void);

        // input methods

        virtual void sccpN_UNITDATAindAct(sccpN_UNITDATAind *messenger_,
                                          pfProtocol *protocol_);
        virtual void sccpN_NOTICEindAct(sccpN_NOTICEind *messenger_,
                                        pfProtocol *protocol_);

    protected:
        tcapAdapterState(void);
        virtual ~tcapAdapterState(void);

    private:
        static tcapAdapterState *_only;
};

#endif // __SS7TEST_H_

