Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
PropertiesAdmin.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.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 / 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// 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. It accepts:
95 /// - The property value. This value is empty if the property is not set.
96 /// @param exception The exception callback.
97 /// @param sent The sent callback.
98 /// @param context The request context.
99 /// @return A function that can be called to cancel the invocation locally.
100 // NOLINTNEXTLINE(modernize-use-nodiscard)
101 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;
102
103 /// @private
104 void _iceI_getProperty(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::string>>&, std::string_view, const Ice::Context&) const;
105
106 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
107 /// are returned.
108 /// @param prefix The prefix to search for. May be empty.
109 /// @param context The request context.
110 /// @return The matching property set.
111 PropertyDict getPropertiesForPrefix(std::string_view prefix, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
112
113 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
114 /// are returned.
115 /// @param prefix The prefix to search for. May be empty.
116 /// @param context The request context.
117 /// @return A future that becomes available when the invocation completes. This future holds:
118 /// - The matching property set.
119 [[nodiscard]] std::future<PropertyDict> getPropertiesForPrefixAsync(std::string_view prefix, const Ice::Context& context = Ice::noExplicitContext) const;
120
121 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
122 /// are returned.
123 /// @param prefix The prefix to search for. May be empty.
124 /// @param response The response callback. It accepts:
125 /// - The matching property set.
126 /// @param exception The exception callback.
127 /// @param sent The sent callback.
128 /// @param context The request context.
129 /// @return A function that can be called to cancel the invocation locally.
130 // NOLINTNEXTLINE(modernize-use-nodiscard)
131 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;
132
133 /// @private
134 void _iceI_getPropertiesForPrefix(const std::shared_ptr<IceInternal::OutgoingAsyncT<PropertyDict>>&, std::string_view, const Ice::Context&) const;
135
136 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
137 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
138 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
139 /// entries in @p newProperties are not affected by this update.
140 /// @param newProperties Properties to add, change, or remove.
141 /// @param context The request context.
142 void setProperties(const PropertyDict& newProperties, const Ice::Context& context = Ice::noExplicitContext) const;
143
144 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
145 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
146 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
147 /// entries in @p newProperties are not affected by this update.
148 /// @param newProperties Properties to add, change, or remove.
149 /// @param context The request context.
150 /// @return A future that becomes available when the invocation completes.
151 [[nodiscard]] std::future<void> setPropertiesAsync(const PropertyDict& newProperties, const Ice::Context& context = Ice::noExplicitContext) const;
152
153 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
154 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
155 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
156 /// entries in @p newProperties are not affected by this update.
157 /// @param newProperties Properties to add, change, or remove.
158 /// @param response The response callback.
159 /// @param exception The exception callback.
160 /// @param sent The sent callback.
161 /// @param context The request context.
162 /// @return A function that can be called to cancel the invocation locally.
163 // NOLINTNEXTLINE(modernize-use-nodiscard)
164 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;
165
166 /// @private
167 void _iceI_setProperties(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const PropertyDict&, const Ice::Context&) const;
168
169 /// Gets the type ID of the associated Slice interface.
170 /// @return The string `"::Ice::PropertiesAdmin"`.
171 static const char* ice_staticId() noexcept;
172
173 /// @private
174 static PropertiesAdminPrx _fromReference(IceInternal::ReferencePtr ref) { return PropertiesAdminPrx{std::move(ref)}; }
175
176 protected:
177 /// @private
178 PropertiesAdminPrx() = default;
179
180 /// @private
181 explicit PropertiesAdminPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
182 {
183 }
184 };
185}
186
187namespace Ice
188{
189 /// Provides remote access to the properties of a communicator.
190 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::PropertiesAdmin`.
191 /// @headerfile Ice/Ice.h
192 class ICE_API PropertiesAdmin : public virtual Ice::Object
193 {
194 public:
195 /// The associated proxy type.
197
198 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
199 /// @param request The incoming request.
200 /// @param sendResponse The callback to send the response.
201 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
202
203 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
204
205 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
206
207 /// Gets a property by key.
208 /// @param key The property key.
209 /// @param current The Current object of the incoming request.
210 /// @return The property value. This value is empty if the property is not set.
211 virtual std::string getProperty(std::string key, const Ice::Current& current) = 0;
212
213 /// @private
214 void _iceD_getProperty(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
215
216 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
217 /// are returned.
218 /// @param prefix The prefix to search for. May be empty.
219 /// @param current The Current object of the incoming request.
220 /// @return The matching property set.
221 virtual PropertyDict getPropertiesForPrefix(std::string prefix, const Ice::Current& current) = 0;
222
223 /// @private
224 void _iceD_getPropertiesForPrefix(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
225
226 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
227 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
228 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
229 /// entries in @p newProperties are not affected by this update.
230 /// @param newProperties Properties to add, change, or remove.
231 /// @param current The Current object of the incoming request.
232 virtual void setProperties(PropertyDict newProperties, const Ice::Current& current) = 0;
233
234 /// @private
235 void _iceD_setProperties(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
236
237 /// Gets the type ID of the associated Slice interface.
238 /// @return The string `"::Ice::PropertiesAdmin"`.
239 static const char* ice_staticId() noexcept;
240 };
241
242 /// A shared pointer to a PropertiesAdmin.
243 using PropertiesAdminPtr = std::shared_ptr<PropertiesAdmin>;
244}
245
246namespace Ice
247{
248 /// Provides remote access to the properties of a communicator.
249 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::PropertiesAdmin`.
250 /// @headerfile Ice/Ice.h
251 class ICE_API AsyncPropertiesAdmin : public virtual Ice::Object
252 {
253 public:
254 /// The associated proxy type.
256
257 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
258 /// @param request The incoming request.
259 /// @param sendResponse The callback to send the response.
260 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
261
262 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
263
264 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
265
266 /// Gets a property by key.
267 /// @param key The property key.
268 /// @param response The response callback. It accepts:
269 /// - The property value. This value is empty if the property is not set.
270 /// @param exception The exception callback.
271 /// @param current The Current object of the incoming request.
272 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;
273
274 /// @private
275 void _iceD_getProperty(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
276
277 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
278 /// are returned.
279 /// @param prefix The prefix to search for. May be empty.
280 /// @param response The response callback. It accepts:
281 /// - The matching property set.
282 /// @param exception The exception callback.
283 /// @param current The Current object of the incoming request.
284 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;
285
286 /// @private
287 void _iceD_getPropertiesForPrefix(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
288
289 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
290 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
291 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
292 /// entries in @p newProperties are not affected by this update.
293 /// @param newProperties Properties to add, change, or remove.
294 /// @param response The response callback.
295 /// @param exception The exception callback.
296 /// @param current The Current object of the incoming request.
297 virtual void setPropertiesAsync(PropertyDict newProperties, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
298
299 /// @private
300 void _iceD_setProperties(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
301
302 /// Gets the type ID of the associated Slice interface.
303 /// @return The string `"::Ice::PropertiesAdmin"`.
304 static const char* ice_staticId() noexcept;
305 };
306
307 /// A shared pointer to an AsyncPropertiesAdmin.
309}
310
311// NOLINTEND(modernize-concat-nested-namespaces)
312
313#include <Ice/PopDisableWarnings.h>
314#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:232
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:45
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