Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
UserAccountMapper.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0
4// <auto-generated>Generated from Slice file 'UserAccountMapper.ice'.</auto-generated>
5// clang-format off
6
7#ifndef IceGrid_UserAccountMapper_h_
8#define IceGrid_UserAccountMapper_h_
9
11#include <Ice/Ice.h>
12#include <IceGrid/Config.h>
13
14#ifndef ICE_DISABLE_VERSION
15# if ICE_INT_VERSION / 100 != 308
16# error Ice version mismatch!
17# endif
18# if ICE_INT_VERSION % 100 >= 50
19# error Beta header file detected
20# endif
21# if ICE_INT_VERSION % 100 < 0
22# error Ice patch level mismatch!
23# endif
24#endif
25
26#ifndef ICEGRID_API
27# if defined(ICEGRID_API_EXPORTS)
28# define ICEGRID_API ICE_DECLSPEC_EXPORT
29# else
30# define ICEGRID_API ICE_DECLSPEC_IMPORT
31# endif
32#endif
33
34// NOLINTBEGIN(modernize-concat-nested-namespaces)
35
36namespace IceGrid
37{
39}
40
41namespace IceGrid
42{
43 /// Maps user strings in server descriptors to actual user account names. You can configure the user account mapper
44 /// of an IceGrid node with the property `IceGrid.Node.UserAccountMapper`.
45 /// @remarks The Slice compiler generated this proxy class from Slice interface `::IceGrid::UserAccountMapper`.
46 /// @headerfile IceGrid/IceGrid.h
47 class ICEGRID_API UserAccountMapperPrx : public Ice::Proxy<UserAccountMapperPrx, Ice::ObjectPrx>
48 {
49 public:
50 /// Constructs a proxy from a Communicator and a proxy string.
51 /// @param communicator The communicator of the new proxy.
52 /// @param proxyString The proxy string to parse.
53 UserAccountMapperPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
54
55 /// Copy constructor. Constructs with a copy of the contents of @p other.
56 /// @param other The proxy to copy from.
57 UserAccountMapperPrx(const UserAccountMapperPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
58
59 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
60 /// @param other The proxy to move from.
61 UserAccountMapperPrx(UserAccountMapperPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
62
63 ~UserAccountMapperPrx() override;
64
65 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
66 /// @param rhs The proxy to copy from.
67 /// @return A reference to this proxy.
69 {
70 if (this != &rhs)
71 {
73 }
74 return *this;
75 }
76
77 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
78 /// @param rhs The proxy to move from.
80 {
81 if (this != &rhs)
82 {
83 Ice::ObjectPrx::operator=(std::move(rhs));
84 }
85 return *this;
86 }
87
88 /// Gets the name of the user account for the given user. This is used by IceGrid nodes to figure out the user
89 /// account to use to run servers.
90 /// @param user The value of the server descriptor's `user` attribute. When this attribute is not defined, and
91 /// the server's activation mode is `session`, the default value for `user` is the session identifier.
92 /// @param context The request context.
93 /// @return The user account name.
94 /// @throws IceGrid::UserAccountNotFoundException Thrown when no user account is found for the given user.
95 std::string getUserAccount(std::string_view user, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
96
97 /// Gets the name of the user account for the given user. This is used by IceGrid nodes to figure out the user
98 /// account to use to run servers.
99 /// @param user The value of the server descriptor's `user` attribute. When this attribute is not defined, and
100 /// the server's activation mode is `session`, the default value for `user` is the session identifier.
101 /// @param context The request context.
102 /// @return A future that becomes available when the invocation completes. This future holds:
103 /// - The user account name.
104 [[nodiscard]] std::future<std::string> getUserAccountAsync(std::string_view user, const Ice::Context& context = Ice::noExplicitContext) const;
105
106 /// Gets the name of the user account for the given user. This is used by IceGrid nodes to figure out the user
107 /// account to use to run servers.
108 /// @param user The value of the server descriptor's `user` attribute. When this attribute is not defined, and
109 /// the server's activation mode is `session`, the default value for `user` is the session identifier.
110 /// @param response The response callback. It accepts:
111 /// - The user account name.
112 /// @param exception The exception callback.
113 /// @param sent The sent callback.
114 /// @param context The request context.
115 /// @return A function that can be called to cancel the invocation locally.
116 // NOLINTNEXTLINE(modernize-use-nodiscard)
117 std::function<void()> getUserAccountAsync(std::string_view user, std::function<void(std::string)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
118
119 /// @private
120 void _iceI_getUserAccount(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::string>>&, std::string_view, const Ice::Context&) const;
121
122 /// Gets the type ID of the associated Slice interface.
123 /// @return The string `"::IceGrid::UserAccountMapper"`.
124 static const char* ice_staticId() noexcept;
125
126 /// @private
127 static UserAccountMapperPrx _fromReference(IceInternal::ReferencePtr ref) { return UserAccountMapperPrx{std::move(ref)}; }
128
129 protected:
130 /// @private
131 UserAccountMapperPrx() = default;
132
133 /// @private
134 explicit UserAccountMapperPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
135 {
136 }
137 };
138}
139
140namespace IceGrid
141{
142 /// The exception that is thrown when a user account for a given session identifier can't be found.
143 /// @remarks The Slice compiler generated this exception class from Slice exception `::IceGrid::UserAccountNotFoundException`.
144 /// @headerfile IceGrid/IceGrid.h
146 {
147 public:
148 /// Gets the type ID of the associated Slice exception.
149 /// @return The string `"::IceGrid::UserAccountNotFoundException"`.
150 static const char* ice_staticId() noexcept;
151
152 [[nodiscard]] const char* ice_id() const noexcept override;
153
154 void ice_throw() const override;
155
156 protected:
157 /// @private
158 void _writeImpl(Ice::OutputStream*) const override;
159
160 /// @private
161 void _readImpl(Ice::InputStream*) override;
162 };
163}
164
165namespace IceGrid
166{
167 /// Maps user strings in server descriptors to actual user account names. You can configure the user account mapper
168 /// of an IceGrid node with the property `IceGrid.Node.UserAccountMapper`.
169 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::UserAccountMapper`.
170 /// @headerfile IceGrid/IceGrid.h
171 class ICEGRID_API UserAccountMapper : public virtual Ice::Object
172 {
173 public:
174 /// The associated proxy type.
176
177 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
178 /// @param request The incoming request.
179 /// @param sendResponse The callback to send the response.
180 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
181
182 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
183
184 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
185
186 /// Gets the name of the user account for the given user. This is used by IceGrid nodes to figure out the user
187 /// account to use to run servers.
188 /// @param user The value of the server descriptor's `user` attribute. When this attribute is not defined, and
189 /// the server's activation mode is `session`, the default value for `user` is the session identifier.
190 /// @param current The Current object of the incoming request.
191 /// @return The user account name.
192 /// @throws IceGrid::UserAccountNotFoundException Thrown when no user account is found for the given user.
193 virtual std::string getUserAccount(std::string user, const Ice::Current& current) = 0;
194
195 /// @private
196 void _iceD_getUserAccount(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
197
198 /// Gets the type ID of the associated Slice interface.
199 /// @return The string `"::IceGrid::UserAccountMapper"`.
200 static const char* ice_staticId() noexcept;
201 };
202
203 /// A shared pointer to an UserAccountMapper.
204 using UserAccountMapperPtr = std::shared_ptr<UserAccountMapper>;
205}
206
207namespace IceGrid
208{
209 /// Maps user strings in server descriptors to actual user account names. You can configure the user account mapper
210 /// of an IceGrid node with the property `IceGrid.Node.UserAccountMapper`.
211 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::UserAccountMapper`.
212 /// @headerfile IceGrid/IceGrid.h
213 class ICEGRID_API AsyncUserAccountMapper : public virtual Ice::Object
214 {
215 public:
216 /// The associated proxy type.
218
219 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
220 /// @param request The incoming request.
221 /// @param sendResponse The callback to send the response.
222 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
223
224 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
225
226 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
227
228 /// Gets the name of the user account for the given user. This is used by IceGrid nodes to figure out the user
229 /// account to use to run servers.
230 /// @param user The value of the server descriptor's `user` attribute. When this attribute is not defined, and
231 /// the server's activation mode is `session`, the default value for `user` is the session identifier.
232 /// @param response The response callback. It accepts:
233 /// - The user account name.
234 /// @param exception The exception callback.
235 /// @param current The Current object of the incoming request.
236 /// @throws IceGrid::UserAccountNotFoundException Thrown when no user account is found for the given user.
237 virtual void getUserAccountAsync(std::string user, std::function<void(std::string_view returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
238
239 /// @private
240 void _iceD_getUserAccount(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
241
242 /// Gets the type ID of the associated Slice interface.
243 /// @return The string `"::IceGrid::UserAccountMapper"`.
244 static const char* ice_staticId() noexcept;
245 };
246
247 /// A shared pointer to an AsyncUserAccountMapper.
249}
250
251// NOLINTEND(modernize-concat-nested-namespaces)
252
253#include <Ice/PopDisableWarnings.h>
254#endif
void dispatch(Ice::IncomingRequest &request, std::function< void(Ice::OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
UserAccountMapperPrx ProxyType
The associated proxy type.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of Slice type IDs.
virtual void getUserAccountAsync(std::string user, std::function< void(std::string_view returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Gets the name of the user account for the given user.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
Maps user strings in server descriptors to actual user account names.
std::future< std::string > getUserAccountAsync(std::string_view user, const Ice::Context &context=Ice::noExplicitContext) const
Gets the name of the user account for the given user.
std::function< void()> getUserAccountAsync(std::string_view user, std::function< void(std::string)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets the name of the user account for the given user.
UserAccountMapperPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
UserAccountMapperPrx(const UserAccountMapperPrx &other) noexcept
Copy constructor.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
UserAccountMapperPrx & operator=(const UserAccountMapperPrx &rhs) noexcept
Copy assignment operator.
std::string getUserAccount(std::string_view user, const Ice::Context &context=Ice::noExplicitContext) const
Gets the name of the user account for the given user.
UserAccountMapperPrx & operator=(UserAccountMapperPrx &&rhs) noexcept
Move assignment operator.
UserAccountMapperPrx(UserAccountMapperPrx &&other) noexcept
Move constructor.
Maps user strings in server descriptors to actual user account names.
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of Slice type IDs.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
UserAccountMapperPrx ProxyType
The associated proxy type.
virtual std::string getUserAccount(std::string user, const Ice::Current &current)=0
Gets the name of the user account for the given user.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
void dispatch(Ice::IncomingRequest &request, std::function< void(Ice::OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
Maps user strings in server descriptors to actual user account names.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
void ice_throw() const override
Throws this exception.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
The exception that is thrown when a user account for a given session identifier can't be found.
Represents a request received by a connection.
ObjectPrx & operator=(const ObjectPrx &rhs) noexcept=default
Copy assignment operator.
The base class for all Ice proxies.
Definition Proxy.h:232
The base class for servants.
Definition Object.h:21
Represents the response to an incoming request.
Provides typed proxy functions.
Definition Proxy.h:45
Abstract base class for all exceptions defined in Slice.
std::shared_ptr< UserAccountMapper > UserAccountMapperPtr
A shared pointer to an UserAccountMapper.
std::shared_ptr< AsyncUserAccountMapper > AsyncUserAccountMapperPtr
A shared pointer to an AsyncUserAccountMapper.
Deploy and manage Ice servers.
Definition Admin.h:40
std::shared_ptr< Communicator > CommunicatorPtr
A shared pointer to a Communicator.
const Context noExplicitContext
Marker value used to indicate that no explicit request context was passed to a proxy invocation.
std::map< std::string, std::string, std::less<> > Context
Represents additional information carried by an Ice request.
Definition Context.h:34
The Ice RPC framework.
Definition SampleEvent.h:66
Provides information about an incoming request being dispatched.
Definition Current.h:18