//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / SW
//
//File: swconnectid.h
//
//Version: $Revision: 1.4 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/12/09 11:00:09 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Timo Pärnänen
//
//Description:
//      Defines class used to store transactionIDs, callbacks etc.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 

#ifndef __SW_CONNECTID_H__
#define __SW_CONNECTID_H__

#include <typeinfo>
#include "pf/types.h"
#include "pf/conduit.h"

class ieConnectionIdentifier;
class swFabricCallback;

//
//Class: swConnectId
//

class swConnectId
{
    public:
        // Constructors
        swConnectId(pfUlong inputId_,
                    pfUlong outputId_,
                    ieConnectionIdentifier *input_,
                    ieConnectionIdentifier *output_,
                    bool bidirection_,
                    pfConduit &callback_);

        swConnectId(pfUlong inputId_,
                    pfUlong outputId_,
                    bool bidirection_,
                    swFabricCallback *callback_);
        
        swConnectId(pfUlong identifier_);
        
        // Destructor
        virtual ~swConnectId(void);
        
        // Operators
        swConnectId &operator=(const swConnectId &other_);
        bool operator==(const swConnectId &other_) const;
        bool operator!=(const swConnectId &other_) const;
        bool operator<(const swConnectId &other_) const;
        
        // Responses
        virtual bool processSuccess(void);
        virtual void processFailure(pfUlong cause_);

    private:
        pfUlong _inputId;
        pfUlong _outputId;
        ieConnectionIdentifier *_input;
        ieConnectionIdentifier *_output;
        pfConduit _proxyCallback;
        swFabricCallback *_pointerCallback;
        bool _success;
        
    private:
        swConnectId(void);
};

#endif // __SW_CONNECTID_H__
