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

#ifndef __IceBox_IceBox_h__
#define __IceBox_IceBox_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/Object.h>
#include <Ice/Outgoing.h>
#include <Ice/OutgoingAsync.h>
#include <Ice/Incoming.h>
#include <Ice/Direct.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 <Ice/UndefSysMacros.h>

#ifndef ICE_IGNORE_VERSION
#   if ICE_INT_VERSION / 100 != 305
#       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

#ifndef ICE_BOX_API
#   ifdef ICE_BOX_API_EXPORTS
#       define ICE_BOX_API ICE_DECLSPEC_EXPORT
#   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;
bool operator==(const Service&, const Service&);
bool operator<(const Service&, const Service&);
ICE_BOX_API ::Ice::LocalObject* upCast(::IceBox::Service*);
typedef ::IceInternal::Handle< ::IceBox::Service> ServicePtr;

class ServiceObserver;
bool operator==(const ServiceObserver&, const ServiceObserver&);
bool operator<(const ServiceObserver&, const 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;
bool operator==(const ServiceManager&, const ServiceManager&);
bool operator<(const ServiceManager&, const 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*);
    #ifdef __SUNPRO_CC
    using ::Ice::UserException::__writeImpl;
    using ::Ice::UserException::__readImpl;
    #endif
};

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*);
    #ifdef __SUNPRO_CC
    using ::Ice::UserException::__writeImpl;
    using ::Ice::UserException::__readImpl;
    #endif
};

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*);
    #ifdef __SUNPRO_CC
    using ::Ice::UserException::__writeImpl;
    using ::Ice::UserException::__readImpl;
    #endif
};

}

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 ServiceObserver : virtual public ::IceProxy::Ice::Object
{
public:

    void servicesStarted(const ::Ice::StringSeq& services)
    {
        servicesStarted(services, 0);
    }
    void servicesStarted(const ::Ice::StringSeq& services, const ::Ice::Context& __ctx)
    {
        servicesStarted(services, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_servicesStarted(const ::Ice::StringSeq& 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(services, 0, new ::IceInternal::Cpp11FnOnewayCallbackNC(response, exception, sent));
    }
    ::Ice::AsyncResultPtr
    begin_servicesStarted(const ::Ice::StringSeq& 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(services, 0, ::Ice::newCallback(completed, sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_servicesStarted(const ::Ice::StringSeq& 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(services, &ctx, new ::IceInternal::Cpp11FnOnewayCallbackNC(response, exception, sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_servicesStarted(const ::Ice::StringSeq& 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(services, &ctx, ::Ice::newCallback(completed, sent));
    }
#endif

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

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

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

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

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

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

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

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

    void servicesStopped(const ::Ice::StringSeq& services)
    {
        servicesStopped(services, 0);
    }
    void servicesStopped(const ::Ice::StringSeq& services, const ::Ice::Context& __ctx)
    {
        servicesStopped(services, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_servicesStopped(const ::Ice::StringSeq& 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(services, 0, new ::IceInternal::Cpp11FnOnewayCallbackNC(response, exception, sent));
    }
    ::Ice::AsyncResultPtr
    begin_servicesStopped(const ::Ice::StringSeq& 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(services, 0, ::Ice::newCallback(completed, sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_servicesStopped(const ::Ice::StringSeq& 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(services, &ctx, new ::IceInternal::Cpp11FnOnewayCallbackNC(response, exception, sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_servicesStopped(const ::Ice::StringSeq& 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(services, &ctx, ::Ice::newCallback(completed, sent));
    }
#endif

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

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

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

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

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

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

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

    ICE_BOX_API void servicesStopped(const ::Ice::StringSeq&, const ::Ice::Context*);
    ICE_BOX_API ::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_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());
    }
    
    ICE_BOX_API static const ::std::string& ice_staticId();

private: 

    ICE_BOX_API virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM();
    ICE_BOX_API virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD();
    ICE_BOX_API virtual ::IceProxy::Ice::Object* __newInstance() const;
};

class 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)
    {
        class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC
        {
        public:

            Cpp11CB(const ::std::function<void (const ::Ice::SliceChecksumDict&)>& responseFunc, const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, const ::std::function<void (bool)>& sentFunc) :
                ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc),
                _response(responseFunc)
            {
                CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr);
            }

            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(::Ice::Exception& ex)
                {
                    Cpp11FnCallbackNC::__exception(__result, ex);
                    return;
                }
                if(_response != nullptr)
                {
                    _response(__ret);
                }
            }
        
        private:
            
            ::std::function<void (const ::Ice::SliceChecksumDict&)> _response;
        };
        return begin_getSliceChecksums(ctx, new Cpp11CB(response, exception, 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_BOX_API ::Ice::SliceChecksumDict end_getSliceChecksums(const ::Ice::AsyncResultPtr&);
    
private:

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

    void startService(const ::std::string& service)
    {
        startService(service, 0);
    }
    void startService(const ::std::string& service, const ::Ice::Context& __ctx)
    {
        startService(service, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_startService(const ::std::string& 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(service, 0, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_startService(const ::std::string& 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(service, 0, ::Ice::newCallback(completed, sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_startService(const ::std::string& 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(service, &ctx, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_startService(const ::std::string& 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(service, &ctx, ::Ice::newCallback(completed, sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_startService(const ::std::string& service, const ::Ice::Context* ctx, const ::IceInternal::Function<void ()>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception, const ::IceInternal::Function<void (bool)>& sent)
    {
        class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC
        {
        public:

            Cpp11CB(const ::std::function<void ()>& responseFunc, const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, const ::std::function<void (bool)>& sentFunc) :
                ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc),
                _response(responseFunc)
            {
                CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr);
            }

            virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
            {
                ::IceBox::ServiceManagerPrx __proxy = ::IceBox::ServiceManagerPrx::uncheckedCast(__result->getProxy());
                try
                {
                    __proxy->end_startService(__result);
                }
                catch(::Ice::Exception& ex)
                {
                    Cpp11FnCallbackNC::__exception(__result, ex);
                    return;
                }
                if(_response != nullptr)
                {
                    _response();
                }
            }
        
        private:
            
            ::std::function<void ()> _response;
        };
        return begin_startService(service, ctx, new Cpp11CB(response, exception, sent));
    }
    
public:
#endif

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

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

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

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

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

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

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

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

    void stopService(const ::std::string& service)
    {
        stopService(service, 0);
    }
    void stopService(const ::std::string& service, const ::Ice::Context& __ctx)
    {
        stopService(service, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_stopService(const ::std::string& 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(service, 0, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_stopService(const ::std::string& 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(service, 0, ::Ice::newCallback(completed, sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_stopService(const ::std::string& 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(service, &ctx, response, exception, sent);
    }
    ::Ice::AsyncResultPtr
    begin_stopService(const ::std::string& 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(service, &ctx, ::Ice::newCallback(completed, sent));
    }
    
private:

    ::Ice::AsyncResultPtr __begin_stopService(const ::std::string& service, const ::Ice::Context* ctx, const ::IceInternal::Function<void ()>& response, const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception, const ::IceInternal::Function<void (bool)>& sent)
    {
        class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC
        {
        public:

            Cpp11CB(const ::std::function<void ()>& responseFunc, const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, const ::std::function<void (bool)>& sentFunc) :
                ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc),
                _response(responseFunc)
            {
                CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr);
            }

            virtual void __completed(const ::Ice::AsyncResultPtr& __result) const
            {
                ::IceBox::ServiceManagerPrx __proxy = ::IceBox::ServiceManagerPrx::uncheckedCast(__result->getProxy());
                try
                {
                    __proxy->end_stopService(__result);
                }
                catch(::Ice::Exception& ex)
                {
                    Cpp11FnCallbackNC::__exception(__result, ex);
                    return;
                }
                if(_response != nullptr)
                {
                    _response();
                }
            }
        
        private:
            
            ::std::function<void ()> _response;
        };
        return begin_stopService(service, ctx, new Cpp11CB(response, exception, sent));
    }
    
public:
#endif

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

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

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

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

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

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

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

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

    void addObserver(const ::IceBox::ServiceObserverPrx& observer)
    {
        addObserver(observer, 0);
    }
    void addObserver(const ::IceBox::ServiceObserverPrx& observer, const ::Ice::Context& __ctx)
    {
        addObserver(observer, &__ctx);
    }
#ifdef ICE_CPP11
    ::Ice::AsyncResultPtr
    begin_addObserver(const ::IceBox::ServiceObserverPrx& 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(observer, 0, new ::IceInternal::Cpp11FnOnewayCallbackNC(response, exception, sent));
    }
    ::Ice::AsyncResultPtr
    begin_addObserver(const ::IceBox::ServiceObserverPrx& 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(observer, 0, ::Ice::newCallback(completed, sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_addObserver(const ::IceBox::ServiceObserverPrx& 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(observer, &ctx, new ::IceInternal::Cpp11FnOnewayCallbackNC(response, exception, sent), 0);
    }
    ::Ice::AsyncResultPtr
    begin_addObserver(const ::IceBox::ServiceObserverPrx& 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(observer, &ctx, ::Ice::newCallback(completed, sent));
    }
#endif

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

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

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

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

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

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

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

    ICE_BOX_API void addObserver(const ::IceBox::ServiceObserverPrx&, const ::Ice::Context*);
    ICE_BOX_API ::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);
    }

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

    ICE_BOX_API void shutdown(const ::Ice::Context*);
    ICE_BOX_API ::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_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());
    }
    
    ICE_BOX_API static const ::std::string& ice_staticId();

private: 

    ICE_BOX_API virtual ::IceInternal::Handle< ::IceDelegateM::Ice::Object> __createDelegateM();
    ICE_BOX_API virtual ::IceInternal::Handle< ::IceDelegateD::Ice::Object> __createDelegateD();
    ICE_BOX_API virtual ::IceProxy::Ice::Object* __newInstance() const;
};

}

}

namespace IceDelegate
{

namespace IceBox
{

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

    virtual void servicesStarted(const ::Ice::StringSeq&, const ::Ice::Context*, ::IceInternal::InvocationObserver&) = 0;

    virtual void servicesStopped(const ::Ice::StringSeq&, const ::Ice::Context*, ::IceInternal::InvocationObserver&) = 0;
};

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

    virtual ::Ice::SliceChecksumDict getSliceChecksums(const ::Ice::Context*, ::IceInternal::InvocationObserver&) = 0;

    virtual void startService(const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&) = 0;

    virtual void stopService(const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&) = 0;

    virtual void addObserver(const ::IceBox::ServiceObserverPrx&, const ::Ice::Context*, ::IceInternal::InvocationObserver&) = 0;

    virtual void shutdown(const ::Ice::Context*, ::IceInternal::InvocationObserver&) = 0;
};

}

}

namespace IceDelegateM
{

namespace IceBox
{

class ICE_BOX_API ServiceObserver : virtual public ::IceDelegate::IceBox::ServiceObserver,
                                    virtual public ::IceDelegateM::Ice::Object
{
public:

    virtual void servicesStarted(const ::Ice::StringSeq&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual void servicesStopped(const ::Ice::StringSeq&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);
};

class ICE_BOX_API ServiceManager : virtual public ::IceDelegate::IceBox::ServiceManager,
                                   virtual public ::IceDelegateM::Ice::Object
{
public:

    virtual ::Ice::SliceChecksumDict getSliceChecksums(const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual void startService(const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual void stopService(const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual void addObserver(const ::IceBox::ServiceObserverPrx&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual void shutdown(const ::Ice::Context*, ::IceInternal::InvocationObserver&);
};

}

}

namespace IceDelegateD
{

namespace IceBox
{

class ICE_BOX_API ServiceObserver : virtual public ::IceDelegate::IceBox::ServiceObserver,
                                    virtual public ::IceDelegateD::Ice::Object
{
public:

    virtual void servicesStarted(const ::Ice::StringSeq&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual void servicesStopped(const ::Ice::StringSeq&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);
};

class ICE_BOX_API ServiceManager : virtual public ::IceDelegate::IceBox::ServiceManager,
                                   virtual public ::IceDelegateD::Ice::Object
{
public:

    virtual ::Ice::SliceChecksumDict getSliceChecksums(const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual void startService(const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual void stopService(const ::std::string&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual void addObserver(const ::IceBox::ServiceObserverPrx&, const ::Ice::Context*, ::IceInternal::InvocationObserver&);

    virtual void shutdown(const ::Ice::Context*, ::IceInternal::InvocationObserver&);
};

}

}

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*);
    #ifdef __SUNPRO_CC
    using ::Ice::Object::__writeImpl;
    using ::Ice::Object::__readImpl;
    #endif
};

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*);
    #ifdef __SUNPRO_CC
    using ::Ice::Object::__writeImpl;
    using ::Ice::Object::__readImpl;
    #endif
};

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(::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::CallbackNC<T>::callback.get()->*response)(__ret);
        }
    }

    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(::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()));
        }
    }

    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(::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::CallbackNC<T>::callback.get()->*response)();
        }
    }

    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(::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::Callback<T, CT>::callback.get()->*response)(CT::dynamicCast(__result->getCookie()));
        }
    }

    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(::Ice::Exception& ex)
        {
            ::IceInternal::CallbackNC<T>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::CallbackNC<T>::callback.get()->*response)();
        }
    }

    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(::Ice::Exception& ex)
        {
            ::IceInternal::Callback<T, CT>::__exception(__result, ex);
            return;
        }
        if(response)
        {
            (::IceInternal::Callback<T, CT>::callback.get()->*response)(CT::dynamicCast(__result->getCookie()));
        }
    }

    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);
}

}

#endif
