16#ifndef __IceGrid_UserAccountMapper_h__
17#define __IceGrid_UserAccountMapper_h__
39#ifndef ICE_IGNORE_VERSION
40# if ICE_INT_VERSION / 100 != 307
41# error Ice version mismatch!
43# if ICE_INT_VERSION % 100 >= 50
44# error Beta header file detected
46# if ICE_INT_VERSION % 100 < 11
47# error Ice patch level mismatch!
52# if defined(ICE_STATIC_LIBS)
54# elif defined(ICEGRID_API_EXPORTS)
55# define ICEGRID_API ICE_DECLSPEC_EXPORT
57# define ICEGRID_API ICE_DECLSPEC_IMPORT
61#ifdef ICE_CPP11_MAPPING
66class UserAccountMapper;
79class ICE_CLASS(ICEGRID_API) UserAccountNotFoundException :
public ::Ice::UserExceptionHelper<UserAccountNotFoundException, ::Ice::UserException>
85 UserAccountNotFoundException(
const UserAccountNotFoundException&) =
default;
87 UserAccountNotFoundException() =
default;
93 std::tuple<> ice_tuple()
const
106static UserAccountNotFoundException _iceS_UserAccountNotFoundException_init;
131 virtual bool ice_isA(::std::string
id, const ::Ice::Current& current)
const override;
138 virtual ::std::vector<::std::string> ice_ids(const ::Ice::Current& current)
const override;
145 virtual ::std::string ice_id(const ::Ice::Current& current)
const override;
151 static const ::std::string& ice_staticId();
166 virtual ::std::string getUserAccount(::std::string user, const ::Ice::Current& current) = 0;
168 bool _iceD_getUserAccount(::IceInternal::Incoming&, const ::Ice::Current&);
172 virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&)
override;
186class ICE_CLASS(ICEGRID_API)
UserAccountMapperPrx :
public virtual ::Ice::Proxy<UserAccountMapperPrx, ::Ice::ObjectPrx>
205 return _makePromiseOutgoing<::std::string>(
true,
this, &UserAccountMapperPrx::_iceI_getUserAccount, user, context).
get();
219 template<
template<
typename>
class P = ::std::promise>
221 ->
decltype(::std::declval<P<::std::string>>().get_future())
223 return _makePromiseOutgoing<::std::string, P>(
false,
this, &UserAccountMapperPrx::_iceI_getUserAccount, user, context);
240 ::std::function<void()>
241 getUserAccountAsync(const ::std::string& user,
242 ::std::function<
void(::std::string)> response,
243 ::std::function<
void(::std::exception_ptr)> ex =
nullptr,
244 ::std::function<
void(
bool)> sent =
nullptr,
247 return _makeLambdaOutgoing<::std::string>(std::move(response), std::move(ex), std::move(sent),
this, &IceGrid::UserAccountMapperPrx::_iceI_getUserAccount, user, context);
251 ICE_MEMBER(
ICEGRID_API)
void _iceI_getUserAccount(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::std::string>>&, const ::std::string&, const ::Ice::Context&);
264 friend ::std::shared_ptr<UserAccountMapperPrx> IceInternal::createProxy<UserAccountMapperPrx>();
299ICEGRID_API void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< UserAccountMapper>&);
337#ifdef ICE_CPP11_COMPILER
411 return end_getUserAccount(_iceI_begin_getUserAccount(user, context, ::IceInternal::dummyCallback, 0,
true));
427 return _iceI_begin_getUserAccount(user, context, ::IceInternal::dummyCallback, 0);
462 return _iceI_begin_getUserAccount(user, context, cb, cookie);
497 return _iceI_begin_getUserAccount(user, context, cb, cookie);
511 ICE_MEMBER(
ICEGRID_API) ::
Ice::AsyncResultPtr _iceI_begin_getUserAccount(const ::std::string&, const ::
Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::
Ice::LocalObjectPtr& cookie = 0, bool sync = false);
549#ifdef ICE_CPP11_COMPILER
598 bool _iceD_getUserAccount(::IceInternal::Incoming&, const ::Ice::Current&);
602 virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&);
619inline bool operator<(
const UserAccountMapper& lhs,
const UserAccountMapper& rhs)
632struct StreamableTraits< ::IceGrid::UserAccountNotFoundException>
634 static const StreamHelperCategory helper = StreamHelperCategoryUserException;
660 : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
665 virtual void completed(const ::Ice::AsyncResultPtr& result)
const
671 ret = proxy->end_getUserAccount(result);
673 catch(const ::Ice::Exception& ex)
675 ::IceInternal::CallbackNC<T>::exception(result, ex);
680 (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(ret);
712template<
class T> Callback_UserAccountMapper_getUserAccountPtr
723template<
class T,
typename CT>
730 typedef void (T::*
Exception)(const ::Ice::Exception& ,
const CT&);
731 typedef void (T::*
Sent)(bool ,
const CT&);
732 typedef void (T::*
Response)(const ::std::string&,
const CT&);
735 : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
740 virtual void completed(const ::Ice::AsyncResultPtr& result)
const
746 ret = proxy->end_getUserAccount(result);
748 catch(const ::Ice::Exception& ex)
750 ::IceInternal::Callback<T, CT>::exception(result, ex);
755 (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie()));
789template<
class T,
typename CT> Callback_UserAccountMapper_getUserAccountPtr
#define ICEGRID_API
Definition Descriptor.h:58
#define ICE_MEMBER(API)
Definition Config.h:177
Type-safe asynchronous callback wrapper class used for calls to IceProxy::IceGrid::UserAccountMapper:...
Definition UserAccountMapper.h:650
void(T::* Response)(const ::std::string &)
Definition UserAccountMapper.h:657
void(T::* Exception)(const ::Ice::Exception &)
Definition UserAccountMapper.h:655
void(T::* Sent)(bool)
Definition UserAccountMapper.h:656
IceUtil::Handle< T > TPtr
Definition UserAccountMapper.h:653
CallbackNC_UserAccountMapper_getUserAccount(const TPtr &obj, Response cb, Exception excb, Sent sentcb)
Definition UserAccountMapper.h:659
Base class for asynchronous callback wrapper classes used for calls to IceProxy::IceGrid::UserAccount...
Definition UserAccountMapper.h:381
Type-safe asynchronous callback wrapper class with cookie support used for calls to IceProxy::IceGrid...
Definition UserAccountMapper.h:725
IceUtil::Handle< T > TPtr
Definition UserAccountMapper.h:728
Callback_UserAccountMapper_getUserAccount(const TPtr &obj, Response cb, Exception excb, Sent sentcb)
Definition UserAccountMapper.h:734
void(T::* Sent)(bool, const CT &)
Definition UserAccountMapper.h:731
void(T::* Exception)(const ::Ice::Exception &, const CT &)
Definition UserAccountMapper.h:730
void(T::* Response)(const ::std::string &, const CT &)
Definition UserAccountMapper.h:732
A user account mapper object is used by IceGrid nodes to map session identifiers to user accounts.
Definition UserAccountMapper.h:541
static const ::std::string & ice_staticId()
Obtains the Slice type ID corresponding to this class.
virtual ~UserAccountMapper()
virtual ::std::vector< ::std::string > ice_ids(const ::Ice::Current ¤t=::Ice::emptyCurrent) const
Obtains a list of the Slice type IDs representing the interfaces supported by this object.
virtual bool ice_isA(const ::std::string &id, const ::Ice::Current ¤t=::Ice::emptyCurrent) const
Determines whether this object supports an interface with the given Slice type ID.
UserAccountMapperPtr PointerType
Definition UserAccountMapper.h:545
virtual::std::string getUserAccount(const ::std::string &user, const ::Ice::Current ¤t=::Ice::emptyCurrent)=0
Get the name of the user account for the given user.
UserAccountMapperPrx ProxyType
Definition UserAccountMapper.h:544
virtual const ::std::string & ice_id(const ::Ice::Current ¤t=::Ice::emptyCurrent) const
Obtains a Slice type ID representing the most-derived interface supported by this object.
This exception is raised if a user account for a given session identifier can't be found.
Definition UserAccountMapper.h:332
UserAccountNotFoundException()
Definition UserAccountMapper.h:335
virtual ~UserAccountNotFoundException()
virtual::std::string ice_id() const
Obtains the Slice type ID of this exception.
virtual void ice_throw() const
Throws this exception.
virtual UserAccountNotFoundException * ice_clone() const
Polymorphically clones this exception.
Definition UserAccountMapper.h:393
::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string &user, const ::Ice::Context &context, const ::Ice::CallbackPtr &cb, const ::Ice::LocalObjectPtr &cookie=0)
Get the name of the user account for the given user.
Definition UserAccountMapper.h:460
::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string &user, const ::Ice::CallbackPtr &cb, const ::Ice::LocalObjectPtr &cookie=0)
Get the name of the user account for the given user.
Definition UserAccountMapper.h:442
::std::string getUserAccount(const ::std::string &user, const ::Ice::Context &context=::Ice::noExplicitContext)
Get the name of the user account for the given user.
Definition UserAccountMapper.h:409
::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string &user, const ::Ice::Context &context, const ::IceGrid::Callback_UserAccountMapper_getUserAccountPtr &cb, const ::Ice::LocalObjectPtr &cookie=0)
Get the name of the user account for the given user.
Definition UserAccountMapper.h:495
static const ::std::string & ice_staticId()
Obtains the Slice type ID corresponding to this interface.
::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string &user, const ::Ice::Context &context=::Ice::noExplicitContext)
Get the name of the user account for the given user.
Definition UserAccountMapper.h:425
::std::string end_getUserAccount(const ::Ice::AsyncResultPtr &result)
Completes an invocation of begin_getUserAccount.
::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string &user, const ::IceGrid::Callback_UserAccountMapper_getUserAccountPtr &cb, const ::Ice::LocalObjectPtr &cookie=0)
Get the name of the user account for the given user.
Definition UserAccountMapper.h:477
T * get() const
Definition Handle.h:25
Shared & operator=(const Shared &)
Definition Shared.h:94
The base class for servants.
Definition Object.h:193
Interface for output streams used to create a sequence of bytes from Slice types.
Definition OutputStream.h:28
Helper template that supplies proxy factory functions.
Definition Proxy.h:2904
Base class for all Ice user exceptions.
Definition Exception.h:68
::IceUtil::Handle< Callback_UserAccountMapper_getUserAccount_Base > Callback_UserAccountMapper_getUserAccountPtr
Definition UserAccountMapper.h:382
UserAccountMapperPrx UserAccountMapperPrxPtr
Definition UserAccountMapper.h:316
Callback_UserAccountMapper_getUserAccountPtr newCallback_UserAccountMapper_getUserAccount(const IceUtil::Handle< T > &instance, void(T::*cb)(const ::std::string &), void(T::*excb)(const ::Ice::Exception &), void(T::*sentcb)(bool)=0)
Creates a callback wrapper instance that delegates to your object.
Definition UserAccountMapper.h:699
::IceInternal::ProxyHandle< ::IceProxy::IceGrid::UserAccountMapper > UserAccountMapperPrx
Definition UserAccountMapper.h:315
::IceInternal::Handle< UserAccountMapper > UserAccountMapperPtr
Definition UserAccountMapper.h:314
Definition BuiltinSequences.h:113
const Context noExplicitContext
Marker value used to indicate that no explicit context was passed to a proxy invocation.
Definition ProxyHandle.h:51
const Current emptyCurrent
A default-initialized Current instance.
IceInternal::Handle< AsyncResult > AsyncResultPtr
Definition AsyncResultF.h:18
IceUtil::Shared * upCast(::Ice::AsyncResult *)