//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / mgmt module
//
//File: toveswitch_impl.h
//
//Version: $Revision: 1.8 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/07/03 12:12:47 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Timo Kokkonen
//
//Description:
//      Corba interface to commans setValue, getValue and execute.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//     
//
//History:
//

#ifndef __MGMT_TOVESWITCH_IMPL_H__
#define __MGMT_TOVESWITCH_IMPL_H__

#include <OB/CORBA.h>
#include "toveswitch_skel.h"
#include "mgmtsend.h"

class toveSwitch_impl : public toveSwitch_switchInterface_skel,
                        public mgmtSend
{
    public:
        toveSwitch_impl(void);
        virtual ~toveSwitch_impl(void);
        // Othersides register/unregister methods. 
        virtual void registerUserInterface(CORBA_Object_ptr iface_);
        virtual void unregisterUserInterface(CORBA_Object_ptr iface_);

        // Received methods.
        virtual char* getValue(const char* name_);
        virtual void setValue(const char* name_, const char* value_);
        virtual void execute(const char* command_,
                             toveSwitch_ParameterList& parameters_);

        // Send methods for user.
        virtual string sendGet(const string &name_);
        virtual void sendSet(const string &name_, const string &value_);
        virtual void sendExecute(mgmtCommand &command_);

    private:
        virtual void registerIfaceToNameService(void);
        virtual void unRegisterIfaceToNameService(void);
        virtual void registerToOther(const string &name_);
        virtual void unRegisterToOther(void);

        toveSwitch_switchInterface_ptr _otherSide;
};

#endif // __MGMT_TOVESWITCH_IMPL_H__
