Ice 3.7 C++98 API Reference
Loading...
Searching...
No Matches
UserAccountMapper.h
Go to the documentation of this file.
1//
2// Copyright (c) ZeroC, Inc. All rights reserved.
3//
4//
5// Ice version 3.7.11
6//
7// <auto-generated>
8//
9// Generated from file `UserAccountMapper.ice'
10//
11// Warning: do not edit this file.
12//
13// </auto-generated>
14//
15
16#ifndef __IceGrid_UserAccountMapper_h__
17#define __IceGrid_UserAccountMapper_h__
18
20#include <Ice/ProxyF.h>
21#include <Ice/ObjectF.h>
22#include <Ice/ValueF.h>
23#include <Ice/Exception.h>
24#include <Ice/LocalObject.h>
25#include <Ice/StreamHelpers.h>
26#include <Ice/Comparable.h>
27#include <Ice/Proxy.h>
28#include <Ice/Object.h>
29#include <Ice/GCObject.h>
30#include <Ice/Value.h>
31#include <Ice/Incoming.h>
33#include <IceUtil/ScopedArray.h>
34#include <Ice/Optional.h>
37#include <IceGrid/Config.h>
38
39#ifndef ICE_IGNORE_VERSION
40# if ICE_INT_VERSION / 100 != 307
41# error Ice version mismatch!
42# endif
43# if ICE_INT_VERSION % 100 >= 50
44# error Beta header file detected
45# endif
46# if ICE_INT_VERSION % 100 < 11
47# error Ice patch level mismatch!
48# endif
49#endif
50
51#ifndef ICEGRID_API
52# if defined(ICE_STATIC_LIBS)
53# define ICEGRID_API /**/
54# elif defined(ICEGRID_API_EXPORTS)
55# define ICEGRID_API ICE_DECLSPEC_EXPORT
56# else
57# define ICEGRID_API ICE_DECLSPEC_IMPORT
58# endif
59#endif
60
61#ifdef ICE_CPP11_MAPPING // C++11 mapping
62
63namespace IceGrid
64{
65
66class UserAccountMapper;
68
69}
70
71namespace IceGrid
72{
73
79class ICE_CLASS(ICEGRID_API) UserAccountNotFoundException : public ::Ice::UserExceptionHelper<UserAccountNotFoundException, ::Ice::UserException>
80{
81public:
82
83 ICE_MEMBER(ICEGRID_API) virtual ~UserAccountNotFoundException();
84
85 UserAccountNotFoundException(const UserAccountNotFoundException&) = default;
86
87 UserAccountNotFoundException() = default;
88
93 std::tuple<> ice_tuple() const
94 {
95 return std::tie();
96 }
97
102 ICE_MEMBER(ICEGRID_API) static const ::std::string& ice_staticId();
103};
104
106static UserAccountNotFoundException _iceS_UserAccountNotFoundException_init;
108
109}
110
111namespace IceGrid
112{
113
119class ICEGRID_API UserAccountMapper : public virtual ::Ice::Object
120{
121public:
122
123 using ProxyType = UserAccountMapperPrx;
124
131 virtual bool ice_isA(::std::string id, const ::Ice::Current& current) const override;
132
138 virtual ::std::vector<::std::string> ice_ids(const ::Ice::Current& current) const override;
139
145 virtual ::std::string ice_id(const ::Ice::Current& current) const override;
146
151 static const ::std::string& ice_staticId();
152
166 virtual ::std::string getUserAccount(::std::string user, const ::Ice::Current& current) = 0;
168 bool _iceD_getUserAccount(::IceInternal::Incoming&, const ::Ice::Current&);
170
172 virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&) override;
174};
175
176}
177
178namespace IceGrid
179{
180
186class ICE_CLASS(ICEGRID_API) UserAccountMapperPrx : public virtual ::Ice::Proxy<UserAccountMapperPrx, ::Ice::ObjectPrx>
187{
188public:
189
203 ::std::string getUserAccount(const ::std::string& user, const ::Ice::Context& context = ::Ice::noExplicitContext)
204 {
205 return _makePromiseOutgoing<::std::string>(true, this, &UserAccountMapperPrx::_iceI_getUserAccount, user, context).get();
206 }
207
219 template<template<typename> class P = ::std::promise>
220 auto getUserAccountAsync(const ::std::string& user, const ::Ice::Context& context = ::Ice::noExplicitContext)
221 -> decltype(::std::declval<P<::std::string>>().get_future())
222 {
223 return _makePromiseOutgoing<::std::string, P>(false, this, &UserAccountMapperPrx::_iceI_getUserAccount, user, context);
224 }
225
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,
245 const ::Ice::Context& context = ::Ice::noExplicitContext)
246 {
247 return _makeLambdaOutgoing<::std::string>(std::move(response), std::move(ex), std::move(sent), this, &IceGrid::UserAccountMapperPrx::_iceI_getUserAccount, user, context);
248 }
249
251 ICE_MEMBER(ICEGRID_API) void _iceI_getUserAccount(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::std::string>>&, const ::std::string&, const ::Ice::Context&);
253
258 ICE_MEMBER(ICEGRID_API) static const ::std::string& ice_staticId();
259
260protected:
261
263 UserAccountMapperPrx() = default;
264 friend ::std::shared_ptr<UserAccountMapperPrx> IceInternal::createProxy<UserAccountMapperPrx>();
265
266 ICE_MEMBER(ICEGRID_API) virtual ::std::shared_ptr<::Ice::ObjectPrx> _newInstance() const override;
268};
269
270}
271
273namespace Ice
274{
275
276}
278
280namespace IceGrid
281{
282
283using UserAccountMapperPtr = ::std::shared_ptr<UserAccountMapper>;
284using UserAccountMapperPrxPtr = ::std::shared_ptr<UserAccountMapperPrx>;
285
286}
288
289#else // C++98 mapping
290
291namespace IceProxy
292{
293
294namespace IceGrid
295{
296
299ICEGRID_API void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< UserAccountMapper>&);
300ICEGRID_API ::IceProxy::Ice::Object* upCast(UserAccountMapper*);
302
303}
304
305}
306
307namespace IceGrid
308{
309
312ICEGRID_API ::Ice::Object* upCast(UserAccountMapper*);
314typedef ::IceInternal::Handle< UserAccountMapper> UserAccountMapperPtr;
315typedef ::IceInternal::ProxyHandle< ::IceProxy::IceGrid::UserAccountMapper> UserAccountMapperPrx;
318ICEGRID_API void _icePatchObjectPtr(UserAccountMapperPtr&, const ::Ice::ObjectPtr&);
320
321}
322
323namespace IceGrid
324{
325
332{
333public:
334
336
337#ifdef ICE_CPP11_COMPILER
340#else
342#endif
343
348 virtual ::std::string ice_id() const;
357 virtual void ice_throw() const;
358
359protected:
360
362 virtual void _writeImpl(::Ice::OutputStream*) const;
363 virtual void _readImpl(::Ice::InputStream*);
365};
366
368static UserAccountNotFoundException _iceS_UserAccountNotFoundException_init;
370
371}
372
373namespace IceGrid
374{
375
381class Callback_UserAccountMapper_getUserAccount_Base : public virtual ::IceInternal::CallbackBase { };
382typedef ::IceUtil::Handle< Callback_UserAccountMapper_getUserAccount_Base> Callback_UserAccountMapper_getUserAccountPtr;
383
384}
385
386namespace IceProxy
387{
388
389namespace IceGrid
390{
391
392class ICE_CLASS(ICEGRID_API) UserAccountMapper : public virtual ::Ice::Proxy<UserAccountMapper, ::IceProxy::Ice::Object>
393{
394public:
395
409 ICE_MEMBER(ICEGRID_API) ::std::string getUserAccount(const ::std::string& user, const ::Ice::Context& context = ::Ice::noExplicitContext)
410 {
411 return end_getUserAccount(_iceI_begin_getUserAccount(user, context, ::IceInternal::dummyCallback, 0, true));
412 }
413
425 ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::Ice::Context& context = ::Ice::noExplicitContext)
426 {
427 return _iceI_begin_getUserAccount(user, context, ::IceInternal::dummyCallback, 0);
428 }
429
442 ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
443 {
444 return _iceI_begin_getUserAccount(user, ::Ice::noExplicitContext, cb, cookie);
445 }
446
460 ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
461 {
462 return _iceI_begin_getUserAccount(user, context, cb, cookie);
463 }
464
477 ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::IceGrid::Callback_UserAccountMapper_getUserAccountPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
478 {
479 return _iceI_begin_getUserAccount(user, ::Ice::noExplicitContext, cb, cookie);
480 }
481
495 ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::Ice::Context& context, const ::IceGrid::Callback_UserAccountMapper_getUserAccountPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
496 {
497 return _iceI_begin_getUserAccount(user, context, cb, cookie);
498 }
499
507 ICE_MEMBER(ICEGRID_API) ::std::string end_getUserAccount(const ::Ice::AsyncResultPtr& result);
508
509private:
510
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);
512
513public:
514
519 ICE_MEMBER(ICEGRID_API) static const ::std::string& ice_staticId();
520
521protected:
523
524 ICE_MEMBER(ICEGRID_API) virtual ::IceProxy::Ice::Object* _newInstance() const;
526};
527
528}
529
530}
531
532namespace IceGrid
533{
534
541{
542public:
543
546
548
549#ifdef ICE_CPP11_COMPILER
550 UserAccountMapper() = default;
551 UserAccountMapper(const UserAccountMapper&) = default;
553#endif
554
561 virtual bool ice_isA(const ::std::string& id, const ::Ice::Current& current = ::Ice::emptyCurrent) const;
562
568 virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& current = ::Ice::emptyCurrent) const;
569
575 virtual const ::std::string& ice_id(const ::Ice::Current& current = ::Ice::emptyCurrent) const;
576
581 static const ::std::string& ice_staticId();
582
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&);
600
602 virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&);
604
605protected:
606
608 virtual void _iceWriteImpl(::Ice::OutputStream*) const;
609 virtual void _iceReadImpl(::Ice::InputStream*);
611};
612
614inline bool operator==(const UserAccountMapper& lhs, const UserAccountMapper& rhs)
615{
616 return static_cast<const ::Ice::Object&>(lhs) == static_cast<const ::Ice::Object&>(rhs);
617}
618
619inline bool operator<(const UserAccountMapper& lhs, const UserAccountMapper& rhs)
620{
621 return static_cast<const ::Ice::Object&>(lhs) < static_cast<const ::Ice::Object&>(rhs);
622}
624
625}
626
628namespace Ice
629{
630
631template<>
632struct StreamableTraits< ::IceGrid::UserAccountNotFoundException>
633{
634 static const StreamHelperCategory helper = StreamHelperCategoryUserException;
635};
636
637}
639
640namespace IceGrid
641{
642
648template<class T>
650{
651public:
652
654
655 typedef void (T::*Exception)(const ::Ice::Exception&);
656 typedef void (T::*Sent)(bool);
657 typedef void (T::*Response)(const ::std::string&);
658
660 : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
661 {
662 }
663
665 virtual void completed(const ::Ice::AsyncResultPtr& result) const
666 {
667 UserAccountMapperPrx proxy = UserAccountMapperPrx::uncheckedCast(result->getProxy());
668 ::std::string ret;
669 try
670 {
671 ret = proxy->end_getUserAccount(result);
672 }
673 catch(const ::Ice::Exception& ex)
674 {
675 ::IceInternal::CallbackNC<T>::exception(result, ex);
676 return;
677 }
678 if(_response)
679 {
680 (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(ret);
681 }
682 }
684
685private:
686
687 Response _response;
688};
689
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)
700{
701 return new CallbackNC_UserAccountMapper_getUserAccount<T>(instance, cb, excb, sentcb);
702}
703
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)
714{
715 return new CallbackNC_UserAccountMapper_getUserAccount<T>(instance, cb, excb, sentcb);
716}
717
723template<class T, typename CT>
724class Callback_UserAccountMapper_getUserAccount : public Callback_UserAccountMapper_getUserAccount_Base, public ::IceInternal::TwowayCallback<T, CT>
725{
726public:
727
729
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&);
733
735 : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
736 {
737 }
738
740 virtual void completed(const ::Ice::AsyncResultPtr& result) const
741 {
742 UserAccountMapperPrx proxy = UserAccountMapperPrx::uncheckedCast(result->getProxy());
743 ::std::string ret;
744 try
745 {
746 ret = proxy->end_getUserAccount(result);
747 }
748 catch(const ::Ice::Exception& ex)
749 {
750 ::IceInternal::Callback<T, CT>::exception(result, ex);
751 return;
752 }
753 if(_response)
754 {
755 (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie()));
756 }
757 }
759
760private:
761
762 Response _response;
763};
764
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)
776{
777 return new Callback_UserAccountMapper_getUserAccount<T, CT>(instance, cb, excb, sentcb);
778}
779
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)
791{
792 return new Callback_UserAccountMapper_getUserAccount<T, CT>(instance, cb, excb, sentcb);
793}
794
795}
796
797#endif
798
800#endif
#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 ::std::vector< ::std::string > ice_ids(const ::Ice::Current &current=::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 &current=::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 &current=::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 &current=::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::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
Definition Handle.h:143
Shared & operator=(const Shared &)
Definition Shared.h:94
Interface for input streams used to extract Slice types from a sequence of bytes.
Definition InputStream.h:50
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
Definition Admin.h:7204
::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 Metrics.h:211
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 *)