//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / IE
//
//File: connectioninfo.h
//
//Version: $Revision: 1.5 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/12/09 11:00:24 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Timo Pärnänen
//
//Description:
//      Defines a base class for all switchable information element 
//      classes. Includes information needed to switch connection. 
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 
//

#ifndef __IE_CONNECTIONINFO_H__
#define __IE_CONNECTIONINFO_H__

#include <typeinfo>
#include "pf/conduit.h"
#include "iface/swif/swconnectiface.h"
#include "informationelement.h"

class ieConnectionIdentifier;

//
//Class: ieConnectionInfo
//

class ieConnectionInfo : public ieInformationElement
{
    public:
        virtual ~ieConnectionInfo(void);

        void setCallback(pfConduit &callback_);
        void setConnectManager(swConnectIface *manager_);

        void setLinkIdentifier(pfUlong linkIdentifier_);
        pfUlong getLinkIdentifier(void) const;

        virtual void connect(ieConnectionInfo *other_, 
                             bool bidirection_) = 0;
        virtual void connect(ieConnectionIdentifier *other_,
                             bool bidirection_);
        
        virtual void disconnect(ieConnectionInfo *other_,
                                bool bidirection_) = 0;
        virtual void disconnect(ieConnectionIdentifier *other_,
                                bool bidirection_);
        
    protected:
        ieConnectionInfo(void);
        ieConnectionInfo(const ieConnectionInfo &other_);

        virtual pfIE *clone(void) const = 0;

    protected:
        pfConduit _callback;
        swConnectIface *_manager;
        pfUlong _linkIdentifier;
};

#endif // __IE_CONNECTIONINFO_H__

