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