//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project
//
//File: msg_impl.h
//
//Version: $Revision: 1.9 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/10/08 13:21:03 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Jussi Turunen
//
//Description:
//      Implementation of the otMessage IDL interface. The implementation
//      is herited from both the OmniBroker skeleton class and pfAdapter
//      conduit, so that it can provide a direct IDL interface to a conduit.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 

#ifndef __ADAPTER_MSG_IMPL_H__
#define __ADAPTER_MSG_IMPL_H__

class taState;

#include <OB/CORBA.h>
#include <typeinfo>
#include <string>
#include "msg_skel.h"
#include "pf/adapter.h"

class pfTestAdapter : public otMessage_skel, public pfAdapter
{
    public:
        static pfConduit createTestAdapter(CORBA_ORB_ptr orb_,
                                           const string &adaptername_,
					   taState *state_,
                                           const string &PCO_,
					   const string &peerName_=0);
        virtual ~pfTestAdapter(void);

        virtual void send(const char* identifier_,
                          const otMessage::SerializedMessage& message_);
        virtual otMessage::SerializedMessage*
          sendTwoWay(const char* identifier_,
		     const ParameterList& parameters_);

        void saveIOR(CORBA_ORB_ptr orb_, const string &filename_);
        string getPCO(void);

    protected:
        pfTestAdapter(const string &adaptername_, const string &PCO_);

    private:
        string _PCO;
        string _adaptername;
};

#endif // __ADAPTER_MSG_IMPL_H__

