/* -*- mode: c++; c-basic-offset: 4; -*-
 *
 * MICO --- a CORBA implementation
 * Copyright (C) 1997-98 Kay Roemer & Arno Puder
 * 
 * multi-thread dispatcher
 * Copyright (C) 1999 Andreas Schultz                                 
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 * Send comments and/or bug reports to:
 *                mico@informatik.uni-frankfurt.de
 * 
 * $Id: mt_dispatcher.h,v 1.6 1999/12/28 22:08:02 aschultz Exp $
 *
 */


#ifndef __MT_DISPATCHER_H__
#define __MT_DISPATCHER_H__

class GIOPConn;
struct GIOPConnCallback;

struct ORBMsg {
    enum Event { KillConn, CloseConn };

    ORBMsg(GIOPConn *_conn, GIOPConnCallback *_cb, Event _ev):
	conn(_conn), cb(_cb), ev(_ev) {};

    GIOPConn         *conn;
    GIOPConnCallback *cb;
    Event            ev;
};

class MTDispatcher: public passiveOperation {
public:
    MTDispatcher();
    MTDispatcher( const MICO::MTDispatcher & );

    void process( msg_type * msg );
    virtual Operation *copy() const;
};


#endif // __MT_DISPATCHER_H__
