// **********************************************************************
//
// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.4.2
//
// <auto-generated>
//
// Generated from file `Connection.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//

#ifndef __Ice_Connection_h__
#define __Ice_Connection_h__

#include <Ice/LocalObjectF.h>
#include <Ice/ProxyF.h>
#include <Ice/ObjectF.h>
#include <Ice/Exception.h>
#include <Ice/LocalObject.h>
#include <Ice/Proxy.h>
#include <IceUtil/ScopedArray.h>
#include <Ice/ObjectAdapterF.h>
#include <Ice/Identity.h>
#include <Ice/Endpoint.h>
#include <Ice/UndefSysMacros.h>

#ifndef ICE_IGNORE_VERSION
#   if ICE_INT_VERSION / 100 != 304
#       error Ice version mismatch!
#   endif
#   if ICE_INT_VERSION % 100 > 50
#       error Beta header file detected
#   endif
#   if ICE_INT_VERSION % 100 < 2
#       error Ice patch level mismatch!
#   endif
#endif

#ifndef ICE_API
#   ifdef ICE_API_EXPORTS
#       define ICE_API ICE_DECLSPEC_EXPORT
#   else
#       define ICE_API ICE_DECLSPEC_IMPORT
#   endif
#endif

namespace Ice
{

class ConnectionInfo;
bool operator==(const ConnectionInfo&, const ConnectionInfo&);
bool operator<(const ConnectionInfo&, const ConnectionInfo&);

ICE_API ::Ice::LocalObject* upCast(::Ice::ConnectionInfo*);

class Connection;
bool operator==(const Connection&, const Connection&);
bool operator<(const Connection&, const Connection&);

ICE_API ::Ice::LocalObject* upCast(::Ice::Connection*);

class IPConnectionInfo;
bool operator==(const IPConnectionInfo&, const IPConnectionInfo&);
bool operator<(const IPConnectionInfo&, const IPConnectionInfo&);

ICE_API ::Ice::LocalObject* upCast(::Ice::IPConnectionInfo*);

class TCPConnectionInfo;
bool operator==(const TCPConnectionInfo&, const TCPConnectionInfo&);
bool operator<(const TCPConnectionInfo&, const TCPConnectionInfo&);

ICE_API ::Ice::LocalObject* upCast(::Ice::TCPConnectionInfo*);

class UDPConnectionInfo;
bool operator==(const UDPConnectionInfo&, const UDPConnectionInfo&);
bool operator<(const UDPConnectionInfo&, const UDPConnectionInfo&);

ICE_API ::Ice::LocalObject* upCast(::Ice::UDPConnectionInfo*);

}

namespace IceInternal
{

}

namespace Ice
{

typedef ::IceInternal::Handle< ::Ice::ConnectionInfo> ConnectionInfoPtr;

typedef ::IceInternal::Handle< ::Ice::Connection> ConnectionPtr;

typedef ::IceInternal::Handle< ::Ice::IPConnectionInfo> IPConnectionInfoPtr;

typedef ::IceInternal::Handle< ::Ice::TCPConnectionInfo> TCPConnectionInfoPtr;

typedef ::IceInternal::Handle< ::Ice::UDPConnectionInfo> UDPConnectionInfoPtr;

}

namespace Ice
{

class Callback_Connection_flushBatchRequests_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_Connection_flushBatchRequests_Base> Callback_Connection_flushBatchRequestsPtr;

}

namespace Ice
{

class ICE_API ConnectionInfo : virtual public ::Ice::LocalObject
{
public:

    typedef ConnectionInfoPtr PointerType;
    
    ConnectionInfo() {}
    ConnectionInfo(bool, const ::std::string&);

protected:

    virtual ~ConnectionInfo() {}

    friend class ConnectionInfo__staticInit;

public:

    bool incoming;

    ::std::string adapterName;
};

class ConnectionInfo__staticInit
{
public:

    ::Ice::ConnectionInfo _init;
};

static ConnectionInfo__staticInit _ConnectionInfo_init;

inline bool operator==(const ConnectionInfo& l, const ConnectionInfo& r)
{
    return static_cast<const ::Ice::LocalObject&>(l) == static_cast<const ::Ice::LocalObject&>(r);
}

inline bool operator<(const ConnectionInfo& l, const ConnectionInfo& r)
{
    return static_cast<const ::Ice::LocalObject&>(l) < static_cast<const ::Ice::LocalObject&>(r);
}

class ICE_API Connection : virtual public ::Ice::LocalObject
{
public:

    typedef ConnectionPtr PointerType;
    

    virtual void close(bool) = 0;

    virtual ::Ice::ObjectPrx createProxy(const ::Ice::Identity&) const = 0;

    virtual void setAdapter(const ::Ice::ObjectAdapterPtr&) = 0;

    virtual ::Ice::ObjectAdapterPtr getAdapter() const = 0;

    virtual ::Ice::EndpointPtr getEndpoint() const = 0;

    virtual void flushBatchRequests() = 0;

    virtual ::Ice::AsyncResultPtr begin_flushBatchRequests() = 0;

    virtual ::Ice::AsyncResultPtr begin_flushBatchRequests(const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0) = 0;

    virtual ::Ice::AsyncResultPtr begin_flushBatchRequests(const ::Ice::Callback_Connection_flushBatchRequestsPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0) = 0;

    virtual void end_flushBatchRequests(const ::Ice::AsyncResultPtr&) = 0;

    virtual ::std::string type() const = 0;

    virtual ::Ice::Int timeout() const = 0;

    virtual ::std::string toString() const = 0;

    virtual ::Ice::ConnectionInfoPtr getInfo() const = 0;
};

inline bool operator==(const Connection& l, const Connection& r)
{
    return static_cast<const ::Ice::LocalObject&>(l) == static_cast<const ::Ice::LocalObject&>(r);
}

inline bool operator<(const Connection& l, const Connection& r)
{
    return static_cast<const ::Ice::LocalObject&>(l) < static_cast<const ::Ice::LocalObject&>(r);
}

class ICE_API IPConnectionInfo : public ::Ice::ConnectionInfo
{
public:

    typedef IPConnectionInfoPtr PointerType;
    
    IPConnectionInfo() {}
    IPConnectionInfo(bool, const ::std::string&, const ::std::string&, ::Ice::Int, const ::std::string&, ::Ice::Int);

protected:

    virtual ~IPConnectionInfo() {}

public:

    ::std::string localAddress;

    ::Ice::Int localPort;

    ::std::string remoteAddress;

    ::Ice::Int remotePort;
};

inline bool operator==(const IPConnectionInfo& l, const IPConnectionInfo& r)
{
    return static_cast<const ::Ice::LocalObject&>(l) == static_cast<const ::Ice::LocalObject&>(r);
}

inline bool operator<(const IPConnectionInfo& l, const IPConnectionInfo& r)
{
    return static_cast<const ::Ice::LocalObject&>(l) < static_cast<const ::Ice::LocalObject&>(r);
}

class ICE_API TCPConnectionInfo : public ::Ice::IPConnectionInfo
{
public:

    typedef TCPConnectionInfoPtr PointerType;
    
    TCPConnectionInfo() {}
    TCPConnectionInfo(bool, const ::std::string&, const ::std::string&, ::Ice::Int, const ::std::string&, ::Ice::Int);

protected:

    virtual ~TCPConnectionInfo() {}
};

inline bool operator==(const TCPConnectionInfo& l, const TCPConnectionInfo& r)
{
    return static_cast<const ::Ice::LocalObject&>(l) == static_cast<const ::Ice::LocalObject&>(r);
}

inline bool operator<(const TCPConnectionInfo& l, const TCPConnectionInfo& r)
{
    return static_cast<const ::Ice::LocalObject&>(l) < static_cast<const ::Ice::LocalObject&>(r);
}

class ICE_API UDPConnectionInfo : public ::Ice::IPConnectionInfo
{
public:

    typedef UDPConnectionInfoPtr PointerType;
    
    UDPConnectionInfo() {}
    UDPConnectionInfo(bool, const ::std::string&, const ::std::string&, ::Ice::Int, const ::std::string&, ::Ice::Int, const ::std::string&, ::Ice::Int);

protected:

    virtual ~UDPConnectionInfo() {}

public:

    ::std::string mcastAddress;

    ::Ice::Int mcastPort;
};

inline bool operator==(const UDPConnectionInfo& l, const UDPConnectionInfo& r)
{
    return static_cast<const ::Ice::LocalObject&>(l) == static_cast<const ::Ice::LocalObject&>(r);
}

inline bool operator<(const UDPConnectionInfo& l, const UDPConnectionInfo& r)
{
    return static_cast<const ::Ice::LocalObject&>(l) < static_cast<const ::Ice::LocalObject&>(r);
}

}

#endif
