Ice 3.9
C++ API Reference
Loading...
Searching...
No Matches
PropertiesAdmin.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.9.0-alpha.0
4// <auto-generated>Generated from Slice file 'PropertiesAdmin.ice'.</auto-generated>
5// clang-format off
6
7#ifndef Ice_PropertiesAdmin_h_
8#define Ice_PropertiesAdmin_h_
9
11#include <Ice/Ice.h>
12#include "PropertyDict.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// NOLINTBEGIN(modernize-concat-nested-namespaces)
21
22namespace Ice
23{
25}
26
27namespace Ice
28{
29 /// Provides remote access to the properties of a communicator.
30 /// @remarks The Slice compiler generated this proxy class from Slice interface `::Ice::PropertiesAdmin`.
31 /// @headerfile Ice/Ice.h
32 class ICE_API PropertiesAdminPrx : public Ice::Proxy<PropertiesAdminPrx, Ice::ObjectPrx>
33 {
34 public:
35 /// Constructs a proxy from a Communicator and a proxy string.
36 /// @param communicator The communicator of the new proxy.
37 /// @param proxyString The proxy string to parse.
38 PropertiesAdminPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
39
40 /// Copy constructor. Constructs with a copy of the contents of @p other.
41 /// @param other The proxy to copy from.
42 PropertiesAdminPrx(const PropertiesAdminPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
43
44 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
45 /// @param other The proxy to move from.
46 PropertiesAdminPrx(PropertiesAdminPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
47
48 ~PropertiesAdminPrx() override;
49
50 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
51 /// @param rhs The proxy to copy from.
52 /// @return A reference to this proxy.
54 {
55 if (this != &rhs)
56 {
58 }
59 return *this;
60 }
61
62 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
63 /// @param rhs The proxy to move from.
65 {
66 if (this != &rhs)
67 {
68 Ice::ObjectPrx::operator=(std::move(rhs));
69 }
70 return *this;
71 }
72
73 /// Gets a property by key.
74 /// @param key The property key.
75 /// @param context The request context.
76 /// @return The property value. This value is empty if the property is not set.
77 std::string getProperty(std::string_view key, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
78
79 /// Gets a property by key.
80 /// @param key The property key.
81 /// @param context The request context.
82 /// @return A future that becomes available when the invocation completes. This future holds:
83 /// - The property value. This value is empty if the property is not set.
84 [[nodiscard]] std::future<std::string> getPropertyAsync(std::string_view key, const Ice::Context& context = Ice::noExplicitContext) const;
85
86 /// Gets a property by key.
87 /// @param key The property key.
88 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
89 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
90 /// function. It accepts:
91 /// - The property value. This value is empty if the property is not set.
92 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
93 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
94 /// function.
95 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
96 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
97 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
98 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
99 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
100 /// asynchronous case.
101 /// @param context The request context.
102 /// @return A function that can be called to cancel the invocation locally.
103 // NOLINTNEXTLINE(modernize-use-nodiscard)
104 std::function<void()> getPropertyAsync(std::string_view key, 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;
105
106 /// @private
107 void _iceI_getProperty(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::string>>&, std::string_view, const Ice::Context&) const;
108
109 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
110 /// are returned.
111 /// @param prefix The prefix to search for. May be empty.
112 /// @param context The request context.
113 /// @return The matching property set.
114 PropertyDict getPropertiesForPrefix(std::string_view prefix, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
115
116 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
117 /// are returned.
118 /// @param prefix The prefix to search for. May be empty.
119 /// @param context The request context.
120 /// @return A future that becomes available when the invocation completes. This future holds:
121 /// - The matching property set.
122 [[nodiscard]] std::future<PropertyDict> getPropertiesForPrefixAsync(std::string_view prefix, const Ice::Context& context = Ice::noExplicitContext) const;
123
124 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
125 /// are returned.
126 /// @param prefix The prefix to search for. May be empty.
127 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
128 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
129 /// function. It accepts:
130 /// - The matching property set.
131 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
132 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
133 /// function.
134 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
135 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
136 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
137 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
138 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
139 /// asynchronous case.
140 /// @param context The request context.
141 /// @return A function that can be called to cancel the invocation locally.
142 // NOLINTNEXTLINE(modernize-use-nodiscard)
143 std::function<void()> getPropertiesForPrefixAsync(std::string_view prefix, std::function<void(::Ice::PropertyDict)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
144
145 /// @private
146 void _iceI_getPropertiesForPrefix(const std::shared_ptr<IceInternal::OutgoingAsyncT<PropertyDict>>&, std::string_view, const Ice::Context&) const;
147
148 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
149 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
150 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
151 /// entries in @p newProperties are not affected by this update.
152 /// @param newProperties Properties to add, change, or remove.
153 /// @param context The request context.
154 void setProperties(const PropertyDict& newProperties, const Ice::Context& context = Ice::noExplicitContext) const;
155
156 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
157 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
158 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
159 /// entries in @p newProperties are not affected by this update.
160 /// @param newProperties Properties to add, change, or remove.
161 /// @param context The request context.
162 /// @return A future that becomes available when the invocation completes.
163 [[nodiscard]] std::future<void> setPropertiesAsync(const PropertyDict& newProperties, const Ice::Context& context = Ice::noExplicitContext) const;
164
165 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
166 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
167 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
168 /// entries in @p newProperties are not affected by this update.
169 /// @param newProperties Properties to add, change, or remove.
170 /// @param response The response callback. The Ice runtime calls this function from an Ice thread pool
171 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
172 /// function.
173 /// @param exception The exception callback. The Ice runtime calls this function from an Ice thread pool
174 /// thread. If you set Ice::InitializationData::executor, the executor determines the thread that executes this
175 /// function.
176 /// @param sent The sent callback. The Ice runtime calls this function when the request is accepted by the
177 /// transport. When the request is accepted synchronously, the Ice runtime calls this function from the current
178 /// thread and passes `true` as argument. When the request is accepted asynchronously, the Ice runtime calls
179 /// this function from an Ice thread pool thread and passes `false` as argument. If you set
180 /// Ice::InitializationData::executor, the executor determines the thread that executes this function in the
181 /// asynchronous case.
182 /// @param context The request context.
183 /// @return A function that can be called to cancel the invocation locally.
184 /// @remark When this proxy is a oneway or datagram proxy, the Ice runtime does not call the response
185 /// callback: a successful invocation completes with the sent callback. When this proxy is a batch
186 /// proxy, this function only adds the request to the batch: the Ice runtime calls none of the
187 /// callbacks, and the request is sent later, by a flush.
188 // NOLINTNEXTLINE(modernize-use-nodiscard)
189 std::function<void()> setPropertiesAsync(const PropertyDict& newProperties, std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
190
191 /// @private
192 void _iceI_setProperties(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const PropertyDict&, const Ice::Context&) const;
193
194 /// Gets the type ID of the associated Slice interface.
195 /// @return The string `"::Ice::PropertiesAdmin"`.
196 static const char* ice_staticId() noexcept;
197
198 /// @private
199 static PropertiesAdminPrx _fromReference(IceInternal::ReferencePtr ref) { return PropertiesAdminPrx{std::move(ref)}; }
200
201 protected:
202 /// @private
203 PropertiesAdminPrx() = default;
204
205 /// @private
206 explicit PropertiesAdminPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
207 {
208 }
209 };
210}
211
212namespace Ice
213{
214 /// Provides remote access to the properties of a communicator.
215 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::PropertiesAdmin`.
216 /// @headerfile Ice/Ice.h
217 class ICE_API PropertiesAdmin : public virtual Ice::Object
218 {
219 public:
220 /// The associated proxy type.
222
223 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
224 /// @param request The incoming request.
225 /// @param sendResponse The callback to send the response.
226 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
227
228 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
229
230 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
231
232 /// Gets a property by key.
233 /// @param key The property key.
234 /// @param current The Current object of the incoming request.
235 /// @return The property value. This value is empty if the property is not set.
236 virtual std::string getProperty(std::string key, const Ice::Current& current) = 0;
237
238 /// @private
239 void _iceD_getProperty(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
240
241 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
242 /// are returned.
243 /// @param prefix The prefix to search for. May be empty.
244 /// @param current The Current object of the incoming request.
245 /// @return The matching property set.
246 virtual PropertyDict getPropertiesForPrefix(std::string prefix, const Ice::Current& current) = 0;
247
248 /// @private
249 void _iceD_getPropertiesForPrefix(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
250
251 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
252 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
253 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
254 /// entries in @p newProperties are not affected by this update.
255 /// @param newProperties Properties to add, change, or remove.
256 /// @param current The Current object of the incoming request.
257 virtual void setProperties(PropertyDict newProperties, const Ice::Current& current) = 0;
258
259 /// @private
260 void _iceD_setProperties(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
261
262 /// Gets the type ID of the associated Slice interface.
263 /// @return The string `"::Ice::PropertiesAdmin"`.
264 static const char* ice_staticId() noexcept;
265 };
266
267 /// A shared pointer to a PropertiesAdmin.
268 using PropertiesAdminPtr = std::shared_ptr<PropertiesAdmin>;
269}
270
271namespace Ice
272{
273 /// Provides remote access to the properties of a communicator.
274 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::PropertiesAdmin`.
275 /// @headerfile Ice/Ice.h
276 class ICE_API AsyncPropertiesAdmin : public virtual Ice::Object
277 {
278 public:
279 /// The associated proxy type.
281
282 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
283 /// @param request The incoming request.
284 /// @param sendResponse The callback to send the response.
285 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
286
287 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
288
289 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
290
291 /// Gets a property by key.
292 /// @param key The property key.
293 /// @param response The response callback. It accepts:
294 /// - The property value. This value is empty if the property is not set.
295 /// @param exception The exception callback.
296 /// @param current The Current object of the incoming request.
297 virtual void getPropertyAsync(std::string key, std::function<void(std::string_view returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
298
299 /// @private
300 void _iceD_getProperty(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
301
302 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
303 /// are returned.
304 /// @param prefix The prefix to search for. May be empty.
305 /// @param response The response callback. It accepts:
306 /// - The matching property set.
307 /// @param exception The exception callback.
308 /// @param current The Current object of the incoming request.
309 virtual void getPropertiesForPrefixAsync(std::string prefix, std::function<void(const PropertyDict& returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
310
311 /// @private
312 void _iceD_getPropertiesForPrefix(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
313
314 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
315 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
316 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
317 /// entries in @p newProperties are not affected by this update.
318 /// @param newProperties Properties to add, change, or remove.
319 /// @param response The response callback.
320 /// @param exception The exception callback.
321 /// @param current The Current object of the incoming request.
322 virtual void setPropertiesAsync(PropertyDict newProperties, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
323
324 /// @private
325 void _iceD_setProperties(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
326
327 /// Gets the type ID of the associated Slice interface.
328 /// @return The string `"::Ice::PropertiesAdmin"`.
329 static const char* ice_staticId() noexcept;
330 };
331
332 /// A shared pointer to an AsyncPropertiesAdmin.
334}
335
336// NOLINTEND(modernize-concat-nested-namespaces)
337
338#include <Ice/PopDisableWarnings.h>
339#endif
void dispatch(IncomingRequest &request, std::function< void(OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
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.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
virtual void setPropertiesAsync(PropertyDict newProperties, std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Updates the communicator's properties with the given property set.
virtual void getPropertiesForPrefixAsync(std::string prefix, std::function< void(const PropertyDict &returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Gets all properties whose keys begin with prefix.
PropertiesAdminPrx ProxyType
The associated proxy type.
virtual void getPropertyAsync(std::string key, std::function< void(std::string_view returnValue)> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Gets a property by key.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
Provides remote access to the properties of a communicator.
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.
std::string getProperty(std::string_view key, const Ice::Context &context=Ice::noExplicitContext) const
Gets a property by key.
std::function< void()> getPropertyAsync(std::string_view key, 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 a property by key.
std::future< PropertyDict > getPropertiesForPrefixAsync(std::string_view prefix, const Ice::Context &context=Ice::noExplicitContext) const
Gets all properties whose keys begin with prefix.
std::function< void()> getPropertiesForPrefixAsync(std::string_view prefix, std::function< void(::Ice::PropertyDict)> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Gets all properties whose keys begin with prefix.
std::future< std::string > getPropertyAsync(std::string_view key, const Ice::Context &context=Ice::noExplicitContext) const
Gets a property by key.
std::function< void()> setPropertiesAsync(const PropertyDict &newProperties, std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Updates the communicator's properties with the given property set.
PropertyDict getPropertiesForPrefix(std::string_view prefix, const Ice::Context &context=Ice::noExplicitContext) const
Gets all properties whose keys begin with prefix.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::future< void > setPropertiesAsync(const PropertyDict &newProperties, const Ice::Context &context=Ice::noExplicitContext) const
Updates the communicator's properties with the given property set.
PropertiesAdminPrx & operator=(PropertiesAdminPrx &&rhs) noexcept
Move assignment operator.
PropertiesAdminPrx & operator=(const PropertiesAdminPrx &rhs) noexcept
Copy assignment operator.
PropertiesAdminPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
void setProperties(const PropertyDict &newProperties, const Ice::Context &context=Ice::noExplicitContext) const
Updates the communicator's properties with the given property set.
PropertiesAdminPrx(const PropertiesAdminPrx &other) noexcept
Copy constructor.
PropertiesAdminPrx(PropertiesAdminPrx &&other) noexcept
Move constructor.
Provides remote access to the properties of a communicator.
PropertiesAdminPrx ProxyType
The associated proxy type.
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
virtual void setProperties(PropertyDict newProperties, const Ice::Current &current)=0
Updates the communicator's properties with the given property set.
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 PropertyDict getPropertiesForPrefix(std::string prefix, const Ice::Current &current)=0
Gets all properties whose keys begin with prefix.
void dispatch(IncomingRequest &request, std::function< void(OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
virtual std::string getProperty(std::string key, const Ice::Current &current)=0
Gets a property by key.
Provides remote access to the properties of a communicator.
Provides typed proxy functions.
Definition Proxy.h:48
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::shared_ptr< PropertiesAdmin > PropertiesAdminPtr
A shared pointer to a PropertiesAdmin.
std::shared_ptr< AsyncPropertiesAdmin > AsyncPropertiesAdminPtr
A shared pointer to an AsyncPropertiesAdmin.
std::map< std::string, std::string, std::less<> > PropertyDict
A simple collection of properties, represented as a dictionary of key/value pairs.
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