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

#ifndef __IceBox_IceBox_h__
#define __IceBox_IceBox_h__

#include <IceUtil/PushDisableWarnings.h>
#include <Ice/ProxyF.h>
#include <Ice/ObjectF.h>
#include <Ice/Exception.h>
#include <Ice/LocalObject.h>
#include <Ice/StreamHelpers.h>
#include <Ice/Proxy.h>
#include <Ice/GCObject.h>
#include <Ice/AsyncResult.h>
#include <Ice/Incoming.h>
#include <Ice/FactoryTableInit.h>
#include <IceUtil/ScopedArray.h>
#include <IceUtil/Optional.h>
#include <Ice/StreamF.h>
#include <Ice/BuiltinSequences.h>
#include <Ice/CommunicatorF.h>
#include <Ice/PropertiesF.h>
#include <Ice/SliceChecksumDict.h>
#include <IceUtil/UndefSysMacros.h>
#include <IceBox/Config.h>

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

#ifndef ICE_BOX_API
#   ifdef ICE_BOX_API_EXPORTS
#       define ICE_BOX_API ICE_DECLSPEC_EXPORT
#   elif defined(ICE_STATIC_LIBS)
#       define ICE_BOX_API /**/
#   else
#       define ICE_BOX_API ICE_DECLSPEC_IMPORT
#   endif
#endif

namespace IceProxy
{

namespace IceBox
{

class ServiceObserver;
ICE_BOX_API void __read(::IceInternal::BasicStream*, ::IceInternal::ProxyHandle< ::IceProxy::IceBox::ServiceObserver>&);
ICE_BOX_API ::IceProxy::Ice::Object* upCast(::IceProxy::IceBox::ServiceObserver*);

class ServiceManager;
ICE_BOX_API void __read(::IceInternal::BasicStream*, ::IceInternal::ProxyHandle< ::IceProxy::IceBox::ServiceManager>&);
ICE_BOX_API ::IceProxy::Ice::Object* upCast(::IceProxy::IceBox::ServiceManager*);

}

}

namespace IceBox
{

class Service;
ICE_BOX_API ::Ice::LocalObject* upCast(::IceBox::Service*);
typedef ::IceInternal::Handle< ::IceBox::Service> ServicePtr;

class ServiceObserver;
ICE_BOX_API ::Ice::Object* upCast(::IceBox::ServiceObserver*);
typedef ::IceInternal::Handle< ::IceBox::ServiceObserver> ServiceObserverPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::IceBox::ServiceObserver> ServiceObserverPrx;
ICE_BOX_API void __patch(ServiceObserverPtr&, const ::Ice::ObjectPtr&);

class ServiceManager;
ICE_BOX_API ::Ice::Object* upCast(::IceBox::ServiceManager*);
typedef ::IceInternal::Handle< ::IceBox::ServiceManager> ServiceManagerPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::IceBox::ServiceManager> ServiceManagerPrx;
ICE_BOX_API void __patch(ServiceManagerPtr&, const ::Ice::ObjectPtr&);

}

namespace IceBox
{

class ICE_BOX_API FailureException : public ::Ice::LocalException
{
public:

    FailureException(const char*, int);
    FailureException(const char*, int, const ::std::string&);
    virtual ~FailureException() throw();

    virtual ::std::string ice_name() const;
    virtual void ice_print(::std::ostream&) const;
    virtual FailureException* ice_clone() const;
    virtual void ice_throw() const;

    ::std::string reason;
};

class ICE_BOX_API AlreadyStartedException : public ::Ice::UserException
{
public:

    AlreadyStartedException() {}
    virtual ~AlreadyStartedException() throw();

    virtual ::std::string ice_name() const;
    virtual AlreadyStartedException* ice_clone() const;
    virtual void ice_throw() const;

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    using ::Ice::UserException::__writeImpl;
    using ::Ice::UserException::__readImpl;
};

static AlreadyStartedException __AlreadyStartedException_init;

class ICE_BOX_API AlreadyStoppedException : public ::Ice::UserException
{
public:

    AlreadyStoppedException() {}
    virtual ~AlreadyStoppedException() throw();

    virtual ::std::string ice_name() const;
    virtual AlreadyStoppedException* ice_clone() const;
    virtual void ice_throw() const;

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    using ::Ice::UserException::__writeImpl;
    using ::Ice::UserException::__readImpl;
};

class ICE_BOX_API NoSuchServiceException : public ::Ice::UserException
{
public:

    NoSuchServiceException() {}
    virtual ~NoSuchServiceException() throw();

    virtual ::std::string ice_name() const;
    virtual NoSuchServiceException* ice_clone() const;
    virtual void ice_throw() const;

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    using ::Ice::UserException::__writeImpl;
    using ::Ice::UserException::__readImpl;
};

}

namespace Ice
{
template<>
struct StreamableTraits< ::IceBox::AlreadyStartedException>
{
    static const StreamHelperCategory helper = StreamHelperCategoryUserException;
};

template<>
struct StreamableTraits< ::IceBox::AlreadyStoppedException>
{
    static const StreamHelperCategory helper = StreamHelperCategoryUserException;
};

template<>
struct StreamableTraits< ::IceBox::NoSuchServiceException>
{
    static const StreamHelperCategory helper = StreamHelperCategoryUserException;
};

}

namespace IceBox
{

class Callback_ServiceObserver_servicesStarted_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_ServiceObserver_servicesStarted_Base> Callback_ServiceObserver_servicesStartedPtr;

class Callback_ServiceObserver_servicesStopped_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_ServiceObserver_servicesStopped_Base> Callback_ServiceObserver_servicesStoppedPtr;

class Callback_ServiceManager_getSliceChecksums_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_ServiceManager_getSliceChecksums_Base> Callback_ServiceManager_getSliceChecksumsPtr;

class Callback_ServiceManager_startService_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_ServiceManager_startService_Base> Callback_ServiceManager_startServicePtr;

class Callback_ServiceManager_stopService_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_ServiceManager_stopService_Base> Callback_ServiceManager_stopServicePtr;

class Callback_ServiceManager_addObserver_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_ServiceManager_addObserver_Base> Callback_ServiceManager_addObserverPtr;

class Callback_ServiceManager_shutdown_Base : virtual public ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_ServiceManager_shutdown_Base> Callback_ServiceManager_shutdownPtr;

}

namespace IceProxy
{

namespace IceBox
{

class ICE_BOX_API ServiceObserver : virtual public ::IceProxy::Ice::Object
{
public:

    void servicesStarted(const ::Ice::StringSeq& __p_services)
    {
        servicesStarted(__p_services, 0);
    }
    void servicesStarted(const ::Ice::StringSeq& __p_services, const ::Ice::Context& __ctx)
    {
        servicesStarted(__p_services, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_servicesStarted(const ::Ice::StringSeq& __p_services, const ::IceInternal::Function<void ()>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return begin_servicesStarted(__p_services, 0, new ::IceInternal::Cpp11FnOnewayCallbackNC(__response, __exception, __sent));
    }
    ::Ice::AsyncResultPtr
    begin_servicesStarted(const ::Ice::StringSeq& __p_services, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_servicesStarted(__p_services, 0, ::Ice::newCallback(__completed, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_servicesStarted(const ::Ice::StringSeq& __p_services, const ::Ice::Context& __ctx, const ::IceInternal::Function<void ()>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return begin_servicesStarted(__p_services, &__ctx, new ::IceInternal::Cpp11FnOnewayCallbackNC(__response, __exception, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_servicesStarted(const ::Ice::StringSeq& __p_services, const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_servicesStarted(__p_services, &__ctx, ::Ice::newCallback(__completed, __sent));
    }
#endif

    ::Ice::AsyncResultPtr begin_servicesStarted(const ::Ice::StringSeq& __p_services)
    {
        return begin_servicesStarted(__p_services, 0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_servicesStarted(const ::Ice::StringSeq& __p_services, const ::Ice::Context& __ctx)
    {
        return begin_servicesStarted(__p_services, &__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_servicesStarted(const ::Ice::StringSeq& __p_services, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_servicesStarted(__p_services, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_servicesStarted(const ::Ice::StringSeq& __p_services, const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_servicesStarted(__p_services, &__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_servicesStarted(const ::Ice::StringSeq& __p_services, const ::IceBox::Callback_ServiceObserver_servicesStartedPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_servicesStarted(__p_services, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_servicesStarted(const ::Ice::StringSeq& __p_services, const ::Ice::Context& __ctx, const ::IceBox::Callback_ServiceObserver_servicesStartedPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_servicesStarted(__p_services, &__ctx, __del, __cookie);
    }

    void end_servicesStarted(const ::Ice::AsyncResultPtr&);
    
private:

    void servicesStarted(const ::Ice::StringSeq&, const ::Ice::Context*);
    ::Ice::AsyncResultPtr begin_servicesStarted(const ::Ice::StringSeq&, const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:

    void servicesStopped(const ::Ice::StringSeq& __p_services)
    {
        servicesStopped(__p_services, 0);
    }
    void servicesStopped(const ::Ice::StringSeq& __p_services, const ::Ice::Context& __ctx)
    {
        servicesStopped(__p_services, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_servicesStopped(const ::Ice::StringSeq& __p_services, const ::IceInternal::Function<void ()>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return begin_servicesStopped(__p_services, 0, new ::IceInternal::Cpp11FnOnewayCallbackNC(__response, __exception, __sent));
    }
    ::Ice::AsyncResultPtr
    begin_servicesStopped(const ::Ice::StringSeq& __p_services, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_servicesStopped(__p_services, 0, ::Ice::newCallback(__completed, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_servicesStopped(const ::Ice::StringSeq& __p_services, const ::Ice::Context& __ctx, const ::IceInternal::Function<void ()>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return begin_servicesStopped(__p_services, &__ctx, new ::IceInternal::Cpp11FnOnewayCallbackNC(__response, __exception, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_servicesStopped(const ::Ice::StringSeq& __p_services, const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_servicesStopped(__p_services, &__ctx, ::Ice::newCallback(__completed, __sent));
    }
#endif

    ::Ice::AsyncResultPtr begin_servicesStopped(const ::Ice::StringSeq& __p_services)
    {
        return begin_servicesStopped(__p_services, 0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_servicesStopped(const ::Ice::StringSeq& __p_services, const ::Ice::Context& __ctx)
    {
        return begin_servicesStopped(__p_services, &__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_servicesStopped(const ::Ice::StringSeq& __p_services, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_servicesStopped(__p_services, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_servicesStopped(const ::Ice::StringSeq& __p_services, const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_servicesStopped(__p_services, &__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_servicesStopped(const ::Ice::StringSeq& __p_services, const ::IceBox::Callback_ServiceObserver_servicesStoppedPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_servicesStopped(__p_services, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_servicesStopped(const ::Ice::StringSeq& __p_services, const ::Ice::Context& __ctx, const ::IceBox::Callback_ServiceObserver_servicesStoppedPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_servicesStopped(__p_services, &__ctx, __del, __cookie);
    }

    void end_servicesStopped(const ::Ice::AsyncResultPtr&);
    
private:

    void servicesStopped(const ::Ice::StringSeq&, const ::Ice::Context*);
    ::Ice::AsyncResultPtr begin_servicesStopped(const ::Ice::StringSeq&, const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_context(const ::Ice::Context& __context) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_context(__context).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_adapterId(const ::std::string& __id) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_adapterId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_locatorCacheTimeout(int __timeout) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_connectionCached(bool __cached) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_connectionCached(__cached).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_endpointSelection(::Ice::EndpointSelectionType __est) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_endpointSelection(__est).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_secure(bool __secure) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_secure(__secure).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_preferSecure(bool __preferSecure) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_router(const ::Ice::RouterPrx& __router) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_router(__router).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_locator(const ::Ice::LocatorPrx& __locator) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_locator(__locator).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_collocationOptimized(bool __co) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_invocationTimeout(int __timeout) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_invocationTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_twoway() const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_twoway().get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_oneway() const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_oneway().get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_batchOneway() const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_batchOneway().get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_datagram() const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_datagram().get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_batchDatagram() const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_batchDatagram().get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_compress(bool __compress) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_compress(__compress).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_timeout(int __timeout) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_timeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_connectionId(const ::std::string& __id) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_connectionId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceObserver> ice_encodingVersion(const ::Ice::EncodingVersion& __v) const
    {
        return dynamic_cast<ServiceObserver*>(::IceProxy::Ice::Object::ice_encodingVersion(__v).get());
    }
    
    static const ::std::string& ice_staticId();

private: 
    virtual ::IceProxy::Ice::Object* __newInstance() const;
};

class ICE_BOX_API ServiceManager : virtual public ::IceProxy::Ice::Object
{
public:

    ::Ice::SliceChecksumDict getSliceChecksums()
    {
        return getSliceChecksums(0);
    }
    ::Ice::SliceChecksumDict getSliceChecksums(const ::Ice::Context& __ctx)
    {
        return getSliceChecksums(&__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_getSliceChecksums(const ::IceInternal::Function<void (const ::Ice::SliceChecksumDict&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getSliceChecksums(0, __response, __exception, __sent);
    }
    ::Ice::AsyncResultPtr
    begin_getSliceChecksums(const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getSliceChecksums(0, ::Ice::newCallback(__completed, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_getSliceChecksums(const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::SliceChecksumDict&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_getSliceChecksums(&__ctx, __response, __exception, __sent);
    }
    ::Ice::AsyncResultPtr
    begin_getSliceChecksums(const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_getSliceChecksums(&__ctx, ::Ice::newCallback(__completed, __sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_getSliceChecksums(const ::Ice::Context* __ctx, const ::IceInternal::Function<void (const ::Ice::SliceChecksumDict&)>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception, const ::IceInternal::Function<void (bool)>& __sent);
    
public:
#endif

    ::Ice::AsyncResultPtr begin_getSliceChecksums()
    {
        return begin_getSliceChecksums(0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getSliceChecksums(const ::Ice::Context& __ctx)
    {
        return begin_getSliceChecksums(&__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_getSliceChecksums(const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getSliceChecksums(0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getSliceChecksums(const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getSliceChecksums(&__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getSliceChecksums(const ::IceBox::Callback_ServiceManager_getSliceChecksumsPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getSliceChecksums(0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_getSliceChecksums(const ::Ice::Context& __ctx, const ::IceBox::Callback_ServiceManager_getSliceChecksumsPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_getSliceChecksums(&__ctx, __del, __cookie);
    }

    ::Ice::SliceChecksumDict end_getSliceChecksums(const ::Ice::AsyncResultPtr&);
    
private:

    ::Ice::SliceChecksumDict getSliceChecksums(const ::Ice::Context*);
    ::Ice::AsyncResultPtr begin_getSliceChecksums(const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:

    void startService(const ::std::string& __p_service)
    {
        startService(__p_service, 0);
    }
    void startService(const ::std::string& __p_service, const ::Ice::Context& __ctx)
    {
        startService(__p_service, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_startService(const ::std::string& __p_service, const ::IceInternal::Function<void ()>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_startService(__p_service, 0, __response, __exception, __sent);
    }
    ::Ice::AsyncResultPtr
    begin_startService(const ::std::string& __p_service, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_startService(__p_service, 0, ::Ice::newCallback(__completed, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_startService(const ::std::string& __p_service, const ::Ice::Context& __ctx, const ::IceInternal::Function<void ()>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_startService(__p_service, &__ctx, __response, __exception, __sent);
    }
    ::Ice::AsyncResultPtr
    begin_startService(const ::std::string& __p_service, const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_startService(__p_service, &__ctx, ::Ice::newCallback(__completed, __sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_startService(const ::std::string& __p_service, const ::Ice::Context* __ctx, const ::IceInternal::Function<void ()>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception, const ::IceInternal::Function<void (bool)>& __sent);
    
public:
#endif

    ::Ice::AsyncResultPtr begin_startService(const ::std::string& __p_service)
    {
        return begin_startService(__p_service, 0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_startService(const ::std::string& __p_service, const ::Ice::Context& __ctx)
    {
        return begin_startService(__p_service, &__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_startService(const ::std::string& __p_service, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_startService(__p_service, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_startService(const ::std::string& __p_service, const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_startService(__p_service, &__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_startService(const ::std::string& __p_service, const ::IceBox::Callback_ServiceManager_startServicePtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_startService(__p_service, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_startService(const ::std::string& __p_service, const ::Ice::Context& __ctx, const ::IceBox::Callback_ServiceManager_startServicePtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_startService(__p_service, &__ctx, __del, __cookie);
    }

    void end_startService(const ::Ice::AsyncResultPtr&);
    
private:

    void startService(const ::std::string&, const ::Ice::Context*);
    ::Ice::AsyncResultPtr begin_startService(const ::std::string&, const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:

    void stopService(const ::std::string& __p_service)
    {
        stopService(__p_service, 0);
    }
    void stopService(const ::std::string& __p_service, const ::Ice::Context& __ctx)
    {
        stopService(__p_service, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_stopService(const ::std::string& __p_service, const ::IceInternal::Function<void ()>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_stopService(__p_service, 0, __response, __exception, __sent);
    }
    ::Ice::AsyncResultPtr
    begin_stopService(const ::std::string& __p_service, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_stopService(__p_service, 0, ::Ice::newCallback(__completed, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_stopService(const ::std::string& __p_service, const ::Ice::Context& __ctx, const ::IceInternal::Function<void ()>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return __begin_stopService(__p_service, &__ctx, __response, __exception, __sent);
    }
    ::Ice::AsyncResultPtr
    begin_stopService(const ::std::string& __p_service, const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_stopService(__p_service, &__ctx, ::Ice::newCallback(__completed, __sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_stopService(const ::std::string& __p_service, const ::Ice::Context* __ctx, const ::IceInternal::Function<void ()>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception, const ::IceInternal::Function<void (bool)>& __sent);
    
public:
#endif

    ::Ice::AsyncResultPtr begin_stopService(const ::std::string& __p_service)
    {
        return begin_stopService(__p_service, 0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_stopService(const ::std::string& __p_service, const ::Ice::Context& __ctx)
    {
        return begin_stopService(__p_service, &__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_stopService(const ::std::string& __p_service, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_stopService(__p_service, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_stopService(const ::std::string& __p_service, const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_stopService(__p_service, &__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_stopService(const ::std::string& __p_service, const ::IceBox::Callback_ServiceManager_stopServicePtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_stopService(__p_service, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_stopService(const ::std::string& __p_service, const ::Ice::Context& __ctx, const ::IceBox::Callback_ServiceManager_stopServicePtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_stopService(__p_service, &__ctx, __del, __cookie);
    }

    void end_stopService(const ::Ice::AsyncResultPtr&);
    
private:

    void stopService(const ::std::string&, const ::Ice::Context*);
    ::Ice::AsyncResultPtr begin_stopService(const ::std::string&, const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:

    void addObserver(const ::IceBox::ServiceObserverPrx& __p_observer)
    {
        addObserver(__p_observer, 0);
    }
    void addObserver(const ::IceBox::ServiceObserverPrx& __p_observer, const ::Ice::Context& __ctx)
    {
        addObserver(__p_observer, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_addObserver(const ::IceBox::ServiceObserverPrx& __p_observer, const ::IceInternal::Function<void ()>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return begin_addObserver(__p_observer, 0, new ::IceInternal::Cpp11FnOnewayCallbackNC(__response, __exception, __sent));
    }
    ::Ice::AsyncResultPtr
    begin_addObserver(const ::IceBox::ServiceObserverPrx& __p_observer, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_addObserver(__p_observer, 0, ::Ice::newCallback(__completed, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_addObserver(const ::IceBox::ServiceObserverPrx& __p_observer, const ::Ice::Context& __ctx, const ::IceInternal::Function<void ()>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return begin_addObserver(__p_observer, &__ctx, new ::IceInternal::Cpp11FnOnewayCallbackNC(__response, __exception, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_addObserver(const ::IceBox::ServiceObserverPrx& __p_observer, const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_addObserver(__p_observer, &__ctx, ::Ice::newCallback(__completed, __sent));
    }
#endif

    ::Ice::AsyncResultPtr begin_addObserver(const ::IceBox::ServiceObserverPrx& __p_observer)
    {
        return begin_addObserver(__p_observer, 0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_addObserver(const ::IceBox::ServiceObserverPrx& __p_observer, const ::Ice::Context& __ctx)
    {
        return begin_addObserver(__p_observer, &__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_addObserver(const ::IceBox::ServiceObserverPrx& __p_observer, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_addObserver(__p_observer, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_addObserver(const ::IceBox::ServiceObserverPrx& __p_observer, const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_addObserver(__p_observer, &__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_addObserver(const ::IceBox::ServiceObserverPrx& __p_observer, const ::IceBox::Callback_ServiceManager_addObserverPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_addObserver(__p_observer, 0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_addObserver(const ::IceBox::ServiceObserverPrx& __p_observer, const ::Ice::Context& __ctx, const ::IceBox::Callback_ServiceManager_addObserverPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_addObserver(__p_observer, &__ctx, __del, __cookie);
    }

    void end_addObserver(const ::Ice::AsyncResultPtr&);
    
private:

    void addObserver(const ::IceBox::ServiceObserverPrx&, const ::Ice::Context*);
    ::Ice::AsyncResultPtr begin_addObserver(const ::IceBox::ServiceObserverPrx&, const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:

    void shutdown()
    {
        shutdown(0);
    }
    void shutdown(const ::Ice::Context& __ctx)
    {
        shutdown(&__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_shutdown(const ::IceInternal::Function<void ()>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return begin_shutdown(0, new ::IceInternal::Cpp11FnOnewayCallbackNC(__response, __exception, __sent));
    }
    ::Ice::AsyncResultPtr
    begin_shutdown(const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_shutdown(0, ::Ice::newCallback(__completed, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_shutdown(const ::Ice::Context& __ctx, const ::IceInternal::Function<void ()>& __response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& __exception = ::IceInternal::Function<void (const ::Ice::Exception&)>(), const ::IceInternal::Function<void (bool)>& __sent = ::IceInternal::Function<void (bool)>())
    {
        return begin_shutdown(&__ctx, new ::IceInternal::Cpp11FnOnewayCallbackNC(__response, __exception, __sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_shutdown(const ::Ice::Context& __ctx, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __completed, const ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>& __sent = ::IceInternal::Function<void (const ::Ice::AsyncResultPtr&)>())
    {
        return begin_shutdown(&__ctx, ::Ice::newCallback(__completed, __sent));
    }
#endif

    ::Ice::AsyncResultPtr begin_shutdown()
    {
        return begin_shutdown(0, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_shutdown(const ::Ice::Context& __ctx)
    {
        return begin_shutdown(&__ctx, ::IceInternal::__dummyCallback, 0);
    }

    ::Ice::AsyncResultPtr begin_shutdown(const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_shutdown(0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_shutdown(const ::Ice::Context& __ctx, const ::Ice::CallbackPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_shutdown(&__ctx, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_shutdown(const ::IceBox::Callback_ServiceManager_shutdownPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_shutdown(0, __del, __cookie);
    }

    ::Ice::AsyncResultPtr begin_shutdown(const ::Ice::Context& __ctx, const ::IceBox::Callback_ServiceManager_shutdownPtr& __del, const ::Ice::LocalObjectPtr& __cookie = 0)
    {
        return begin_shutdown(&__ctx, __del, __cookie);
    }

    void end_shutdown(const ::Ice::AsyncResultPtr&);
    
private:

    void shutdown(const ::Ice::Context*);
    ::Ice::AsyncResultPtr begin_shutdown(const ::Ice::Context*, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& __cookie = 0);
    
public:
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_context(const ::Ice::Context& __context) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_context(__context).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_adapterId(const ::std::string& __id) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_adapterId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_endpoints(const ::Ice::EndpointSeq& __endpoints) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_endpoints(__endpoints).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_locatorCacheTimeout(int __timeout) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_locatorCacheTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_connectionCached(bool __cached) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_connectionCached(__cached).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_endpointSelection(::Ice::EndpointSelectionType __est) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_endpointSelection(__est).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_secure(bool __secure) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_secure(__secure).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_preferSecure(bool __preferSecure) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_preferSecure(__preferSecure).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_router(const ::Ice::RouterPrx& __router) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_router(__router).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_locator(const ::Ice::LocatorPrx& __locator) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_locator(__locator).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_collocationOptimized(bool __co) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_collocationOptimized(__co).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_invocationTimeout(int __timeout) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_invocationTimeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_twoway() const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_twoway().get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_oneway() const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_oneway().get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_batchOneway() const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_batchOneway().get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_datagram() const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_datagram().get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_batchDatagram() const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_batchDatagram().get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_compress(bool __compress) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_compress(__compress).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_timeout(int __timeout) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_timeout(__timeout).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_connectionId(const ::std::string& __id) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_connectionId(__id).get());
    }
    
    ::IceInternal::ProxyHandle<ServiceManager> ice_encodingVersion(const ::Ice::EncodingVersion& __v) const
    {
        return dynamic_cast<ServiceManager*>(::IceProxy::Ice::Object::ice_encodingVersion(__v).get());
    }
    
    static const ::std::string& ice_staticId();

private: 
    virtual ::IceProxy::Ice::Object* __newInstance() const;
};

}

}

namespace IceBox
{

class ICE_BOX_API Service : virtual public ::Ice::LocalObject
{
public:

    typedef ServicePtr PointerType;

    virtual void start(const ::std::string&, const ::Ice::CommunicatorPtr&, const ::Ice::StringSeq&) = 0;

    virtual void stop() = 0;
};

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

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

class ICE_BOX_API ServiceObserver : virtual public ::Ice::Object
{
public:

    typedef ServiceObserverPrx ProxyType;
    typedef ServiceObserverPtr PointerType;

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

    virtual void servicesStarted(const ::Ice::StringSeq&, const ::Ice::Current& = ::Ice::Current()) = 0;
    ::Ice::DispatchStatus ___servicesStarted(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual void servicesStopped(const ::Ice::StringSeq&, const ::Ice::Current& = ::Ice::Current()) = 0;
    ::Ice::DispatchStatus ___servicesStopped(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual ::Ice::DispatchStatus __dispatch(::IceInternal::Incoming&, const ::Ice::Current&);

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    using ::Ice::Object::__writeImpl;
    using ::Ice::Object::__readImpl;
};

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

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

class ICE_BOX_API ServiceManager : virtual public ::Ice::Object
{
public:

    typedef ServiceManagerPrx ProxyType;
    typedef ServiceManagerPtr PointerType;

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

    virtual ::Ice::SliceChecksumDict getSliceChecksums(const ::Ice::Current& = ::Ice::Current()) const = 0;
    ::Ice::DispatchStatus ___getSliceChecksums(::IceInternal::Incoming&, const ::Ice::Current&) const;

    virtual void startService(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) = 0;
    ::Ice::DispatchStatus ___startService(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual void stopService(const ::std::string&, const ::Ice::Current& = ::Ice::Current()) = 0;
    ::Ice::DispatchStatus ___stopService(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual void addObserver(const ::IceBox::ServiceObserverPrx&, const ::Ice::Current& = ::Ice::Current()) = 0;
    ::Ice::DispatchStatus ___addObserver(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual void shutdown(const ::Ice::Current& = ::Ice::Current()) = 0;
    ::Ice::DispatchStatus ___shutdown(::IceInternal::Incoming&, const ::Ice::Current&);

    virtual ::Ice::DispatchStatus __dispatch(::IceInternal::Incoming&, const ::Ice::Current&);

protected:
    virtual void __writeImpl(::IceInternal::BasicStream*) const;
    virtual void __readImpl(::IceInternal::BasicStream*);
    using ::Ice::Object::__writeImpl;
    using ::Ice::Object::__readImpl;
};

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

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

}

namespace IceBox
{

template<class T>
class CallbackNC_ServiceObserver_servicesStarted : public Callback_ServiceObserver_servicesStarted_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_ServiceObserver_servicesStarted(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
    {
    }
};

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

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

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

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

template<class T, typename CT>
class Callback_ServiceObserver_servicesStarted : public Callback_ServiceObserver_servicesStarted_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_ServiceObserver_servicesStarted(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
    {
    }
};

template<class T, typename CT> Callback_ServiceObserver_servicesStartedPtr
newCallback_ServiceObserver_servicesStarted(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_ServiceObserver_servicesStarted<T, CT>(instance, cb, excb, sentcb);
}

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

template<class T, typename CT> Callback_ServiceObserver_servicesStartedPtr
newCallback_ServiceObserver_servicesStarted(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_ServiceObserver_servicesStarted<T, CT>(instance, cb, excb, sentcb);
}

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

template<class T>
class CallbackNC_ServiceObserver_servicesStopped : public Callback_ServiceObserver_servicesStopped_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_ServiceObserver_servicesStopped(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
    {
    }
};

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

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

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

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

template<class T, typename CT>
class Callback_ServiceObserver_servicesStopped : public Callback_ServiceObserver_servicesStopped_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_ServiceObserver_servicesStopped(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
    {
    }
};

template<class T, typename CT> Callback_ServiceObserver_servicesStoppedPtr
newCallback_ServiceObserver_servicesStopped(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_ServiceObserver_servicesStopped<T, CT>(instance, cb, excb, sentcb);
}

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

template<class T, typename CT> Callback_ServiceObserver_servicesStoppedPtr
newCallback_ServiceObserver_servicesStopped(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_ServiceObserver_servicesStopped<T, CT>(instance, cb, excb, sentcb);
}

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

template<class T>
class CallbackNC_ServiceManager_getSliceChecksums : public Callback_ServiceManager_getSliceChecksums_Base, public ::IceInternal::TwowayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

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

    CallbackNC_ServiceManager_getSliceChecksums(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
    {
    }

    virtual void completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceBox::ServiceManagerPrx __proxy = ::IceBox::ServiceManagerPrx::uncheckedCast(__result->getProxy());
        ::Ice::SliceChecksumDict __ret;
        try
        {
            __ret = __proxy->end_getSliceChecksums(__result);
        }
        catch(const ::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::exception(__result, ex);
            return;
        }
        if(_response)
        {
            (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(__ret);
        }
    }

    private:

    Response _response;
};

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

template<class T> Callback_ServiceManager_getSliceChecksumsPtr
newCallback_ServiceManager_getSliceChecksums(T* instance, void (T::*cb)(const ::Ice::SliceChecksumDict&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
    return new CallbackNC_ServiceManager_getSliceChecksums<T>(instance, cb, excb, sentcb);
}

template<class T, typename CT>
class Callback_ServiceManager_getSliceChecksums : public Callback_ServiceManager_getSliceChecksums_Base, public ::IceInternal::TwowayCallback<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 ::Ice::SliceChecksumDict&, const CT&);

    Callback_ServiceManager_getSliceChecksums(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
    {
    }

    virtual void completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceBox::ServiceManagerPrx __proxy = ::IceBox::ServiceManagerPrx::uncheckedCast(__result->getProxy());
        ::Ice::SliceChecksumDict __ret;
        try
        {
            __ret = __proxy->end_getSliceChecksums(__result);
        }
        catch(const ::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::exception(__result, ex);
            return;
        }
        if(_response)
        {
            (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(__ret, CT::dynamicCast(__result->getCookie()));
        }
    }

    private:

    Response _response;
};

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

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

template<class T>
class CallbackNC_ServiceManager_startService : public Callback_ServiceManager_startService_Base, public ::IceInternal::TwowayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

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

    CallbackNC_ServiceManager_startService(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
    {
    }

    virtual void completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceBox::ServiceManagerPrx __proxy = ::IceBox::ServiceManagerPrx::uncheckedCast(__result->getProxy());
        try
        {
            __proxy->end_startService(__result);
        }
        catch(const ::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::exception(__result, ex);
            return;
        }
        if(_response)
        {
            (::IceInternal::CallbackNC<T>::_callback.get()->*_response)();
        }
    }

    private:

    Response _response;
};

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

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

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

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

template<class T, typename CT>
class Callback_ServiceManager_startService : public Callback_ServiceManager_startService_Base, public ::IceInternal::TwowayCallback<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_ServiceManager_startService(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
    {
    }

    virtual void completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceBox::ServiceManagerPrx __proxy = ::IceBox::ServiceManagerPrx::uncheckedCast(__result->getProxy());
        try
        {
            __proxy->end_startService(__result);
        }
        catch(const ::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::exception(__result, ex);
            return;
        }
        if(_response)
        {
            (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(CT::dynamicCast(__result->getCookie()));
        }
    }

    private:

    Response _response;
};

template<class T, typename CT> Callback_ServiceManager_startServicePtr
newCallback_ServiceManager_startService(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_ServiceManager_startService<T, CT>(instance, cb, excb, sentcb);
}

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

template<class T, typename CT> Callback_ServiceManager_startServicePtr
newCallback_ServiceManager_startService(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_ServiceManager_startService<T, CT>(instance, cb, excb, sentcb);
}

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

template<class T>
class CallbackNC_ServiceManager_stopService : public Callback_ServiceManager_stopService_Base, public ::IceInternal::TwowayCallbackNC<T>
{
public:

    typedef IceUtil::Handle<T> TPtr;

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

    CallbackNC_ServiceManager_stopService(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
    {
    }

    virtual void completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceBox::ServiceManagerPrx __proxy = ::IceBox::ServiceManagerPrx::uncheckedCast(__result->getProxy());
        try
        {
            __proxy->end_stopService(__result);
        }
        catch(const ::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::exception(__result, ex);
            return;
        }
        if(_response)
        {
            (::IceInternal::CallbackNC<T>::_callback.get()->*_response)();
        }
    }

    private:

    Response _response;
};

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

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

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

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

template<class T, typename CT>
class Callback_ServiceManager_stopService : public Callback_ServiceManager_stopService_Base, public ::IceInternal::TwowayCallback<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_ServiceManager_stopService(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
    {
    }

    virtual void completed(const ::Ice::AsyncResultPtr& __result) const
    {
        ::IceBox::ServiceManagerPrx __proxy = ::IceBox::ServiceManagerPrx::uncheckedCast(__result->getProxy());
        try
        {
            __proxy->end_stopService(__result);
        }
        catch(const ::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::exception(__result, ex);
            return;
        }
        if(_response)
        {
            (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(CT::dynamicCast(__result->getCookie()));
        }
    }

    private:

    Response _response;
};

template<class T, typename CT> Callback_ServiceManager_stopServicePtr
newCallback_ServiceManager_stopService(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_ServiceManager_stopService<T, CT>(instance, cb, excb, sentcb);
}

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

template<class T, typename CT> Callback_ServiceManager_stopServicePtr
newCallback_ServiceManager_stopService(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_ServiceManager_stopService<T, CT>(instance, cb, excb, sentcb);
}

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

template<class T>
class CallbackNC_ServiceManager_addObserver : public Callback_ServiceManager_addObserver_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_ServiceManager_addObserver(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
    {
    }
};

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

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

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

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

template<class T, typename CT>
class Callback_ServiceManager_addObserver : public Callback_ServiceManager_addObserver_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_ServiceManager_addObserver(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
    {
    }
};

template<class T, typename CT> Callback_ServiceManager_addObserverPtr
newCallback_ServiceManager_addObserver(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_ServiceManager_addObserver<T, CT>(instance, cb, excb, sentcb);
}

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

template<class T, typename CT> Callback_ServiceManager_addObserverPtr
newCallback_ServiceManager_addObserver(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_ServiceManager_addObserver<T, CT>(instance, cb, excb, sentcb);
}

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

template<class T>
class CallbackNC_ServiceManager_shutdown : public Callback_ServiceManager_shutdown_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_ServiceManager_shutdown(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
    {
    }
};

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

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

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

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

template<class T, typename CT>
class Callback_ServiceManager_shutdown : public Callback_ServiceManager_shutdown_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_ServiceManager_shutdown(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
        : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
    {
    }
};

template<class T, typename CT> Callback_ServiceManager_shutdownPtr
newCallback_ServiceManager_shutdown(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_ServiceManager_shutdown<T, CT>(instance, cb, excb, sentcb);
}

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

template<class T, typename CT> Callback_ServiceManager_shutdownPtr
newCallback_ServiceManager_shutdown(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_ServiceManager_shutdown<T, CT>(instance, cb, excb, sentcb);
}

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

}

#include <IceUtil/PopDisableWarnings.h>
#endif
