// **********************************************************************
//
// Copyright (c) 2003-2017 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.7.0
//
// <auto-generated>
//
// Generated from file `IceDiscovery.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//

#ifndef __IceDiscovery_IceDiscovery_h__
#define __IceDiscovery_IceDiscovery_h__

#include <IceUtil/PushDisableWarnings.h>
#include <Ice/ProxyF.h>
#include <Ice/ObjectF.h>
#include <Ice/ValueF.h>
#include <Ice/Exception.h>
#include <Ice/LocalObject.h>
#include <Ice/StreamHelpers.h>
#include <Ice/Comparable.h>
#include <Ice/Proxy.h>
#include <Ice/Object.h>
#include <Ice/GCObject.h>
#include <Ice/Value.h>
#include <Ice/Incoming.h>
#include <Ice/FactoryTableInit.h>
#include <IceUtil/ScopedArray.h>
#include <Ice/Optional.h>
#include <Ice/Identity.h>
#include <IceUtil/UndefSysMacros.h>

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

#ifdef ICE_CPP11_MAPPING // C++11 mapping

namespace IceDiscovery
{

class LookupReply;
class LookupReplyPrx;
class Lookup;
class LookupPrx;

}

namespace IceDiscovery
{

class LookupReply : public virtual ::Ice::Object
{
public:

    using ProxyType = LookupReplyPrx;

    virtual bool ice_isA(::std::string, const ::Ice::Current&) const override;
    virtual ::std::vector<::std::string> ice_ids(const ::Ice::Current&) const override;
    virtual ::std::string ice_id(const ::Ice::Current&) const override;

    static const ::std::string& ice_staticId();

    virtual void foundObjectById(::Ice::Identity, ::std::shared_ptr<::Ice::ObjectPrx>, const ::Ice::Current&) = 0;
    bool _iceD_foundObjectById(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual void foundAdapterById(::std::string, ::std::shared_ptr<::Ice::ObjectPrx>, bool, const ::Ice::Current&) = 0;
    bool _iceD_foundAdapterById(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&) override;
};

class Lookup : public virtual ::Ice::Object
{
public:

    using ProxyType = LookupPrx;

    virtual bool ice_isA(::std::string, const ::Ice::Current&) const override;
    virtual ::std::vector<::std::string> ice_ids(const ::Ice::Current&) const override;
    virtual ::std::string ice_id(const ::Ice::Current&) const override;

    static const ::std::string& ice_staticId();

    virtual void findObjectById(::std::string, ::Ice::Identity, ::std::shared_ptr<::IceDiscovery::LookupReplyPrx>, const ::Ice::Current&) = 0;
    bool _iceD_findObjectById(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual void findAdapterById(::std::string, ::std::string, ::std::shared_ptr<::IceDiscovery::LookupReplyPrx>, const ::Ice::Current&) = 0;
    bool _iceD_findAdapterById(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&) override;
};

}

namespace IceDiscovery
{

class LookupReplyPrx : public virtual ::Ice::Proxy<LookupReplyPrx, ::Ice::ObjectPrx>
{
public:

    void foundObjectById(const ::Ice::Identity& iceP_id, const ::std::shared_ptr<::Ice::ObjectPrx>& iceP_prx, const ::Ice::Context& context = Ice::noExplicitContext)
    {
        _makePromiseOutgoing<void>(true, this, &IceDiscovery::LookupReplyPrx::_iceI_foundObjectById, iceP_id, iceP_prx, context).get();
    }

    template<template<typename> class P = ::std::promise>
    auto foundObjectByIdAsync(const ::Ice::Identity& iceP_id, const ::std::shared_ptr<::Ice::ObjectPrx>& iceP_prx, const ::Ice::Context& context = Ice::noExplicitContext)
        -> decltype(::std::declval<P<void>>().get_future())
    {
        return _makePromiseOutgoing<void, P>(false, this, &IceDiscovery::LookupReplyPrx::_iceI_foundObjectById, iceP_id, iceP_prx, context);
    }

    ::std::function<void()>
    foundObjectByIdAsync(const ::Ice::Identity& iceP_id, const ::std::shared_ptr<::Ice::ObjectPrx>& iceP_prx,
                         ::std::function<void()> response,
                         ::std::function<void(::std::exception_ptr)> ex = nullptr,
                         ::std::function<void(bool)> sent = nullptr,
                         const ::Ice::Context& context = Ice::noExplicitContext)
    {
        return _makeLamdaOutgoing<void>(response, ex, sent, this, &IceDiscovery::LookupReplyPrx::_iceI_foundObjectById, iceP_id, iceP_prx, context);
    }

    void _iceI_foundObjectById(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, const ::Ice::Identity&, const ::std::shared_ptr<::Ice::ObjectPrx>&, const ::Ice::Context&);

    void foundAdapterById(const ::std::string& iceP_id, const ::std::shared_ptr<::Ice::ObjectPrx>& iceP_prx, bool iceP_isReplicaGroup, const ::Ice::Context& context = Ice::noExplicitContext)
    {
        _makePromiseOutgoing<void>(true, this, &IceDiscovery::LookupReplyPrx::_iceI_foundAdapterById, iceP_id, iceP_prx, iceP_isReplicaGroup, context).get();
    }

    template<template<typename> class P = ::std::promise>
    auto foundAdapterByIdAsync(const ::std::string& iceP_id, const ::std::shared_ptr<::Ice::ObjectPrx>& iceP_prx, bool iceP_isReplicaGroup, const ::Ice::Context& context = Ice::noExplicitContext)
        -> decltype(::std::declval<P<void>>().get_future())
    {
        return _makePromiseOutgoing<void, P>(false, this, &IceDiscovery::LookupReplyPrx::_iceI_foundAdapterById, iceP_id, iceP_prx, iceP_isReplicaGroup, context);
    }

    ::std::function<void()>
    foundAdapterByIdAsync(const ::std::string& iceP_id, const ::std::shared_ptr<::Ice::ObjectPrx>& iceP_prx, bool iceP_isReplicaGroup,
                          ::std::function<void()> response,
                          ::std::function<void(::std::exception_ptr)> ex = nullptr,
                          ::std::function<void(bool)> sent = nullptr,
                          const ::Ice::Context& context = Ice::noExplicitContext)
    {
        return _makeLamdaOutgoing<void>(response, ex, sent, this, &IceDiscovery::LookupReplyPrx::_iceI_foundAdapterById, iceP_id, iceP_prx, iceP_isReplicaGroup, context);
    }

    void _iceI_foundAdapterById(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, const ::std::string&, const ::std::shared_ptr<::Ice::ObjectPrx>&, bool, const ::Ice::Context&);

    static const ::std::string& ice_staticId();

protected:

    LookupReplyPrx() = default;
    friend ::std::shared_ptr<LookupReplyPrx> IceInternal::createProxy<LookupReplyPrx>();

    virtual ::std::shared_ptr<::Ice::ObjectPrx> _newInstance() const override;
};

class LookupPrx : public virtual ::Ice::Proxy<LookupPrx, ::Ice::ObjectPrx>
{
public:

    void findObjectById(const ::std::string& iceP_domainId, const ::Ice::Identity& iceP_id, const ::std::shared_ptr<::IceDiscovery::LookupReplyPrx>& iceP_reply, const ::Ice::Context& context = Ice::noExplicitContext)
    {
        _makePromiseOutgoing<void>(true, this, &IceDiscovery::LookupPrx::_iceI_findObjectById, iceP_domainId, iceP_id, iceP_reply, context).get();
    }

    template<template<typename> class P = ::std::promise>
    auto findObjectByIdAsync(const ::std::string& iceP_domainId, const ::Ice::Identity& iceP_id, const ::std::shared_ptr<::IceDiscovery::LookupReplyPrx>& iceP_reply, const ::Ice::Context& context = Ice::noExplicitContext)
        -> decltype(::std::declval<P<void>>().get_future())
    {
        return _makePromiseOutgoing<void, P>(false, this, &IceDiscovery::LookupPrx::_iceI_findObjectById, iceP_domainId, iceP_id, iceP_reply, context);
    }

    ::std::function<void()>
    findObjectByIdAsync(const ::std::string& iceP_domainId, const ::Ice::Identity& iceP_id, const ::std::shared_ptr<::IceDiscovery::LookupReplyPrx>& iceP_reply,
                        ::std::function<void()> response,
                        ::std::function<void(::std::exception_ptr)> ex = nullptr,
                        ::std::function<void(bool)> sent = nullptr,
                        const ::Ice::Context& context = Ice::noExplicitContext)
    {
        return _makeLamdaOutgoing<void>(response, ex, sent, this, &IceDiscovery::LookupPrx::_iceI_findObjectById, iceP_domainId, iceP_id, iceP_reply, context);
    }

    void _iceI_findObjectById(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, const ::std::string&, const ::Ice::Identity&, const ::std::shared_ptr<::IceDiscovery::LookupReplyPrx>&, const ::Ice::Context&);

    void findAdapterById(const ::std::string& iceP_domainId, const ::std::string& iceP_id, const ::std::shared_ptr<::IceDiscovery::LookupReplyPrx>& iceP_reply, const ::Ice::Context& context = Ice::noExplicitContext)
    {
        _makePromiseOutgoing<void>(true, this, &IceDiscovery::LookupPrx::_iceI_findAdapterById, iceP_domainId, iceP_id, iceP_reply, context).get();
    }

    template<template<typename> class P = ::std::promise>
    auto findAdapterByIdAsync(const ::std::string& iceP_domainId, const ::std::string& iceP_id, const ::std::shared_ptr<::IceDiscovery::LookupReplyPrx>& iceP_reply, const ::Ice::Context& context = Ice::noExplicitContext)
        -> decltype(::std::declval<P<void>>().get_future())
    {
        return _makePromiseOutgoing<void, P>(false, this, &IceDiscovery::LookupPrx::_iceI_findAdapterById, iceP_domainId, iceP_id, iceP_reply, context);
    }

    ::std::function<void()>
    findAdapterByIdAsync(const ::std::string& iceP_domainId, const ::std::string& iceP_id, const ::std::shared_ptr<::IceDiscovery::LookupReplyPrx>& iceP_reply,
                         ::std::function<void()> response,
                         ::std::function<void(::std::exception_ptr)> ex = nullptr,
                         ::std::function<void(bool)> sent = nullptr,
                         const ::Ice::Context& context = Ice::noExplicitContext)
    {
        return _makeLamdaOutgoing<void>(response, ex, sent, this, &IceDiscovery::LookupPrx::_iceI_findAdapterById, iceP_domainId, iceP_id, iceP_reply, context);
    }

    void _iceI_findAdapterById(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, const ::std::string&, const ::std::string&, const ::std::shared_ptr<::IceDiscovery::LookupReplyPrx>&, const ::Ice::Context&);

    static const ::std::string& ice_staticId();

protected:

    LookupPrx() = default;
    friend ::std::shared_ptr<LookupPrx> IceInternal::createProxy<LookupPrx>();

    virtual ::std::shared_ptr<::Ice::ObjectPrx> _newInstance() const override;
};

}

namespace Ice
{

}

namespace IceDiscovery
{

using LookupReplyPtr = ::std::shared_ptr<LookupReply>;
using LookupReplyPrxPtr = ::std::shared_ptr<LookupReplyPrx>;

using LookupPtr = ::std::shared_ptr<Lookup>;
using LookupPrxPtr = ::std::shared_ptr<LookupPrx>;

}

#else // C++98 mapping

namespace IceProxy
{

namespace IceDiscovery
{

class LookupReply;
void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< ::IceProxy::IceDiscovery::LookupReply>&);
::IceProxy::Ice::Object* upCast(::IceProxy::IceDiscovery::LookupReply*);

class Lookup;
void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< ::IceProxy::IceDiscovery::Lookup>&);
::IceProxy::Ice::Object* upCast(::IceProxy::IceDiscovery::Lookup*);

}

}

namespace IceDiscovery
{

class LookupReply;
::Ice::Object* upCast(::IceDiscovery::LookupReply*);
typedef ::IceInternal::Handle< ::IceDiscovery::LookupReply> LookupReplyPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::IceDiscovery::LookupReply> LookupReplyPrx;
typedef LookupReplyPrx LookupReplyPrxPtr;
void _icePatchObjectPtr(LookupReplyPtr&, const ::Ice::ObjectPtr&);

class Lookup;
::Ice::Object* upCast(::IceDiscovery::Lookup*);
typedef ::IceInternal::Handle< ::IceDiscovery::Lookup> LookupPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::IceDiscovery::Lookup> LookupPrx;
typedef LookupPrx LookupPrxPtr;
void _icePatchObjectPtr(LookupPtr&, const ::Ice::ObjectPtr&);

}

namespace IceDiscovery
{

class Callback_LookupReply_foundObjectById_Base : public virtual ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_LookupReply_foundObjectById_Base> Callback_LookupReply_foundObjectByIdPtr;

class Callback_LookupReply_foundAdapterById_Base : public virtual ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_LookupReply_foundAdapterById_Base> Callback_LookupReply_foundAdapterByIdPtr;

class Callback_Lookup_findObjectById_Base : public virtual ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_Lookup_findObjectById_Base> Callback_Lookup_findObjectByIdPtr;

class Callback_Lookup_findAdapterById_Base : public virtual ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_Lookup_findAdapterById_Base> Callback_Lookup_findAdapterByIdPtr;

}

namespace IceProxy
{

namespace IceDiscovery
{

class LookupReply : public virtual ::Ice::Proxy<LookupReply, ::IceProxy::Ice::Object>
{
public:

    void foundObjectById(const ::Ice::Identity& iceP_id, const ::Ice::ObjectPrx& iceP_prx, const ::Ice::Context& context = ::Ice::noExplicitContext)
    {
        end_foundObjectById(_iceI_begin_foundObjectById(iceP_id, iceP_prx, context, ::IceInternal::dummyCallback, 0, true));
    }

    ::Ice::AsyncResultPtr begin_foundObjectById(const ::Ice::Identity& iceP_id, const ::Ice::ObjectPrx& iceP_prx, const ::Ice::Context& context = ::Ice::noExplicitContext)
    {
        return _iceI_begin_foundObjectById(iceP_id, iceP_prx, context, ::IceInternal::dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_foundObjectById(const ::Ice::Identity& iceP_id, const ::Ice::ObjectPrx& iceP_prx, const ::Ice::CallbackPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_foundObjectById(iceP_id, iceP_prx, ::Ice::noExplicitContext, del, cookie);
    }

    ::Ice::AsyncResultPtr begin_foundObjectById(const ::Ice::Identity& iceP_id, const ::Ice::ObjectPrx& iceP_prx, const ::Ice::Context& context, const ::Ice::CallbackPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_foundObjectById(iceP_id, iceP_prx, context, del, cookie);
    }

    ::Ice::AsyncResultPtr begin_foundObjectById(const ::Ice::Identity& iceP_id, const ::Ice::ObjectPrx& iceP_prx, const ::IceDiscovery::Callback_LookupReply_foundObjectByIdPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_foundObjectById(iceP_id, iceP_prx, ::Ice::noExplicitContext, del, cookie);
    }

    ::Ice::AsyncResultPtr begin_foundObjectById(const ::Ice::Identity& iceP_id, const ::Ice::ObjectPrx& iceP_prx, const ::Ice::Context& context, const ::IceDiscovery::Callback_LookupReply_foundObjectByIdPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_foundObjectById(iceP_id, iceP_prx, context, del, cookie);
    }

    void end_foundObjectById(const ::Ice::AsyncResultPtr&);

private:

    ::Ice::AsyncResultPtr _iceI_begin_foundObjectById(const ::Ice::Identity&, const ::Ice::ObjectPrx&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);

public:

    void foundAdapterById(const ::std::string& iceP_id, const ::Ice::ObjectPrx& iceP_prx, bool iceP_isReplicaGroup, const ::Ice::Context& context = ::Ice::noExplicitContext)
    {
        end_foundAdapterById(_iceI_begin_foundAdapterById(iceP_id, iceP_prx, iceP_isReplicaGroup, context, ::IceInternal::dummyCallback, 0, true));
    }

    ::Ice::AsyncResultPtr begin_foundAdapterById(const ::std::string& iceP_id, const ::Ice::ObjectPrx& iceP_prx, bool iceP_isReplicaGroup, const ::Ice::Context& context = ::Ice::noExplicitContext)
    {
        return _iceI_begin_foundAdapterById(iceP_id, iceP_prx, iceP_isReplicaGroup, context, ::IceInternal::dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_foundAdapterById(const ::std::string& iceP_id, const ::Ice::ObjectPrx& iceP_prx, bool iceP_isReplicaGroup, const ::Ice::CallbackPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_foundAdapterById(iceP_id, iceP_prx, iceP_isReplicaGroup, ::Ice::noExplicitContext, del, cookie);
    }

    ::Ice::AsyncResultPtr begin_foundAdapterById(const ::std::string& iceP_id, const ::Ice::ObjectPrx& iceP_prx, bool iceP_isReplicaGroup, const ::Ice::Context& context, const ::Ice::CallbackPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_foundAdapterById(iceP_id, iceP_prx, iceP_isReplicaGroup, context, del, cookie);
    }

    ::Ice::AsyncResultPtr begin_foundAdapterById(const ::std::string& iceP_id, const ::Ice::ObjectPrx& iceP_prx, bool iceP_isReplicaGroup, const ::IceDiscovery::Callback_LookupReply_foundAdapterByIdPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_foundAdapterById(iceP_id, iceP_prx, iceP_isReplicaGroup, ::Ice::noExplicitContext, del, cookie);
    }

    ::Ice::AsyncResultPtr begin_foundAdapterById(const ::std::string& iceP_id, const ::Ice::ObjectPrx& iceP_prx, bool iceP_isReplicaGroup, const ::Ice::Context& context, const ::IceDiscovery::Callback_LookupReply_foundAdapterByIdPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_foundAdapterById(iceP_id, iceP_prx, iceP_isReplicaGroup, context, del, cookie);
    }

    void end_foundAdapterById(const ::Ice::AsyncResultPtr&);

private:

    ::Ice::AsyncResultPtr _iceI_begin_foundAdapterById(const ::std::string&, const ::Ice::ObjectPrx&, bool, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);

public:

    static const ::std::string& ice_staticId();

protected:

    virtual ::IceProxy::Ice::Object* _newInstance() const;
};

class Lookup : public virtual ::Ice::Proxy<Lookup, ::IceProxy::Ice::Object>
{
public:

    void findObjectById(const ::std::string& iceP_domainId, const ::Ice::Identity& iceP_id, const ::IceDiscovery::LookupReplyPrx& iceP_reply, const ::Ice::Context& context = ::Ice::noExplicitContext)
    {
        end_findObjectById(_iceI_begin_findObjectById(iceP_domainId, iceP_id, iceP_reply, context, ::IceInternal::dummyCallback, 0, true));
    }

    ::Ice::AsyncResultPtr begin_findObjectById(const ::std::string& iceP_domainId, const ::Ice::Identity& iceP_id, const ::IceDiscovery::LookupReplyPrx& iceP_reply, const ::Ice::Context& context = ::Ice::noExplicitContext)
    {
        return _iceI_begin_findObjectById(iceP_domainId, iceP_id, iceP_reply, context, ::IceInternal::dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_findObjectById(const ::std::string& iceP_domainId, const ::Ice::Identity& iceP_id, const ::IceDiscovery::LookupReplyPrx& iceP_reply, const ::Ice::CallbackPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_findObjectById(iceP_domainId, iceP_id, iceP_reply, ::Ice::noExplicitContext, del, cookie);
    }

    ::Ice::AsyncResultPtr begin_findObjectById(const ::std::string& iceP_domainId, const ::Ice::Identity& iceP_id, const ::IceDiscovery::LookupReplyPrx& iceP_reply, const ::Ice::Context& context, const ::Ice::CallbackPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_findObjectById(iceP_domainId, iceP_id, iceP_reply, context, del, cookie);
    }

    ::Ice::AsyncResultPtr begin_findObjectById(const ::std::string& iceP_domainId, const ::Ice::Identity& iceP_id, const ::IceDiscovery::LookupReplyPrx& iceP_reply, const ::IceDiscovery::Callback_Lookup_findObjectByIdPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_findObjectById(iceP_domainId, iceP_id, iceP_reply, ::Ice::noExplicitContext, del, cookie);
    }

    ::Ice::AsyncResultPtr begin_findObjectById(const ::std::string& iceP_domainId, const ::Ice::Identity& iceP_id, const ::IceDiscovery::LookupReplyPrx& iceP_reply, const ::Ice::Context& context, const ::IceDiscovery::Callback_Lookup_findObjectByIdPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_findObjectById(iceP_domainId, iceP_id, iceP_reply, context, del, cookie);
    }

    void end_findObjectById(const ::Ice::AsyncResultPtr&);

private:

    ::Ice::AsyncResultPtr _iceI_begin_findObjectById(const ::std::string&, const ::Ice::Identity&, const ::IceDiscovery::LookupReplyPrx&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);

public:

    void findAdapterById(const ::std::string& iceP_domainId, const ::std::string& iceP_id, const ::IceDiscovery::LookupReplyPrx& iceP_reply, const ::Ice::Context& context = ::Ice::noExplicitContext)
    {
        end_findAdapterById(_iceI_begin_findAdapterById(iceP_domainId, iceP_id, iceP_reply, context, ::IceInternal::dummyCallback, 0, true));
    }

    ::Ice::AsyncResultPtr begin_findAdapterById(const ::std::string& iceP_domainId, const ::std::string& iceP_id, const ::IceDiscovery::LookupReplyPrx& iceP_reply, const ::Ice::Context& context = ::Ice::noExplicitContext)
    {
        return _iceI_begin_findAdapterById(iceP_domainId, iceP_id, iceP_reply, context, ::IceInternal::dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_findAdapterById(const ::std::string& iceP_domainId, const ::std::string& iceP_id, const ::IceDiscovery::LookupReplyPrx& iceP_reply, const ::Ice::CallbackPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_findAdapterById(iceP_domainId, iceP_id, iceP_reply, ::Ice::noExplicitContext, del, cookie);
    }

    ::Ice::AsyncResultPtr begin_findAdapterById(const ::std::string& iceP_domainId, const ::std::string& iceP_id, const ::IceDiscovery::LookupReplyPrx& iceP_reply, const ::Ice::Context& context, const ::Ice::CallbackPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_findAdapterById(iceP_domainId, iceP_id, iceP_reply, context, del, cookie);
    }

    ::Ice::AsyncResultPtr begin_findAdapterById(const ::std::string& iceP_domainId, const ::std::string& iceP_id, const ::IceDiscovery::LookupReplyPrx& iceP_reply, const ::IceDiscovery::Callback_Lookup_findAdapterByIdPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_findAdapterById(iceP_domainId, iceP_id, iceP_reply, ::Ice::noExplicitContext, del, cookie);
    }

    ::Ice::AsyncResultPtr begin_findAdapterById(const ::std::string& iceP_domainId, const ::std::string& iceP_id, const ::IceDiscovery::LookupReplyPrx& iceP_reply, const ::Ice::Context& context, const ::IceDiscovery::Callback_Lookup_findAdapterByIdPtr& del, const ::Ice::LocalObjectPtr& cookie = 0)
    {
        return _iceI_begin_findAdapterById(iceP_domainId, iceP_id, iceP_reply, context, del, cookie);
    }

    void end_findAdapterById(const ::Ice::AsyncResultPtr&);

private:

    ::Ice::AsyncResultPtr _iceI_begin_findAdapterById(const ::std::string&, const ::std::string&, const ::IceDiscovery::LookupReplyPrx&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);

public:

    static const ::std::string& ice_staticId();

protected:

    virtual ::IceProxy::Ice::Object* _newInstance() const;
};

}

}

namespace IceDiscovery
{

class LookupReply : public virtual ::Ice::Object
{
public:

    typedef LookupReplyPrx ProxyType;
    typedef LookupReplyPtr PointerType;

    virtual ~LookupReply();

    virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::emptyCurrent) const;
    virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::emptyCurrent) const;
    virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::emptyCurrent) const;

    static const ::std::string& ice_staticId();

    virtual void foundObjectById(const ::Ice::Identity&, const ::Ice::ObjectPrx&, const ::Ice::Current& = ::Ice::emptyCurrent) = 0;
    bool _iceD_foundObjectById(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual void foundAdapterById(const ::std::string&, const ::Ice::ObjectPrx&, bool, const ::Ice::Current& = ::Ice::emptyCurrent) = 0;
    bool _iceD_foundAdapterById(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&);

protected:

    virtual void _iceWriteImpl(::Ice::OutputStream*) const;
    virtual void _iceReadImpl(::Ice::InputStream*);
};

inline bool operator==(const LookupReply& lhs, const LookupReply& rhs)
{
    return static_cast<const ::Ice::Object&>(lhs) == static_cast<const ::Ice::Object&>(rhs);
}

inline bool operator<(const LookupReply& lhs, const LookupReply& rhs)
{
    return static_cast<const ::Ice::Object&>(lhs) < static_cast<const ::Ice::Object&>(rhs);
}

class Lookup : public virtual ::Ice::Object
{
public:

    typedef LookupPrx ProxyType;
    typedef LookupPtr PointerType;

    virtual ~Lookup();

    virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::emptyCurrent) const;
    virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& = ::Ice::emptyCurrent) const;
    virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::emptyCurrent) const;

    static const ::std::string& ice_staticId();

    virtual void findObjectById(const ::std::string&, const ::Ice::Identity&, const ::IceDiscovery::LookupReplyPrx&, const ::Ice::Current& = ::Ice::emptyCurrent) = 0;
    bool _iceD_findObjectById(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual void findAdapterById(const ::std::string&, const ::std::string&, const ::IceDiscovery::LookupReplyPrx&, const ::Ice::Current& = ::Ice::emptyCurrent) = 0;
    bool _iceD_findAdapterById(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&);

protected:

    virtual void _iceWriteImpl(::Ice::OutputStream*) const;
    virtual void _iceReadImpl(::Ice::InputStream*);
};

inline bool operator==(const Lookup& lhs, const Lookup& rhs)
{
    return static_cast<const ::Ice::Object&>(lhs) == static_cast<const ::Ice::Object&>(rhs);
}

inline bool operator<(const Lookup& lhs, const Lookup& rhs)
{
    return static_cast<const ::Ice::Object&>(lhs) < static_cast<const ::Ice::Object&>(rhs);
}

}

namespace Ice
{

}

namespace IceDiscovery
{

template<class T>
class CallbackNC_LookupReply_foundObjectById : public Callback_LookupReply_foundObjectById_Base, public ::IceInternal::OnewayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception&);
    typedef void (T::*Sent)(bool);
    typedef void (T::*Response)();

    CallbackNC_LookupReply_foundObjectById(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
    {
    }
};

template<class T> Callback_LookupReply_foundObjectByIdPtr
newCallback_LookupReply_foundObjectById(const IceUtil::Handle<T>& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_LookupReply_foundObjectById<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_LookupReply_foundObjectByIdPtr
newCallback_LookupReply_foundObjectById(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_LookupReply_foundObjectById<T>(instance, 0, excb, sentcb);
}

template<class T> Callback_LookupReply_foundObjectByIdPtr
newCallback_LookupReply_foundObjectById(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_LookupReply_foundObjectById<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_LookupReply_foundObjectByIdPtr
newCallback_LookupReply_foundObjectById(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_LookupReply_foundObjectById<T>(instance, 0, excb, sentcb);
}

template<class T, typename CT>
class Callback_LookupReply_foundObjectById : public Callback_LookupReply_foundObjectById_Base, public ::IceInternal::OnewayCallback<T, CT>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
    typedef void (T::*Sent)(bool , const CT&);
    typedef void (T::*Response)(const CT&);

    Callback_LookupReply_foundObjectById(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
    {
    }
};

template<class T, typename CT> Callback_LookupReply_foundObjectByIdPtr
newCallback_LookupReply_foundObjectById(const IceUtil::Handle<T>& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_LookupReply_foundObjectById<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_LookupReply_foundObjectByIdPtr
newCallback_LookupReply_foundObjectById(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_LookupReply_foundObjectById<T, CT>(instance, 0, excb, sentcb);
}

template<class T, typename CT> Callback_LookupReply_foundObjectByIdPtr
newCallback_LookupReply_foundObjectById(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_LookupReply_foundObjectById<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_LookupReply_foundObjectByIdPtr
newCallback_LookupReply_foundObjectById(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_LookupReply_foundObjectById<T, CT>(instance, 0, excb, sentcb);
}

template<class T>
class CallbackNC_LookupReply_foundAdapterById : public Callback_LookupReply_foundAdapterById_Base, public ::IceInternal::OnewayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception&);
    typedef void (T::*Sent)(bool);
    typedef void (T::*Response)();

    CallbackNC_LookupReply_foundAdapterById(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
    {
    }
};

template<class T> Callback_LookupReply_foundAdapterByIdPtr
newCallback_LookupReply_foundAdapterById(const IceUtil::Handle<T>& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_LookupReply_foundAdapterById<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_LookupReply_foundAdapterByIdPtr
newCallback_LookupReply_foundAdapterById(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_LookupReply_foundAdapterById<T>(instance, 0, excb, sentcb);
}

template<class T> Callback_LookupReply_foundAdapterByIdPtr
newCallback_LookupReply_foundAdapterById(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_LookupReply_foundAdapterById<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_LookupReply_foundAdapterByIdPtr
newCallback_LookupReply_foundAdapterById(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_LookupReply_foundAdapterById<T>(instance, 0, excb, sentcb);
}

template<class T, typename CT>
class Callback_LookupReply_foundAdapterById : public Callback_LookupReply_foundAdapterById_Base, public ::IceInternal::OnewayCallback<T, CT>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
    typedef void (T::*Sent)(bool , const CT&);
    typedef void (T::*Response)(const CT&);

    Callback_LookupReply_foundAdapterById(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
    {
    }
};

template<class T, typename CT> Callback_LookupReply_foundAdapterByIdPtr
newCallback_LookupReply_foundAdapterById(const IceUtil::Handle<T>& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_LookupReply_foundAdapterById<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_LookupReply_foundAdapterByIdPtr
newCallback_LookupReply_foundAdapterById(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_LookupReply_foundAdapterById<T, CT>(instance, 0, excb, sentcb);
}

template<class T, typename CT> Callback_LookupReply_foundAdapterByIdPtr
newCallback_LookupReply_foundAdapterById(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_LookupReply_foundAdapterById<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_LookupReply_foundAdapterByIdPtr
newCallback_LookupReply_foundAdapterById(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_LookupReply_foundAdapterById<T, CT>(instance, 0, excb, sentcb);
}

template<class T>
class CallbackNC_Lookup_findObjectById : public Callback_Lookup_findObjectById_Base, public ::IceInternal::OnewayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception&);
    typedef void (T::*Sent)(bool);
    typedef void (T::*Response)();

    CallbackNC_Lookup_findObjectById(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
    {
    }
};

template<class T> Callback_Lookup_findObjectByIdPtr
newCallback_Lookup_findObjectById(const IceUtil::Handle<T>& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_Lookup_findObjectById<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_Lookup_findObjectByIdPtr
newCallback_Lookup_findObjectById(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_Lookup_findObjectById<T>(instance, 0, excb, sentcb);
}

template<class T> Callback_Lookup_findObjectByIdPtr
newCallback_Lookup_findObjectById(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_Lookup_findObjectById<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_Lookup_findObjectByIdPtr
newCallback_Lookup_findObjectById(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_Lookup_findObjectById<T>(instance, 0, excb, sentcb);
}

template<class T, typename CT>
class Callback_Lookup_findObjectById : public Callback_Lookup_findObjectById_Base, public ::IceInternal::OnewayCallback<T, CT>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
    typedef void (T::*Sent)(bool , const CT&);
    typedef void (T::*Response)(const CT&);

    Callback_Lookup_findObjectById(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
    {
    }
};

template<class T, typename CT> Callback_Lookup_findObjectByIdPtr
newCallback_Lookup_findObjectById(const IceUtil::Handle<T>& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_Lookup_findObjectById<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_Lookup_findObjectByIdPtr
newCallback_Lookup_findObjectById(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_Lookup_findObjectById<T, CT>(instance, 0, excb, sentcb);
}

template<class T, typename CT> Callback_Lookup_findObjectByIdPtr
newCallback_Lookup_findObjectById(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_Lookup_findObjectById<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_Lookup_findObjectByIdPtr
newCallback_Lookup_findObjectById(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_Lookup_findObjectById<T, CT>(instance, 0, excb, sentcb);
}

template<class T>
class CallbackNC_Lookup_findAdapterById : public Callback_Lookup_findAdapterById_Base, public ::IceInternal::OnewayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception&);
    typedef void (T::*Sent)(bool);
    typedef void (T::*Response)();

    CallbackNC_Lookup_findAdapterById(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
    {
    }
};

template<class T> Callback_Lookup_findAdapterByIdPtr
newCallback_Lookup_findAdapterById(const IceUtil::Handle<T>& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_Lookup_findAdapterById<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_Lookup_findAdapterByIdPtr
newCallback_Lookup_findAdapterById(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_Lookup_findAdapterById<T>(instance, 0, excb, sentcb);
}

template<class T> Callback_Lookup_findAdapterByIdPtr
newCallback_Lookup_findAdapterById(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_Lookup_findAdapterById<T>(instance, cb, excb, sentcb);
}

template<class T> Callback_Lookup_findAdapterByIdPtr
newCallback_Lookup_findAdapterById(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_Lookup_findAdapterById<T>(instance, 0, excb, sentcb);
}

template<class T, typename CT>
class Callback_Lookup_findAdapterById : public Callback_Lookup_findAdapterById_Base, public ::IceInternal::OnewayCallback<T, CT>
{
public:

    typedef IceUtil::Handle<T> TPtr;

    typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
    typedef void (T::*Sent)(bool , const CT&);
    typedef void (T::*Response)(const CT&);

    Callback_Lookup_findAdapterById(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
    {
    }
};

template<class T, typename CT> Callback_Lookup_findAdapterByIdPtr
newCallback_Lookup_findAdapterById(const IceUtil::Handle<T>& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_Lookup_findAdapterById<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_Lookup_findAdapterByIdPtr
newCallback_Lookup_findAdapterById(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_Lookup_findAdapterById<T, CT>(instance, 0, excb, sentcb);
}

template<class T, typename CT> Callback_Lookup_findAdapterByIdPtr
newCallback_Lookup_findAdapterById(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_Lookup_findAdapterById<T, CT>(instance, cb, excb, sentcb);
}

template<class T, typename CT> Callback_Lookup_findAdapterByIdPtr
newCallback_Lookup_findAdapterById(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
    return new Callback_Lookup_findAdapterById<T, CT>(instance, 0, excb, sentcb);
}

}

#endif

#include <IceUtil/PopDisableWarnings.h>
#endif
