Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
UserAccountMapper.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.3
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 < 3
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. The Ice runtime calls this function from an Ice thread pool
111 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
112 /// function. It accepts:
113 /// - The user account name.
114 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
115 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
116 /// function.
117 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
118 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
119 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
120 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
121 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
122 /// asynchronous case.
123 /// @param context The request context.
124 /// @return A function that can be called to cancel the invocation locally.
125 // NOLINTNEXTLINE(modernize-use-nodiscard)
126 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;
127
128 /// @private
129 void _iceI_getUserAccount(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::string>>&, std::string_view, const Ice::Context&) const;
130
131 /// Gets the type ID of the associated Slice interface.
132 /// @return The string `"::IceGrid::UserAccountMapper"`.
133 static const char* ice_staticId() noexcept;
134
135 /// @private
136 static UserAccountMapperPrx _fromReference(IceInternal::ReferencePtr ref) { return UserAccountMapperPrx{std::move(ref)}; }
137
138 protected:
139 /// @private
140 UserAccountMapperPrx() = default;
141
142 /// @private
143 explicit UserAccountMapperPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
144 {
145 }
146 };
147}
148
149namespace IceGrid
150{
151 /// The exception that is thrown when a user account for a given session identifier can't be found.
152 /// @remarks The Slice compiler generated this exception class from Slice exception `::IceGrid::UserAccountNotFoundException`.
153 /// @headerfile IceGrid/IceGrid.h
155 {
156 public:
157 /// Gets the type ID of the associated Slice exception.
158 /// @return The string `"::IceGrid::UserAccountNotFoundException"`.
159 static const char* ice_staticId() noexcept;
160
161 [[nodiscard]] const char* ice_id() const noexcept override;
162
163 void ice_throw() const override;
164
165 protected:
166 /// @private
167 void _writeImpl(Ice::OutputStream*) const override;
168
169 /// @private
170 void _readImpl(Ice::InputStream*) override;
171 };
172}
173
174namespace IceGrid
175{
176 /// Maps user strings in server descriptors to actual user account names. You can configure the user account mapper
177 /// of an IceGrid node with the property `IceGrid.Node.UserAccountMapper`.
178 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::UserAccountMapper`.
179 /// @headerfile IceGrid/IceGrid.h
180 class ICEGRID_API UserAccountMapper : public virtual Ice::Object
181 {
182 public:
183 /// The associated proxy type.
185
186 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
187 /// @param request The incoming request.
188 /// @param sendResponse The callback to send the response.
189 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
190
191 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
192
193 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
194
195 /// Gets the name of the user account for the given user. This is used by IceGrid nodes to figure out the user
196 /// account to use to run servers.
197 /// @param user The value of the server descriptor's `user` attribute. When this attribute is not defined, and
198 /// the server's activation mode is `session`, the default value for `user` is the session identifier.
199 /// @param current The Current object of the incoming request.
200 /// @return The user account name.
201 /// @throws IceGrid::UserAccountNotFoundException Thrown when no user account is found for the given user.
202 virtual std::string getUserAccount(std::string user, const Ice::Current& current) = 0;
203
204 /// @private
205 void _iceD_getUserAccount(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
206
207 /// Gets the type ID of the associated Slice interface.
208 /// @return The string `"::IceGrid::UserAccountMapper"`.
209 static const char* ice_staticId() noexcept;
210 };
211
212 /// A shared pointer to an UserAccountMapper.
213 using UserAccountMapperPtr = std::shared_ptr<UserAccountMapper>;
214}
215
216namespace IceGrid
217{
218 /// Maps user strings in server descriptors to actual user account names. You can configure the user account mapper
219 /// of an IceGrid node with the property `IceGrid.Node.UserAccountMapper`.
220 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::IceGrid::UserAccountMapper`.
221 /// @headerfile IceGrid/IceGrid.h
222 class ICEGRID_API AsyncUserAccountMapper : public virtual Ice::Object
223 {
224 public:
225 /// The associated proxy type.
227
228 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
229 /// @param request The incoming request.
230 /// @param sendResponse The callback to send the response.
231 void dispatch(Ice::IncomingRequest& request, std::function<void(Ice::OutgoingResponse)> sendResponse) override;
232
233 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
234
235 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
236
237 /// Gets the name of the user account for the given user. This is used by IceGrid nodes to figure out the user
238 /// account to use to run servers.
239 /// @param user The value of the server descriptor's `user` attribute. When this attribute is not defined, and
240 /// the server's activation mode is `session`, the default value for `user` is the session identifier.
241 /// @param response The response callback. It accepts:
242 /// - The user account name.
243 /// @param exception The exception callback.
244 /// @param current The Current object of the incoming request.
245 /// @throws IceGrid::UserAccountNotFoundException Thrown when no user account is found for the given user.
246 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;
247
248 /// @private
249 void _iceD_getUserAccount(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
250
251 /// Gets the type ID of the associated Slice interface.
252 /// @return The string `"::IceGrid::UserAccountMapper"`.
253 static const char* ice_staticId() noexcept;
254 };
255
256 /// A shared pointer to an AsyncUserAccountMapper.
258}
259
260// NOLINTEND(modernize-concat-nested-namespaces)
261
262#include <Ice/PopDisableWarnings.h>
263#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:265
The base class for servants.
Definition Object.h:21
Represents the response to an incoming request.
Provides typed proxy functions.
Definition Proxy.h:48
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