// **********************************************************************
//
// Generated by the ORBacus IDL-to-C++ Translator
//
// Copyright (c) 2003
// IONA Technologies, Inc.
// Waltham, MA, USA
//
// All Rights Reserved
//
// **********************************************************************

// Version: 4.1.3

#ifndef __OB_OBEventChannelFactory_h__
#define __OB_OBEventChannelFactory_h__

#ifndef OB_EVENT_IMPORT
#   ifdef OB_DLL
#      define OB_EVENT_IMPORT __declspec(dllimport)
#   else
#      define OB_EVENT_IMPORT /**/
#   endif
#endif


#include <OB/CosEventChannelAdmin.h>
#include <OB/OBEventReceiver.h>

#ifndef OB_INTEGER_VERSION
#   error No ORBacus version defined! Is <OB/CORBA.h> included?
#endif

#ifndef OB_NO_VERSION_CHECK
#   if (OB_INTEGER_VERSION != 4010300L)
#       error ORBacus version mismatch!
#   endif
#endif

namespace OBEventChannelFactory
{

class EventChannelFactory;
typedef EventChannelFactory* EventChannelFactory_ptr;
typedef EventChannelFactory* EventChannelFactoryRef;

OB_EVENT_IMPORT extern OB::TypeCodeConst _tc_EventChannelFactory;

} // End of namespace OBEventChannelFactory

void OBDuplicate(OBEventChannelFactory::EventChannelFactory_ptr);
void OBRelease(OBEventChannelFactory::EventChannelFactory_ptr);

void OBMarshal(OBEventChannelFactory::EventChannelFactory_ptr, OB::OutputStreamImpl*);
void OBUnmarshal(OBEventChannelFactory::EventChannelFactory_ptr&, OB::InputStreamImpl*);

namespace OBEventChannelFactory
{

typedef OB::ObjVar< EventChannelFactory > EventChannelFactory_var;
typedef OB::ObjOut< EventChannelFactory > EventChannelFactory_out;

} // End of namespace OBEventChannelFactory

namespace OBStubImpl_OBEventChannelFactory
{

class EventChannelFactory;
typedef EventChannelFactory* EventChannelFactory_ptr;

} // End of namespace OBStubImpl_OBEventChannelFactory

void OBDuplicate(OBStubImpl_OBEventChannelFactory::EventChannelFactory_ptr);
void OBRelease(OBStubImpl_OBEventChannelFactory::EventChannelFactory_ptr);

namespace OBStubImpl_OBEventChannelFactory
{

typedef OB::ObjVar< EventChannelFactory > EventChannelFactory_var;

} // End of namespace OBStubImpl_OBEventChannelFactory

//
// IDL:ooc.com/OBEventChannelFactory:1.0
//
namespace OBEventChannelFactory
{

//
// IDL:ooc.com/OBEventChannelFactory/ChannelId:1.0
//
typedef char* ChannelId;
typedef ::CORBA::String_var ChannelId_var;
typedef ::CORBA::String_out ChannelId_out;
OB_EVENT_IMPORT extern OB::TypeCodeConst _tc_ChannelId;

//
// IDL:ooc.com/OBEventChannelFactory/ChannelIdSeq:1.0
//
class OBUnique_ChannelIdSeq { };

typedef OB::StrSeq< OBUnique_ChannelIdSeq > ChannelIdSeq;
typedef OB::SeqVar< OB::StrSeq< OBUnique_ChannelIdSeq > > ChannelIdSeq_var;
typedef OB::SeqOut< OB::StrSeq< OBUnique_ChannelIdSeq > > ChannelIdSeq_out;
OB_EVENT_IMPORT extern OB::TypeCodeConst _tc_ChannelIdSeq;

struct OBInfo_ChannelIdSeq : public OB::ConstructedInfo
{
    OBInfo_ChannelIdSeq() { }

    virtual void free(void* p) const
    {
        delete (ChannelIdSeq*)p;
    }

    virtual void* dup(const void* p) const
    {
        return new ChannelIdSeq(*(const ChannelIdSeq*)p);
    }

    virtual void marshal(const void*, OB::OutputStreamImpl*) const;
    virtual void unmarshal(void*, OB::InputStreamImpl*) const;
};

//
// IDL:ooc.com/OBEventChannelFactory/ChannelAlreadyExists:1.0
//
struct ChannelAlreadyExists : public ::CORBA::UserException
{
    ChannelAlreadyExists() { }
    ChannelAlreadyExists(const ChannelAlreadyExists&);
    ChannelAlreadyExists& operator=(const ChannelAlreadyExists&);

    static ChannelAlreadyExists* _downcast(::CORBA::Exception*);
    static const ChannelAlreadyExists* _downcast(const ::CORBA::Exception*);
    virtual const char* _name() const;
    virtual void _raise() const { throw *this; }
    virtual const char* _rep_id() const;
    virtual char* _to_string() const;

    virtual ::CORBA::Exception* _OB_clone() const;
    virtual void _OB_insertInAny(::CORBA::Any&);

    static void _OB_unmarshal(ChannelAlreadyExists&, OB::InputStreamImpl*);
};

OB_EVENT_IMPORT extern OB::TypeCodeConst _tc_ChannelAlreadyExists;

//
// IDL:ooc.com/OBEventChannelFactory/ChannelNotAvailable:1.0
//
struct ChannelNotAvailable : public ::CORBA::UserException
{
    ChannelNotAvailable() { }
    ChannelNotAvailable(const ChannelNotAvailable&);
    ChannelNotAvailable& operator=(const ChannelNotAvailable&);

    static ChannelNotAvailable* _downcast(::CORBA::Exception*);
    static const ChannelNotAvailable* _downcast(const ::CORBA::Exception*);
    virtual const char* _name() const;
    virtual void _raise() const { throw *this; }
    virtual const char* _rep_id() const;
    virtual char* _to_string() const;

    virtual ::CORBA::Exception* _OB_clone() const;
    virtual void _OB_insertInAny(::CORBA::Any&);

    static void _OB_unmarshal(ChannelNotAvailable&, OB::InputStreamImpl*);
};

OB_EVENT_IMPORT extern OB::TypeCodeConst _tc_ChannelNotAvailable;

//
// IDL:ooc.com/OBEventChannelFactory/EventChannelFactory:1.0
//
class EventChannelFactory : virtual public ::CORBA::Object
{
    EventChannelFactory(const EventChannelFactory&);
    void operator=(const EventChannelFactory&);

protected:

    static OB_EVENT_IMPORT const char* ids_[];

public:

    EventChannelFactory() { }
    virtual ~EventChannelFactory() { }

    typedef EventChannelFactory_ptr _ptr_type;
    typedef EventChannelFactory_var _var_type;

    static inline EventChannelFactory_ptr
    _duplicate(EventChannelFactory_ptr p)
    {
        if(p)
            p -> _add_ref();
        return p;
    }

    static inline EventChannelFactory_ptr
    _nil()
    {
        return 0;
    }

    static EventChannelFactory_ptr _narrow(::CORBA::Object_ptr);
    static EventChannelFactory_ptr _unchecked_narrow(::CORBA::Object_ptr);

    static EventChannelFactory_ptr _narrow(::CORBA::AbstractBase_ptr);
    static EventChannelFactory_ptr _unchecked_narrow(::CORBA::AbstractBase_ptr);

    static const char** _OB_staticIds();

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/create_channel:1.0
    //
    virtual ::CosEventChannelAdmin::EventChannel_ptr create_channel(const char* id) = 0;

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/create_channel_with_receiver:1.0
    //
    virtual ::CosEventChannelAdmin::EventChannel_ptr create_channel_with_receiver(const char* id,
                                                                                  ::OB::EventReceiver_ptr receiver) = 0;

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/get_channel_by_id:1.0
    //
    virtual ::CosEventChannelAdmin::EventChannel_ptr get_channel_by_id(const char* id) = 0;

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/get_channels:1.0
    //
    virtual ChannelIdSeq* get_channels() = 0;

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/shutdown:1.0
    //
    virtual void shutdown() = 0;
};

} // End of namespace OBEventChannelFactory

//
// IDL:ooc.com/OBEventChannelFactory:1.0
//
namespace OBProxy_OBEventChannelFactory
{

//
// IDL:ooc.com/OBEventChannelFactory/EventChannelFactory:1.0
//
class EventChannelFactory : virtual public ::OBEventChannelFactory::EventChannelFactory,
                            virtual public OBCORBA::Object
{
    EventChannelFactory(const EventChannelFactory&);
    void operator=(const EventChannelFactory&);

protected:

    virtual OB::MarshalStubImpl_ptr _OB_createMarshalStubImpl();

public:

    EventChannelFactory() { }
    virtual ~EventChannelFactory() { }

    virtual const char** _OB_ids() const;

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/create_channel:1.0
    //
    ::CosEventChannelAdmin::EventChannel_ptr create_channel(const char* id);

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/create_channel_with_receiver:1.0
    //
    ::CosEventChannelAdmin::EventChannel_ptr create_channel_with_receiver(const char* id,
                                                                          ::OB::EventReceiver_ptr receiver);

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/get_channel_by_id:1.0
    //
    ::CosEventChannelAdmin::EventChannel_ptr get_channel_by_id(const char* id);

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/get_channels:1.0
    //
    ::OBEventChannelFactory::ChannelIdSeq* get_channels();

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/shutdown:1.0
    //
    void shutdown();
};

} // End of namespace OBProxy_OBEventChannelFactory

//
// IDL:ooc.com/OBEventChannelFactory:1.0
//
namespace OBStubImpl_OBEventChannelFactory
{

//
// IDL:ooc.com/OBEventChannelFactory/EventChannelFactory:1.0
//
class EventChannelFactory : virtual public OB::StubImplBase
{
    EventChannelFactory(const EventChannelFactory&);
    void operator=(const EventChannelFactory&);

protected:

    EventChannelFactory() { }

public:

    static inline EventChannelFactory_ptr
    _duplicate(EventChannelFactory_ptr p)
    {
        if(p)
            p -> _OB_incRef();
        return p;
    }

    static inline EventChannelFactory_ptr
    _nil()
    {
        return 0;
    }

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/create_channel:1.0
    //
    virtual ::CosEventChannelAdmin::EventChannel_ptr create_channel(const char* id) = 0;

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/create_channel_with_receiver:1.0
    //
    virtual ::CosEventChannelAdmin::EventChannel_ptr create_channel_with_receiver(const char* id,
                                                                                  ::OB::EventReceiver_ptr receiver) = 0;

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/get_channel_by_id:1.0
    //
    virtual ::CosEventChannelAdmin::EventChannel_ptr get_channel_by_id(const char* id) = 0;

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/get_channels:1.0
    //
    virtual ::OBEventChannelFactory::ChannelIdSeq* get_channels() = 0;

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/shutdown:1.0
    //
    virtual void shutdown() = 0;
};

} // End of namespace OBStubImpl_OBEventChannelFactory

//
// IDL:ooc.com/OBEventChannelFactory:1.0
//
namespace OBMarshalStubImpl_OBEventChannelFactory
{

//
// IDL:ooc.com/OBEventChannelFactory/EventChannelFactory:1.0
//
class EventChannelFactory : virtual public OBStubImpl_OBEventChannelFactory::EventChannelFactory,
                            virtual public OB::MarshalStubImpl
{
    EventChannelFactory(const EventChannelFactory&);
    void operator=(const EventChannelFactory&);

protected:

    EventChannelFactory() { }
    friend class OBProxy_OBEventChannelFactory::EventChannelFactory;

public:

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/create_channel:1.0
    //
    virtual ::CosEventChannelAdmin::EventChannel_ptr create_channel(const char* id);

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/create_channel_with_receiver:1.0
    //
    virtual ::CosEventChannelAdmin::EventChannel_ptr create_channel_with_receiver(const char* id,
                                                                                  ::OB::EventReceiver_ptr receiver);

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/get_channel_by_id:1.0
    //
    virtual ::CosEventChannelAdmin::EventChannel_ptr get_channel_by_id(const char* id);

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/get_channels:1.0
    //
    virtual ::OBEventChannelFactory::ChannelIdSeq* get_channels();

    //
    // IDL:ooc.com/OBEventChannelFactory/EventChannelFactory/shutdown:1.0
    //
    virtual void shutdown();
};

} // End of namespace OBMarshalStubImpl_OBEventChannelFactory

//
// IDL:ooc.com/OBEventChannelFactory:1.0
//
namespace OBV_OBEventChannelFactory
{

} // End of namespace OBV_OBEventChannelFactory

//
// IDL:ooc.com/OBEventChannelFactory/ChannelIdSeq:1.0
//
void operator<<=(::CORBA::Any&, OBEventChannelFactory::ChannelIdSeq*);
void operator<<=(::CORBA::Any&, const OBEventChannelFactory::ChannelIdSeq&);
CORBA::Boolean operator>>=(const ::CORBA::Any&, const OBEventChannelFactory::ChannelIdSeq*&);

inline void
operator<<=(::CORBA::Any_var& any, OBEventChannelFactory::ChannelIdSeq* val)
{
    any.inout() <<= val;
}

inline void
operator<<=(::CORBA::Any_var& any, const OBEventChannelFactory::ChannelIdSeq& val)
{
    any.inout() <<= val;
}

inline ::CORBA::Boolean
operator>>=(const ::CORBA::Any_var& any, const OBEventChannelFactory::ChannelIdSeq*& val)
{
    return any.in() >>= val;
}

//
// IDL:ooc.com/OBEventChannelFactory/ChannelAlreadyExists:1.0
//
void operator<<=(::CORBA::Any&, OBEventChannelFactory::ChannelAlreadyExists*);
void operator<<=(::CORBA::Any&, const OBEventChannelFactory::ChannelAlreadyExists&);
CORBA::Boolean operator>>=(const ::CORBA::Any&, const OBEventChannelFactory::ChannelAlreadyExists*&);

inline void
operator<<=(::CORBA::Any_var& any, OBEventChannelFactory::ChannelAlreadyExists* val)
{
    any.inout() <<= val;
}

inline void
operator<<=(::CORBA::Any_var& any, const OBEventChannelFactory::ChannelAlreadyExists& val)
{
    any.inout() <<= val;
}

inline ::CORBA::Boolean
operator>>=(const ::CORBA::Any_var& any, const OBEventChannelFactory::ChannelAlreadyExists*& val)
{
    return any.in() >>= val;
}

//
// IDL:ooc.com/OBEventChannelFactory/ChannelNotAvailable:1.0
//
void operator<<=(::CORBA::Any&, OBEventChannelFactory::ChannelNotAvailable*);
void operator<<=(::CORBA::Any&, const OBEventChannelFactory::ChannelNotAvailable&);
CORBA::Boolean operator>>=(const ::CORBA::Any&, const OBEventChannelFactory::ChannelNotAvailable*&);

inline void
operator<<=(::CORBA::Any_var& any, OBEventChannelFactory::ChannelNotAvailable* val)
{
    any.inout() <<= val;
}

inline void
operator<<=(::CORBA::Any_var& any, const OBEventChannelFactory::ChannelNotAvailable& val)
{
    any.inout() <<= val;
}

inline ::CORBA::Boolean
operator>>=(const ::CORBA::Any_var& any, const OBEventChannelFactory::ChannelNotAvailable*& val)
{
    return any.in() >>= val;
}

//
// IDL:ooc.com/OBEventChannelFactory/EventChannelFactory:1.0
//
namespace CORBA
{

inline void
release(::OBEventChannelFactory::EventChannelFactory_ptr p)
{
    if(p)
        p -> _remove_ref();
}

inline Boolean
is_nil(::OBEventChannelFactory::EventChannelFactory_ptr p)
{
    return p == 0;
}

inline void
release(OBStubImpl_OBEventChannelFactory::EventChannelFactory_ptr p)
{
    if(p)
        p -> _OB_decRef();
}

inline Boolean
is_nil(OBStubImpl_OBEventChannelFactory::EventChannelFactory_ptr p)
{
    return p == 0;
}

} // End of namespace CORBA

void operator<<=(::CORBA::Any&, OBEventChannelFactory::EventChannelFactory_ptr*);
void operator<<=(::CORBA::Any&, OBEventChannelFactory::EventChannelFactory_ptr);
CORBA::Boolean operator>>=(const ::CORBA::Any&, OBEventChannelFactory::EventChannelFactory_ptr&);

inline void
operator<<=(::CORBA::Any_var& any, OBEventChannelFactory::EventChannelFactory_ptr* val)
{
    any.inout() <<= val;
}

inline void
operator<<=(::CORBA::Any_var& any, OBEventChannelFactory::EventChannelFactory_ptr val)
{
    any.inout() <<= val;
}

inline CORBA::Boolean
operator>>=(const ::CORBA::Any_var& any, OBEventChannelFactory::EventChannelFactory_ptr& val)
{
    return any.in() >>= val;
}

#endif
