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;
67class UserAccountMapperPrx;
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;
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;
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()>
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>();
283using UserAccountMapperPtr = ::std::shared_ptr<UserAccountMapper>;
284using UserAccountMapperPrxPtr = ::std::shared_ptr<UserAccountMapperPrx>;
299ICEGRID_API void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< UserAccountMapper>&);
314typedef ::IceInternal::Handle< UserAccountMapper> UserAccountMapperPtr;
315typedef ::IceInternal::ProxyHandle< ::IceProxy::IceGrid::UserAccountMapper>
UserAccountMapperPrx;
318ICEGRID_API void _icePatchObjectPtr(UserAccountMapperPtr&, const ::Ice::ObjectPtr&);
335 UserAccountNotFoundException() {}
337#ifdef ICE_CPP11_COMPILER
338 UserAccountNotFoundException(
const UserAccountNotFoundException&) =
default;
339 virtual ~UserAccountNotFoundException();
341 virtual ~UserAccountNotFoundException() throw();
348 virtual ::std::string ice_id()
const;
353 virtual UserAccountNotFoundException* ice_clone()
const;
357 virtual void ice_throw()
const;
362 virtual void _writeImpl(::Ice::OutputStream*)
const;
363 virtual void _readImpl(::Ice::InputStream*);
381class Callback_UserAccountMapper_getUserAccount_Base :
public virtual ::IceInternal::CallbackBase { };
382typedef ::IceUtil::Handle< Callback_UserAccountMapper_getUserAccount_Base> Callback_UserAccountMapper_getUserAccountPtr;
392class ICE_CLASS(ICEGRID_API) UserAccountMapper :
public virtual ::Ice::Proxy<UserAccountMapper, ::IceProxy::Ice::Object>
411 return end_getUserAccount(_iceI_begin_getUserAccount(user, context, ::IceInternal::dummyCallback, 0,
true));
425 ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::Ice::Context& context =
::Ice::noExplicitContext)
427 return _iceI_begin_getUserAccount(user, context, ::IceInternal::dummyCallback, 0);
442 ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
460 ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
462 return _iceI_begin_getUserAccount(user, context, cb, cookie);
477 ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::IceGrid::Callback_UserAccountMapper_getUserAccountPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
495 ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::Ice::Context& context, const ::IceGrid::Callback_UserAccountMapper_getUserAccountPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
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);
540class ICEGRID_API UserAccountMapper :
public virtual ::Ice::Object
544 typedef UserAccountMapperPrx ProxyType;
545 typedef UserAccountMapperPtr PointerType;
547 virtual ~UserAccountMapper();
549#ifdef ICE_CPP11_COMPILER
550 UserAccountMapper() =
default;
551 UserAccountMapper(
const UserAccountMapper&) =
default;
552 UserAccountMapper& operator=(
const UserAccountMapper&) =
default;
561 virtual bool ice_isA(const ::std::string&
id, const ::Ice::Current& current =
::Ice::emptyCurrent)
const;
568 virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& current =
::Ice::emptyCurrent)
const;
575 virtual const ::std::string& ice_id(const ::Ice::Current& current =
::Ice::emptyCurrent)
const;
581 static const ::std::string& ice_staticId();
596 virtual ::std::string getUserAccount(const ::std::string& user, const ::Ice::Current& current =
::Ice::emptyCurrent) = 0;
598 bool _iceD_getUserAccount(::IceInternal::Incoming&, const ::Ice::Current&);
602 virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&);
608 virtual void _iceWriteImpl(::Ice::OutputStream*)
const;
609 virtual void _iceReadImpl(::Ice::InputStream*);
614inline bool operator==(
const UserAccountMapper& lhs,
const UserAccountMapper& rhs)
616 return static_cast<const ::Ice::Object&
>(lhs) ==
static_cast<const ::Ice::Object&
>(rhs);
619inline bool operator<(
const UserAccountMapper& lhs,
const UserAccountMapper& rhs)
621 return static_cast<const ::Ice::Object&
>(lhs) <
static_cast<const ::Ice::Object&
>(rhs);
632struct StreamableTraits< ::IceGrid::UserAccountNotFoundException>
634 static const StreamHelperCategory helper = StreamHelperCategoryUserException;
649class CallbackNC_UserAccountMapper_getUserAccount :
public Callback_UserAccountMapper_getUserAccount_Base,
public ::IceInternal::TwowayCallbackNC<T>
653 typedef IceUtil::Handle<T> TPtr;
655 typedef void (T::*Exception)(const ::Ice::Exception&);
656 typedef void (T::*Sent)(bool);
657 typedef void (T::*Response)(const ::std::string&);
659 CallbackNC_UserAccountMapper_getUserAccount(
const TPtr& obj, Response cb, Exception excb, Sent sentcb)
660 : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
665 virtual void completed(const ::Ice::AsyncResultPtr& result)
const
667 UserAccountMapperPrx proxy = UserAccountMapperPrx::uncheckedCast(result->getProxy());
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);
698template<
class T> Callback_UserAccountMapper_getUserAccountPtr
699newCallback_UserAccountMapper_getUserAccount(
const IceUtil::Handle<T>& instance,
void (T::*cb)(const ::std::string&),
void (T::*excb)(const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
701 return new CallbackNC_UserAccountMapper_getUserAccount<T>(instance, cb, excb, sentcb);
712template<
class T> Callback_UserAccountMapper_getUserAccountPtr
713newCallback_UserAccountMapper_getUserAccount(T* instance,
void (T::*cb)(const ::std::string&),
void (T::*excb)(const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
715 return new CallbackNC_UserAccountMapper_getUserAccount<T>(instance, cb, excb, sentcb);
723template<
class T,
typename CT>
724class Callback_UserAccountMapper_getUserAccount :
public Callback_UserAccountMapper_getUserAccount_Base,
public ::IceInternal::TwowayCallback<T, CT>
728 typedef IceUtil::Handle<T> TPtr;
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&);
734 Callback_UserAccountMapper_getUserAccount(
const TPtr& obj, Response cb, Exception excb, Sent sentcb)
735 : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
740 virtual void completed(const ::Ice::AsyncResultPtr& result)
const
742 UserAccountMapperPrx proxy = UserAccountMapperPrx::uncheckedCast(result->getProxy());
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()));
774template<
class T,
typename CT> Callback_UserAccountMapper_getUserAccountPtr
775newCallback_UserAccountMapper_getUserAccount(
const IceUtil::Handle<T>& instance,
void (T::*cb)(const ::std::string&,
const CT&),
void (T::*excb)(const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
777 return new Callback_UserAccountMapper_getUserAccount<T, CT>(instance, cb, excb, sentcb);
789template<
class T,
typename CT> Callback_UserAccountMapper_getUserAccountPtr
790newCallback_UserAccountMapper_getUserAccount(T* instance,
void (T::*cb)(const ::std::string&,
const CT&),
void (T::*excb)(const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
792 return new Callback_UserAccountMapper_getUserAccount<T, CT>(instance, cb, excb, sentcb);
#define ICEGRID_API
Definition Descriptor.h:58
#define ICE_MEMBER(API)
Definition Config.h:177
A user account mapper object is used by IceGrid nodes to map session identifiers to user accounts.
Definition UserAccountMapper.h:187
::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:203
auto getUserAccountAsync(const ::std::string &user, const ::Ice::Context &context=::Ice::noExplicitContext) -> decltype(::std::declval< P<::std::string > >().get_future())
Get the name of the user account for the given user.
Definition UserAccountMapper.h:220
::std::function< void()> getUserAccountAsync(const ::std::string &user, ::std::function< void(::std::string)> response, ::std::function< void(::std::exception_ptr)> ex=nullptr, ::std::function< void(bool)> sent=nullptr, const ::Ice::Context &context=::Ice::noExplicitContext)
Get the name of the user account for the given user.
Definition UserAccountMapper.h:241
static const ::std::string & ice_staticId()
Obtains the Slice type ID of this interface.
A user account mapper object is used by IceGrid nodes to map session identifiers to user accounts.
Definition UserAccountMapper.h:120
virtual::std::string ice_id(const ::Ice::Current ¤t) const override
Obtains a Slice type ID representing the most-derived interface supported by this object.
static const ::std::string & ice_staticId()
Obtains the Slice type ID corresponding to this class.
virtual bool ice_isA(::std::string id, const ::Ice::Current ¤t) const override
Determines whether this object supports an interface with the given Slice type ID.
UserAccountMapperPrx ProxyType
Definition UserAccountMapper.h:123
virtual ::std::vector<::std::string > ice_ids(const ::Ice::Current ¤t) const override
Obtains a list of the Slice type IDs representing the interfaces supported by this object.
virtual::std::string getUserAccount(::std::string user, const ::Ice::Current ¤t)=0
Get the name of the user account for the given user.
This exception is raised if a user account for a given session identifier can't be found.
Definition UserAccountMapper.h:80
static const ::std::string & ice_staticId()
Obtains the Slice type ID of this exception.
virtual ~UserAccountNotFoundException()
UserAccountNotFoundException(const UserAccountNotFoundException &)=default
UserAccountNotFoundException()=default
std::tuple ice_tuple() const
Obtains a tuple containing all of the exception's data members.
Definition UserAccountMapper.h:93
The base class for servants.
Definition Object.h:91
Helper template that supplies proxy factory functions.
Definition Proxy.h:1204
Helper template for the implementation of Ice::UserException.
Definition ExceptionHelpers.h:39
Definition BuiltinSequences.h:56
const Context noExplicitContext
Marker value used to indicate that no explicit context was passed to a proxy invocation.
::std::map<::std::string, ::std::string > Context
A request context.
Definition Current.h:68
const Current emptyCurrent
A default-initialized Current instance.
IceInternal::Handle< LocalObject > LocalObjectPtr
Definition LocalObjectF.h:17
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:136
bool operator==(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:184