//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project/CC
//
//File: ccprotocol.h
//
//Version: $Revision: 1.5 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/11/05 08:21:56 $
//
//Organisation:
//      University of Technology
// 
//Author:
//      Pasi Nummisalo
//
//Description:
//      There is only one Cross Connector Mux (CCM) in the whole system. 
//      The CCM holds references to callID muxes whose default route is 
//      connected to call instance factories. In the connection establishment 
//      state the CCM is used to route messengers to a correct link. 
//      Combination of the CCM and the callID mux is also used to route 
//      INAP-messengers to a correct link and call instance.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//      
//Licence:
//     
//
//History:
//

#ifndef __CC_CROSS_CONNECTOR_MUX_H__
#define __CC_CROSS_CONNECTOR_MUX_H__

#include <typeinfo>
#include <string>

#include "pf/mux.h"

//
//Class: ccCrossConnectorMux
//
//Description:
//      See file description.
//
//Pattern:
//      Singleton, Composite
//

class ccCrossConnectorMux : public pfMux
{
    public:
        static ccCrossConnectorMux *instance(void);
        static string getLinkIdName(void);

        virtual void toFactory(pfTransporter *transporter_);
        
    protected:
        ccCrossConnectorMux(pfKey maxKeyValue_, const string &keyName_);
        virtual ~ccCrossConnectorMux(void);

        virtual int noReference(void) const;

    private:
        static ccCrossConnectorMux *_only;
};

#endif // __CC_CROSS_CONNECTOR_MUX_H__

