//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / UNI
//
//File: unitransporter.h
//
//Version: $Revision: 1.7 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/08/05 05:22:09 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Jari Katajavuori
//
//Description:
//
//
//Copyright:
//
//
//Licence:
//
//
//History: 

#ifndef __UNI_UNITRANSPORTER_H__
#define __UNI_UNITRANSPORTER_H__

#include "pf/transp.h"

class pfFactory;
class pfMux;
class pfProtocol;
class pfState;
class uniProtocol;

//
// Class: uniMuxCatcherTransporter 
//
// Description:
//      Coordination protocol needs to know the pointer of the
//      above mux conduit, because it needs to call mux-specific
//      methods. The pointer can't be got any other way.
//

class uniMuxCatcherTransporter : public pfTransporter
{
    public:
        static uniMuxCatcherTransporter create(void);

        uniMuxCatcherTransporter(const uniMuxCatcherTransporter &other_);
        virtual ~uniMuxCatcherTransporter(void);
        virtual uniMuxCatcherTransporter *clone(void);

        virtual void atMux(pfMux *const mux_);

        virtual pfMux *catchedMux(void);
        
    protected:
        uniMuxCatcherTransporter(void);

    private:
        pfMux *_mux;
};

//
// Class: uniCrossConnecter
//
// Description:
//      Because of uni's structure (multipoint capabilities), cc above
//      the uni must be created exclusively. This modification of the
//      pfCrossConnecer class performs this task, and can still get the
//      pointer to the cc.
//

class uniCrossConnecter : public pfCrossConnecter
{
    public:
        static uniCrossConnecter createUNICrossConnecter(void);
        virtual ~uniCrossConnecter(void);

        virtual void atFactory(pfFactory *const factory_);
        virtual void atProtocol(pfProtocol *const protocol_, pfState *state_);
        virtual void atMux(pfMux *const mux_);
        
    protected:
        uniCrossConnecter(void);

    private:
        uniProtocol *_protocol;
};
        
#endif // __UNI_UNITRANSPORTER_H__
