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