Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
PropertiesAdmin.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.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 != 30850
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 /// @headerfile Ice/Ice.h
31 class ICE_API PropertiesAdminPrx : public Ice::Proxy<PropertiesAdminPrx, Ice::ObjectPrx>
32 {
33 public:
34 /// Constructs a proxy from a Communicator and a proxy string.
35 /// @param communicator The communicator of the new proxy.
36 /// @param proxyString The proxy string to parse.
37 PropertiesAdminPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
38
39 /// Copy constructor. Constructs with a copy of the contents of @p other.
40 /// @param other The proxy to copy from.
41 PropertiesAdminPrx(const PropertiesAdminPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
42
43 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
44 /// @param other The proxy to move from.
45 PropertiesAdminPrx(PropertiesAdminPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
46
47 ~PropertiesAdminPrx() override;
48
49 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
50 /// @param rhs The proxy to copy from.
51 /// @return A reference to this proxy.
53 {
54 if (this != &rhs)
55 {
57 }
58 return *this;
59 }
60
61 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
62 /// @param rhs The proxy to move from.
64 {
65 if (this != &rhs)
66 {
67 Ice::ObjectPrx::operator=(std::move(rhs));
68 }
69 return *this;
70 }
71
72 /// Gets a property by key.
73 /// @param key The property key.
74 /// @param context The request context.
75 /// @return The property value. This value is empty if the property is not set.
76 std::string getProperty(std::string_view key, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
77
78 /// Gets a property by key.
79 /// @param key The property key.
80 /// @param context The request context.
81 /// @return A future that becomes available when the invocation completes. This future holds:
82 /// - The property value. This value is empty if the property is not set.
83 [[nodiscard]] std::future<std::string> getPropertyAsync(std::string_view key, const Ice::Context& context = Ice::noExplicitContext) const;
84
85 /// Gets a property by key.
86 /// @param key The property key.
87 /// @param response The response callback. It accepts:
88 /// - The property value. This value is empty if the property is not set.
89 /// @param exception The exception callback.
90 /// @param sent The sent callback.
91 /// @param context The request context.
92 /// @return A function that can be called to cancel the invocation locally.
93 // NOLINTNEXTLINE(modernize-use-nodiscard)
94 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;
95
96 /// @private
97 void _iceI_getProperty(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::string>>&, std::string_view, const Ice::Context&) const;
98
99 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
100 /// are returned.
101 /// @param prefix The prefix to search for. May be empty.
102 /// @param context The request context.
103 /// @return The matching property set.
104 PropertyDict getPropertiesForPrefix(std::string_view prefix, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
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 A future that becomes available when the invocation completes. This future holds:
111 /// - The matching property set.
112 [[nodiscard]] std::future<PropertyDict> getPropertiesForPrefixAsync(std::string_view prefix, const Ice::Context& context = Ice::noExplicitContext) const;
113
114 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
115 /// are returned.
116 /// @param prefix The prefix to search for. May be empty.
117 /// @param response The response callback. It accepts:
118 /// - The matching property set.
119 /// @param exception The exception callback.
120 /// @param sent The sent callback.
121 /// @param context The request context.
122 /// @return A function that can be called to cancel the invocation locally.
123 // NOLINTNEXTLINE(modernize-use-nodiscard)
124 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;
125
126 /// @private
127 void _iceI_getPropertiesForPrefix(const std::shared_ptr<IceInternal::OutgoingAsyncT<PropertyDict>>&, std::string_view, const Ice::Context&) const;
128
129 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
130 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
131 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
132 /// entries in @p newProperties are not affected by this update.
133 /// @param newProperties Properties to add, change, or remove.
134 /// @param context The request context.
135 void setProperties(const PropertyDict& newProperties, const Ice::Context& context = Ice::noExplicitContext) const;
136
137 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
138 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
139 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
140 /// entries in @p newProperties are not affected by this update.
141 /// @param newProperties Properties to add, change, or remove.
142 /// @param context The request context.
143 /// @return A future that becomes available when the invocation completes.
144 [[nodiscard]] std::future<void> setPropertiesAsync(const PropertyDict& newProperties, const Ice::Context& context = Ice::noExplicitContext) const;
145
146 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
147 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
148 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
149 /// entries in @p newProperties are not affected by this update.
150 /// @param newProperties Properties to add, change, or remove.
151 /// @param response The response callback.
152 /// @param exception The exception callback.
153 /// @param sent The sent callback.
154 /// @param context The request context.
155 /// @return A function that can be called to cancel the invocation locally.
156 // NOLINTNEXTLINE(modernize-use-nodiscard)
157 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;
158
159 /// @private
160 void _iceI_setProperties(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const PropertyDict&, const Ice::Context&) const;
161
162 /// Gets the type ID of the associated Slice interface.
163 /// @return The string `"::Ice::PropertiesAdmin"`.
164 static const char* ice_staticId() noexcept;
165
166 /// @private
167 static PropertiesAdminPrx _fromReference(IceInternal::ReferencePtr ref) { return PropertiesAdminPrx{std::move(ref)}; }
168
169 protected:
170 /// @private
171 PropertiesAdminPrx() = default;
172
173 /// @private
174 explicit PropertiesAdminPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
175 {
176 }
177 };
178}
179
180namespace Ice
181{
182 /// Provides remote access to the properties of a communicator.
183 /// @headerfile Ice/Ice.h
184 class ICE_API PropertiesAdmin : public virtual Ice::Object
185 {
186 public:
187 /// The associated proxy type.
189
190 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
191 /// @param request The incoming request.
192 /// @param sendResponse The callback to send the response.
193 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
194
195 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
196
197 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
198
199 /// Gets a property by key.
200 /// @param key The property key.
201 /// @param current The Current object of the incoming request.
202 /// @return The property value. This value is empty if the property is not set.
203 virtual std::string getProperty(std::string key, const Ice::Current& current) = 0;
204
205 /// @private
206 void _iceD_getProperty(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
207
208 /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string then all properties
209 /// are returned.
210 /// @param prefix The prefix to search for. May be empty.
211 /// @param current The Current object of the incoming request.
212 /// @return The matching property set.
213 virtual PropertyDict getPropertiesForPrefix(std::string prefix, const Ice::Current& current) = 0;
214
215 /// @private
216 void _iceD_getPropertiesForPrefix(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
217
218 /// Updates the communicator's properties with the given property set. If an entry in @p newProperties matches
219 /// the name of an existing property, that property's value is replaced with the new value. If the new value is
220 /// the empty string, the property is removed. Existing properties that are not modified or removed by the
221 /// entries in @p newProperties are not affected by this update.
222 /// @param newProperties Properties to add, change, or remove.
223 /// @param current The Current object of the incoming request.
224 virtual void setProperties(PropertyDict newProperties, const Ice::Current& current) = 0;
225
226 /// @private
227 void _iceD_setProperties(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
228
229 /// Gets the type ID of the associated Slice interface.
230 /// @return The string `"::Ice::PropertiesAdmin"`.
231 static const char* ice_staticId() noexcept;
232 };
233
234 /// A shared pointer to a PropertiesAdmin.
235 using PropertiesAdminPtr = std::shared_ptr<PropertiesAdmin>;
236}
237
238// NOLINTEND(modernize-concat-nested-namespaces)
239
240#include <Ice/PopDisableWarnings.h>
241#endif
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 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::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:59
Provides information about an incoming request being dispatched.
Definition Current.h:18