zeroc-ice 3.8.0 → 3.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/dist/IceRuby/Operation.cpp +22 -6
  3. data/dist/IceRuby/Slice.cpp +1 -1
  4. data/dist/ice/cpp/include/Ice/Communicator.h +4 -4
  5. data/dist/ice/cpp/include/Ice/Config.h +2 -2
  6. data/dist/ice/cpp/include/Ice/Connection.h +3 -3
  7. data/dist/ice/cpp/include/Ice/Endpoint.h +2 -2
  8. data/dist/ice/cpp/include/Ice/Exception.h +1 -1
  9. data/dist/ice/cpp/include/Ice/Initialize.h +1 -1
  10. data/dist/ice/cpp/include/Ice/LocalExceptions.h +22 -1
  11. data/dist/ice/cpp/include/Ice/Logger.h +3 -3
  12. data/dist/ice/cpp/include/Ice/NativePropertiesAdmin.h +2 -0
  13. data/dist/ice/cpp/include/Ice/ObjectAdapter.h +3 -3
  14. data/dist/ice/cpp/include/Ice/ObserverHelper.h +1 -0
  15. data/dist/ice/cpp/include/Ice/OutputStream.h +27 -5
  16. data/dist/ice/cpp/include/Ice/Properties.h +3 -3
  17. data/dist/ice/cpp/include/Ice/Proxy.h +1 -1
  18. data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +10 -2
  19. data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +10 -2
  20. data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +2 -2
  21. data/dist/ice/cpp/include/generated/Ice/Context.h +2 -2
  22. data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +2 -2
  23. data/dist/ice/cpp/include/generated/Ice/Identity.h +2 -2
  24. data/dist/ice/cpp/include/generated/Ice/Locator.h +9 -11
  25. data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +2 -2
  26. data/dist/ice/cpp/include/generated/Ice/Metrics.h +7 -7
  27. data/dist/ice/cpp/include/generated/Ice/OperationMode.h +2 -2
  28. data/dist/ice/cpp/include/generated/Ice/Process.h +2 -2
  29. data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +2 -2
  30. data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +2 -2
  31. data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +2 -2
  32. data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +8 -4
  33. data/dist/ice/cpp/include/generated/Ice/Router.h +7 -7
  34. data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +2 -2
  35. data/dist/ice/cpp/include/generated/Ice/Version.h +2 -2
  36. data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +2 -2
  37. data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +2 -2
  38. data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +5 -3
  39. data/dist/ice/cpp/src/Ice/ConnectionFactory.h +8 -8
  40. data/dist/ice/cpp/src/Ice/ConnectionI.cpp +28 -11
  41. data/dist/ice/cpp/src/Ice/ConnectionI.h +1 -1
  42. data/dist/ice/cpp/src/Ice/Demangle.cpp +1 -0
  43. data/dist/ice/cpp/src/Ice/FileUtil.cpp +3 -67
  44. data/dist/ice/cpp/src/Ice/FileUtil.h +0 -3
  45. data/dist/ice/cpp/src/Ice/IPEndpointI.cpp +4 -0
  46. data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +1 -1
  47. data/dist/ice/cpp/src/Ice/InputStream.cpp +28 -17
  48. data/dist/ice/cpp/src/Ice/LocalException.cpp +1 -1
  49. data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +6 -0
  50. data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +1 -1
  51. data/dist/ice/cpp/src/Ice/OutgoingResponse.cpp +127 -127
  52. data/dist/ice/cpp/src/Ice/OutgoingResponseInternal.h +21 -0
  53. data/dist/ice/cpp/src/Ice/OutputStream.cpp +80 -115
  54. data/dist/ice/cpp/src/Ice/PropertyNames.cpp +3 -2
  55. data/dist/ice/cpp/src/Ice/ProxyFunctions.cpp +4 -4
  56. data/dist/ice/cpp/src/Ice/Reference.cpp +15 -15
  57. data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +16 -13
  58. data/dist/ice/cpp/src/Ice/ResourceConfig.h +2 -2
  59. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +29 -20
  60. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.h +1 -2
  61. data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +14 -3
  62. data/dist/ice/cpp/src/Ice/SSL/RFC2253.cpp +3 -3
  63. data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.cpp +1 -1
  64. data/dist/ice/cpp/src/Ice/SSL/SSLEngine.h +4 -10
  65. data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +21 -2
  66. data/dist/ice/cpp/src/Ice/SSL/SSLUtil.h +15 -1
  67. data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +67 -48
  68. data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.h +1 -5
  69. data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +14 -2
  70. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +111 -15
  71. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.h +7 -2
  72. data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.h +1 -1
  73. data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +3 -16
  74. data/dist/ice/cpp/src/Ice/SSL/TrustManager.cpp +12 -1
  75. data/dist/ice/cpp/src/Ice/ServantManager.h +1 -1
  76. data/dist/ice/cpp/src/Ice/StringConverter.cpp +4 -0
  77. data/dist/ice/cpp/src/Ice/TcpEndpointI.cpp +2 -2
  78. data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +2 -2
  79. data/dist/ice/cpp/src/Ice/WSAcceptor.cpp +8 -3
  80. data/dist/ice/cpp/src/Ice/WSAcceptor.h +5 -1
  81. data/dist/ice/cpp/src/Ice/WSEndpoint.cpp +45 -2
  82. data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +118 -7
  83. data/dist/ice/cpp/src/Ice/WSTransceiver.h +12 -1
  84. data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +2 -2
  85. data/dist/ice/cpp/src/Ice/generated/Context.cpp +2 -2
  86. data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +2 -2
  87. data/dist/ice/cpp/src/Ice/generated/Identity.cpp +2 -2
  88. data/dist/ice/cpp/src/Ice/generated/Locator.cpp +2 -2
  89. data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +2 -2
  90. data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +2 -2
  91. data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +2 -2
  92. data/dist/ice/cpp/src/Ice/generated/Process.cpp +2 -2
  93. data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +2 -2
  94. data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +2 -2
  95. data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +2 -2
  96. data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +4 -2
  97. data/dist/ice/cpp/src/Ice/generated/Router.cpp +2 -2
  98. data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +2 -2
  99. data/dist/ice/cpp/src/Ice/generated/Version.cpp +2 -2
  100. data/dist/ice/cpp/src/IceDiscovery/LocatorI.cpp +2 -2
  101. data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +4 -3
  102. data/dist/ice/cpp/src/IceDiscovery/LookupI.h +2 -1
  103. data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +2 -2
  104. data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +6 -18
  105. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +2 -2
  106. data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +6 -6
  107. data/dist/ice/cpp/src/Slice/DocCommentParser.h +4 -2
  108. data/dist/ice/cpp/src/Slice/FileTracker.h +1 -0
  109. data/dist/ice/cpp/src/Slice/Grammar.cpp +261 -264
  110. data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +39 -7
  111. data/dist/ice/cpp/src/Slice/MetadataValidation.h +3 -2
  112. data/dist/ice/cpp/src/Slice/Parser.cpp +192 -155
  113. data/dist/ice/cpp/src/Slice/Parser.h +44 -9
  114. data/dist/ice/cpp/src/Slice/Preprocessor.cpp +76 -20
  115. data/dist/ice/cpp/src/Slice/Preprocessor.h +0 -1
  116. data/dist/ice/cpp/src/Slice/Scanner.cpp +1 -1
  117. data/dist/ice/cpp/src/Slice/SliceUtil.cpp +44 -58
  118. data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +3 -10
  119. data/dist/ice/cpp/src/Slice/Util.h +7 -3
  120. data/dist/ice/cpp/src/slice2rb/Main.cpp +2 -2
  121. data/dist/ice/cpp/src/slice2rb/Ruby.cpp +1 -1
  122. data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +10 -8
  123. data/dist/ice/cpp/src/slice2rb/RubyUtil.h +10 -13
  124. data/dist/ice/mcpp/directive.c +5 -2
  125. data/dist/ice/mcpp/mcpp_main.c +1 -1
  126. data/dist/ice/mcpp/support.c +6 -6
  127. data/dist/ice/mcpp/system.c +5 -5
  128. data/dist/ice/slice/Ice/Identity.ice +3 -0
  129. data/dist/ice/slice/Ice/Locator.ice +6 -5
  130. data/dist/ice/slice/Ice/LocatorRegistry.ice +3 -0
  131. data/dist/ice/slice/Ice/Metrics.ice +1 -1
  132. data/dist/ice/slice/Ice/OperationMode.ice +8 -0
  133. data/dist/ice/slice/Ice/Process.ice +3 -0
  134. data/dist/ice/slice/Ice/ReplyStatus.ice +13 -0
  135. data/dist/lib/Glacier2/Metrics.rb +1 -1
  136. data/dist/lib/Glacier2/PermissionsVerifier.rb +3 -3
  137. data/dist/lib/Glacier2/Router.rb +8 -8
  138. data/dist/lib/Glacier2/SSLInfo.rb +1 -1
  139. data/dist/lib/Glacier2/Session.rb +15 -15
  140. data/dist/lib/Ice/BuiltinSequences.rb +1 -1
  141. data/dist/lib/Ice/Context.rb +1 -1
  142. data/dist/lib/Ice/EndpointTypes.rb +1 -1
  143. data/dist/lib/Ice/Identity.rb +1 -1
  144. data/dist/lib/Ice/LocalExceptions.rb +3 -0
  145. data/dist/lib/Ice/Locator.rb +5 -5
  146. data/dist/lib/Ice/LocatorRegistry.rb +4 -4
  147. data/dist/lib/Ice/Metrics.rb +7 -7
  148. data/dist/lib/Ice/OperationMode.rb +1 -1
  149. data/dist/lib/Ice/Process.rb +3 -3
  150. data/dist/lib/Ice/PropertiesAdmin.rb +4 -4
  151. data/dist/lib/Ice/PropertyDict.rb +1 -1
  152. data/dist/lib/Ice/ProxyFunctions.rb +8 -4
  153. data/dist/lib/Ice/RemoteLogger.rb +6 -6
  154. data/dist/lib/Ice/ReplyStatus.rb +3 -2
  155. data/dist/lib/Ice/Router.rb +5 -5
  156. data/dist/lib/Ice/SliceChecksumDict.rb +1 -1
  157. data/dist/lib/Ice/Version.rb +1 -1
  158. data/dist/lib/IceBox/ServiceManager.rb +8 -8
  159. data/dist/lib/IceGrid/Admin.rb +83 -83
  160. data/dist/lib/IceGrid/Descriptor.rb +1 -1
  161. data/dist/lib/IceGrid/Exception.rb +1 -1
  162. data/dist/lib/IceGrid/FileParser.rb +2 -2
  163. data/dist/lib/IceGrid/Registry.rb +13 -13
  164. data/dist/lib/IceGrid/Session.rb +6 -6
  165. data/dist/lib/IceGrid/UserAccountMapper.rb +2 -2
  166. data/dist/lib/IceStorm/IceStorm.rb +16 -16
  167. data/dist/lib/IceStorm/Metrics.rb +1 -1
  168. data/ice.gemspec +1 -1
  169. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5ea8ace37949a5a1a570cacb3aec87a89c574682a7e4bce1e9d5151c781e1e8
4
- data.tar.gz: 93ba83989cac3865c8c541f673388a2864efecd0f4519ae6242be4b4ba45c362
3
+ metadata.gz: aa4154bd37d4df0c510b9737d68ad939fd5168b8f96c5c4f627fbbe9916720ce
4
+ data.tar.gz: 492eecaf69cd8e94539ad50a178183b5674d9e7960602f29b0dd63ae725499ff
5
5
  SHA512:
6
- metadata.gz: 5f11cea3787b888af6f67b5e497d616539f639e78f37087e7c65b722bf7118aeb3bd42b6a7e3b73cc84adfc3a43e62597d7de69e63435544bfd04571f72ad376
7
- data.tar.gz: 0b7e687a92fb5033f6b5c92a1ce40ca4dbf1575c655179ef365daf8c432d4db4b71fbfb00193158430359f605d45dbe2be154a4671c75c4552128e3c2de51f5a
6
+ metadata.gz: 63299394740124d99d1e5a83a4d384084682a026bc819a778467ac94325355fee31967c1c354b8cd001d93bb3ad3d9deedc3f22d5a9be88269349fadcde35bc6
7
+ data.tar.gz: a5bc4d318e83bb949c2b6578f25c1fca7a34d8cabcd6c1047823dec67a2633db6b9128ae1d6169a9a004c217fe2935c30c6175d8bb51ba536d50d458b31c0133
@@ -38,7 +38,7 @@ namespace IceRuby
38
38
  class OperationI final : public Operation
39
39
  {
40
40
  public:
41
- OperationI(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
41
+ OperationI(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
42
42
 
43
43
  VALUE invoke(const Ice::ObjectPrx&, VALUE, VALUE) final;
44
44
  void deprecate(const string&) final;
@@ -56,6 +56,7 @@ namespace IceRuby
56
56
  ExceptionInfoList _exceptions;
57
57
  bool _sendsClasses;
58
58
  bool _returnsClasses;
59
+ bool _onewayOnly;
59
60
  string _deprecateMessage;
60
61
 
61
62
  void convertParams(VALUE, ParamInfoList&, long, bool&);
@@ -65,6 +66,7 @@ namespace IceRuby
65
66
  VALUE unmarshalException(const vector<byte>&, const Ice::CommunicatorPtr&);
66
67
  bool validateException(VALUE) const;
67
68
  void checkTwowayOnly(const Ice::ObjectPrx&) const;
69
+ void checkOnewayOnly(const Ice::ObjectPrx&) const;
68
70
  };
69
71
  using OperationIPtr = shared_ptr<OperationI>;
70
72
  }
@@ -94,12 +96,13 @@ IceRuby_defineOperation(
94
96
  VALUE inParams,
95
97
  VALUE outParams,
96
98
  VALUE returnType,
97
- VALUE exceptions)
99
+ VALUE exceptions,
100
+ VALUE onewayOnly)
98
101
  {
99
102
  ICE_RUBY_TRY
100
103
  {
101
- OperationIPtr op =
102
- make_shared<OperationI>(sliceName, mappedName, mode, format, inParams, outParams, returnType, exceptions);
104
+ OperationIPtr op = make_shared<
105
+ OperationI>(sliceName, mappedName, mode, format, inParams, outParams, returnType, exceptions, onewayOnly);
103
106
  return TypedData_Wrap_Struct(_operationClass, &IceRuby_OperationType, new OperationPtr(op));
104
107
  }
105
108
  ICE_RUBY_CATCH
@@ -162,7 +165,8 @@ IceRuby::OperationI::OperationI(
162
165
  VALUE inParams,
163
166
  VALUE outParams,
164
167
  VALUE returnType,
165
- VALUE exceptions)
168
+ VALUE exceptions,
169
+ VALUE onewayOnly)
166
170
  {
167
171
  _sliceName = getString(name);
168
172
  _mappedName = getString(mapped);
@@ -245,6 +249,8 @@ IceRuby::OperationI::OperationI(
245
249
  {
246
250
  _exceptions.push_back(getException(RARRAY_AREF(exceptions, i)));
247
251
  }
252
+
253
+ _onewayOnly = onewayOnly == Qtrue;
248
254
  }
249
255
 
250
256
  VALUE
@@ -266,6 +272,7 @@ IceRuby::OperationI::invoke(const Ice::ObjectPrx& proxy, VALUE args, VALUE hctx)
266
272
  }
267
273
 
268
274
  checkTwowayOnly(proxy);
275
+ checkOnewayOnly(proxy);
269
276
 
270
277
  //
271
278
  // Invoke the operation.
@@ -596,10 +603,19 @@ IceRuby::OperationI::checkTwowayOnly(const Ice::ObjectPrx& proxy) const
596
603
  }
597
604
  }
598
605
 
606
+ void
607
+ IceRuby::OperationI::checkOnewayOnly(const Ice::ObjectPrx& proxy) const
608
+ {
609
+ if (_onewayOnly && proxy->ice_isTwoway())
610
+ {
611
+ throw Ice::OnewayOnlyException{__FILE__, __LINE__, _sliceName};
612
+ }
613
+ }
614
+
599
615
  bool
600
616
  IceRuby::initOperation(VALUE iceModule)
601
617
  {
602
- rb_define_module_function(iceModule, "__defineOperation", CAST_METHOD(IceRuby_defineOperation), 8);
618
+ rb_define_module_function(iceModule, "__defineOperation", CAST_METHOD(IceRuby_defineOperation), 9);
603
619
 
604
620
  //
605
621
  // Define a class to represent an operation.
@@ -100,7 +100,7 @@ IceRuby_loadSlice(int argc, VALUE* argv, VALUE /*self*/)
100
100
  throw RubyException(rb_eArgError, "Slice preprocessing failed");
101
101
  }
102
102
 
103
- unit = Unit::createUnit("ruby", all);
103
+ unit = Unit::createUnit("ruby", {.all = all});
104
104
  int parseStatus = unit->parse(file, preprocessedHandle, debug);
105
105
 
106
106
  preprocessor->close();
@@ -36,8 +36,8 @@ namespace Ice
36
36
  public:
37
37
  ~Communicator();
38
38
 
39
- /// Destroys this communicator. This function calls #shutdown implicitly. Calling #destroy destroys all
40
- /// object adapters, and closes all outgoing connections. This method waits for all outstanding dispatches to
39
+ /// Destroys this communicator. This function calls #shutdown implicitly. Calling this function destroys all
40
+ /// object adapters, and closes all outgoing connections. This function waits for all outstanding dispatches to
41
41
  /// complete before returning. This includes "bidirectional dispatches" that execute on outgoing connections.
42
42
  /// @see CommunicatorHolder
43
43
  void destroy() noexcept;
@@ -277,14 +277,14 @@ namespace Ice
277
277
  [[nodiscard]] std::future<void> flushBatchRequestsAsync(CompressBatch compress);
278
278
 
279
279
  /// Adds the Admin object with all its facets to the provided object adapter. If `Ice.Admin.ServerId`
280
- /// is set and the provided object adapter has a Locator, #createAdmin registers the Admin's Process facet with
280
+ /// is set and the provided object adapter has a Locator, this function registers the Admin's Process facet with
281
281
  /// the Locator's LocatorRegistry.
282
282
  /// @param adminAdapter The object adapter used to host the Admin object; if it is null and
283
283
  /// `Ice.Admin.Endpoints` is set, this function uses the `Ice.Admin` object adapter, after creating and
284
284
  /// activating this adapter.
285
285
  /// @param adminId The identity of the Admin object.
286
286
  /// @return A proxy to the main ("") facet of the Admin object.
287
- /// @throws InitializationException Thrown when #createAdmin is called more than once.
287
+ /// @throws InitializationException Thrown when this function is called more than once.
288
288
  /// @see #getAdmin
289
289
  ObjectPrx createAdmin(const ObjectAdapterPtr& adminAdapter, const Identity& adminId);
290
290
 
@@ -35,8 +35,8 @@
35
35
  #endif
36
36
 
37
37
  // The Ice version.
38
- #define ICE_STRING_VERSION "3.8.0" // "A.B.C", with A=major, B=minor, C=patch
39
- #define ICE_INT_VERSION 30800 // AABBCC, with AA=major, BB=minor, CC=patch
38
+ #define ICE_STRING_VERSION "3.8.2" // "A.B.C", with A=major, B=minor, C=patch
39
+ #define ICE_INT_VERSION 30802 // AABBCC, with AA=major, BB=minor, CC=patch
40
40
  #define ICE_SO_VERSION "38" // "ABC", with A=major, B=minor, C=patch
41
41
 
42
42
  #if defined(_MSC_VER) && !defined(ICE_BUILDING_SLICE_COMPILERS) // Not using the IceUtil static build
@@ -25,7 +25,7 @@
25
25
 
26
26
  namespace Ice
27
27
  {
28
- /// Represents batch compression options when flushing queued batch requests.
28
+ /// Represents batch compression options for flushing queued batch requests.
29
29
  enum class CompressBatch : std::uint8_t
30
30
  {
31
31
  /// Compress the batch requests.
@@ -124,8 +124,8 @@ namespace Ice
124
124
  /// @return A future that becomes available when the flush completes.
125
125
  [[nodiscard]] std::future<void> flushBatchRequestsAsync(CompressBatch compress);
126
126
 
127
- /// Sets a close callback on the connection. The callback is called by the connection when it's closed. The
128
- /// callback is called from the Ice thread pool associated with the connection.
127
+ /// Sets a close callback on the connection. The callback is called by the connection when it's closed.
128
+ /// The callback is called from the Ice thread pool associated with the connection.
129
129
  /// @param callback The close callback object.
130
130
  virtual void setCloseCallback(CloseCallback callback) = 0;
131
131
 
@@ -20,8 +20,8 @@
20
20
 
21
21
  namespace Ice
22
22
  {
23
- /// An endpoint specifies the address of the server-end of an Ice connection: an object adapter listens on one or
24
- /// more endpoints and a client establishes a connection to an endpoint.
23
+ /// An endpoint specifies the address of the server-end of an Ice connection.
24
+ /// An object adapter listens on one or more endpoints and a client establishes a connection to an endpoint.
25
25
  /// @headerfile Ice/Ice.h
26
26
  class ICE_API Endpoint
27
27
  {
@@ -34,7 +34,7 @@ namespace Ice
34
34
  /// Returns the type ID of this exception. This corresponds to the Slice type ID for Slice-defined exceptions,
35
35
  /// and to a fully scoped name for other exceptions. For example
36
36
  /// "::Ice::CommunicatorDestroyedException".
37
- /// @return The type ID of this exception
37
+ /// @return The type ID of this exception.
38
38
  [[nodiscard]] virtual const char* ice_id() const noexcept = 0;
39
39
 
40
40
  /// Outputs a description of this exception to a stream.
@@ -124,7 +124,7 @@ namespace Ice
124
124
 
125
125
  /// Converts a stringified identity into an Identity.
126
126
  /// @param str The stringified identity.
127
- /// @return An Identity containing the name and category components.
127
+ /// @return An Identity created from the provided string.
128
128
  ICE_API Identity stringToIdentity(std::string_view str);
129
129
 
130
130
  /// Converts an Identity into a string using the specified mode.
@@ -785,7 +785,7 @@ namespace Ice
785
785
  [[nodiscard]] const char* ice_id() const noexcept final;
786
786
  };
787
787
 
788
- /// The exception that is thrown when an ObjectAdapter cannot be activated. This can happen when the locator
788
+ /// The exception that is thrown when an ObjectAdapter cannot be activated. This can happen when a Locator
789
789
  /// implementation detects another active ObjectAdapter with the same adapter ID.
790
790
  /// @headerfile Ice/Ice.h
791
791
  class ICE_API ObjectAdapterIdInUseException final : public LocalException
@@ -856,6 +856,27 @@ namespace Ice
856
856
  [[nodiscard]] const char* ice_id() const noexcept final;
857
857
  };
858
858
 
859
+ /// The exception that is thrown when attempting to invoke a oneway-only operation (an operation with the
860
+ /// ["oneway"] metadata directive) using a twoway proxy.
861
+ /// @headerfile Ice/Ice.h
862
+ class ICE_API OnewayOnlyException final : public LocalException
863
+ {
864
+ public:
865
+ /// Constructs an OnewayOnlyException.
866
+ /// @param file The file where this exception is constructed. This C string is not copied.
867
+ /// @param line The line where this exception is constructed.
868
+ /// @param operation The oneway-only operation used to create the message returned by what().
869
+ OnewayOnlyException(const char* file, int line, std::string_view operation)
870
+ : LocalException(
871
+ file,
872
+ line,
873
+ "cannot invoke oneway operation '" + std::string{operation} + "' with a twoway proxy")
874
+ {
875
+ }
876
+
877
+ [[nodiscard]] const char* ice_id() const noexcept final;
878
+ };
879
+
859
880
  /// The exception that is thrown when a property cannot be set or retrieved. For example, this exception is thrown
860
881
  /// when attempting to set an unknown Ice property.
861
882
  class ICE_API PropertyException final : public LocalException
@@ -28,8 +28,8 @@ namespace Ice
28
28
  // send the message to C APIs that require null-terminated strings.
29
29
  // The message itself is also often constructed from a string produced by an ostringstream.
30
30
 
31
- /// Prints a message. The message is printed literally, without any decorations such as executable name or
32
- /// timestamp.
31
+ /// Prints a message.
32
+ /// The message is printed literally, without any decorations such as executable name or timestamp.
33
33
  /// @param message The message to log.
34
34
  virtual void print(const std::string& message) = 0;
35
35
 
@@ -54,7 +54,7 @@ namespace Ice
54
54
 
55
55
  /// Returns a clone of the logger with a new prefix.
56
56
  /// @param prefix The new prefix for the logger.
57
- /// @return A logger instance.
57
+ /// @return A new logger instance with the specified prefix.
58
58
  virtual LoggerPtr cloneWithPrefix(std::string prefix) = 0;
59
59
  };
60
60
  }
@@ -38,6 +38,8 @@ namespace Ice
38
38
  std::function<void()> addUpdateCallback(std::function<void(const PropertyDict&)> cb);
39
39
 
40
40
  private:
41
+ /// Removes a previously registered update callback.
42
+ /// @param p An iterator which points to the callback to remove.
41
43
  void removeUpdateCallback(std::list<std::function<void(const PropertyDict&)>>::iterator p);
42
44
 
43
45
  const PropertiesPtr _properties;
@@ -56,7 +56,7 @@ namespace Ice
56
56
  virtual void hold() = 0;
57
57
 
58
58
  /// Waits until the object adapter is in the holding state (see #hold) and the dispatch of requests received
59
- /// over incoming connection has completed.
59
+ /// over incoming connections has completed.
60
60
  /// @remark This function is provided for backward compatibility with older versions of Ice. Don't use it in
61
61
  /// new applications.
62
62
  virtual void waitForHold() = 0;
@@ -234,7 +234,7 @@ namespace Ice
234
234
  /// Removes a ServantLocator from this object adapter.
235
235
  /// @param category The category.
236
236
  /// @return The servant locator.
237
- /// @throws NotRegisteredException Thrown when no ServantLocator with the given category is registered.
237
+ /// @throws NotRegisteredException Thrown when no servant locator with the given category is registered.
238
238
  virtual ServantLocatorPtr removeServantLocator(std::string_view category) = 0;
239
239
 
240
240
  /// Finds a ServantLocator registered with this object adapter.
@@ -267,7 +267,7 @@ namespace Ice
267
267
  /// Creates a direct proxy from an Ice identity.
268
268
  /// @tparam Prx The type of the proxy to return.
269
269
  /// @param id An Ice identity.
270
- /// @return A proxy with the given identity and this published endpoints of this object adapter.
270
+ /// @return A proxy with the given identity and the published endpoints of this object adapter.
271
271
  template<typename Prx = ObjectPrx, std::enable_if_t<std::is_base_of_v<ObjectPrx, Prx>, bool> = true>
272
272
  Prx createDirectProxy(Identity id)
273
273
  {
@@ -6,6 +6,7 @@
6
6
  #include "InstanceF.h"
7
7
  #include "Instrumentation.h"
8
8
 
9
+ #include <exception>
9
10
  #include <string_view>
10
11
 
11
12
  #if defined(_MSC_VER)
@@ -42,8 +42,9 @@ namespace Ice
42
42
  /// Constructs an OutputStream.
43
43
  /// @param encoding The encoding version to use.
44
44
  /// @param format The class format to use.
45
- /// @param stringConverter The narrow string converter to use.
46
- /// @param wstringConverter The wide string converter to use.
45
+ /// @param stringConverter The narrow string converter to use. @c nullptr means do not perform any conversion.
46
+ /// @param wstringConverter The wide string converter to use. @c nullptr is equivalent to the process wstring
47
+ /// converter.
47
48
  OutputStream(
48
49
  EncodingVersion encoding = Encoding_1_1,
49
50
  FormatType format = FormatType::CompactFormat,
@@ -66,8 +67,9 @@ namespace Ice
66
67
  /// stream will reallocate if the size of the marshaled data exceeds the application's buffer.
67
68
  /// @param encoding The encoding version to use.
68
69
  /// @param format The class format to use.
69
- /// @param stringConverter The narrow string converter to use.
70
- /// @param wstringConverter The wide string converter to use.
70
+ /// @param stringConverter The narrow string converter to use. @c nullptr means do not perform any conversion.
71
+ /// @param wstringConverter The wide string converter to use. @c nullptr is equivalent to the process wstring
72
+ /// converter.
71
73
  OutputStream(
72
74
  std::pair<const std::byte*, const std::byte*> bytes,
73
75
  EncodingVersion encoding = Encoding_1_1,
@@ -676,8 +678,28 @@ namespace Ice
676
678
  //
677
679
  void writeConverted(const char*, size_t);
678
680
 
681
+ /// Writes a 1-byte size placeholder and returns its position; after writing the data, call
682
+ /// #endOneByteSize to patch the placeholder with the actual size at the given position.
683
+ /// @return The position of the 1-byte size placeholder.
684
+ size_type startOneByteSize()
685
+ {
686
+ size_type position = b.size();
687
+ write(std::uint8_t(0)); // placeholder
688
+ return position;
689
+ }
690
+
691
+ /// Updates the 1-byte size value at the given position. The new size is computed from the stream's current
692
+ /// position. The size must be <= 254.
693
+ /// @param position The position of the 1-byte size placeholder as returned by #startOneByteSize.
694
+ void endOneByteSize(size_type position)
695
+ {
696
+ auto size = static_cast<std::int32_t>(b.size() - position - 1);
697
+ assert(size >= 0 && size <= 254);
698
+ rewriteSize(size, b.begin() + position);
699
+ }
700
+
679
701
  StringConverterPtr _stringConverter;
680
- WstringConverterPtr _wstringConverter;
702
+ WstringConverterPtr _wstringConverter; // never null
681
703
 
682
704
  //
683
705
  // The public stream API needs to attach data to a stream.
@@ -196,7 +196,7 @@ namespace Ice
196
196
 
197
197
  /// Gets an Ice property as a list of strings. The strings must be separated by whitespace or comma. The strings
198
198
  /// in the list can contain whitespace and commas if they are enclosed in single or double quotes. If quotes are
199
- /// mismatched, the default list is returned. Within single quotes or double quotes, you can escape the quote
199
+ /// mismatched, the default list is returned. Within single quotes or double quotes, you can escape the quote
200
200
  /// in question with a backslash, e.g. O'Reilly can be written as O'Reilly, "O'Reilly" or 'O\'Reilly'.
201
201
  /// @param key The property key.
202
202
  /// @return The property value interpreted as a list of strings, or the default value if the property is not
@@ -216,8 +216,8 @@ namespace Ice
216
216
  /// @see #setProperty
217
217
  StringSeq getPropertyAsListWithDefault(std::string_view key, const StringSeq& value);
218
218
 
219
- /// Gets all properties whose keys begin with @p prefix. If @p prefix is the empty string, then all properties
220
- /// are returned.
219
+ /// Gets all properties whose keys begin with the given prefix. If @p prefix is the empty string,
220
+ /// then all properties are returned.
221
221
  /// @param prefix The prefix to search for.
222
222
  /// @return The matching property set.
223
223
  PropertyDict getPropertiesForPrefix(std::string_view prefix);
@@ -623,7 +623,7 @@ namespace Ice
623
623
  [[nodiscard]] bool ice_isBatchDatagram() const noexcept;
624
624
 
625
625
  /// Gets the compression override setting of this proxy.
626
- /// @return The compression override setting. If nullopt is returned, no override is set. Otherwise, true
626
+ /// @return The compression override setting. If nullopt is returned, no override is set. Otherwise, `true`
627
627
  /// if compression is enabled, `false` otherwise.
628
628
  [[nodiscard]] std::optional<bool> ice_getCompress() const noexcept;
629
629
 
@@ -32,8 +32,13 @@ namespace Ice::SSL
32
32
  ///
33
33
  /// This callback is invoked by the SSL transport for each new outgoing connection before starting the SSL
34
34
  /// handshake to determine the appropriate client credentials. The callback must return a `SCH_CREDENTIALS` that
35
- /// represents the client's credentials. The SSL transport takes ownership of the credentials' `paCred` and
36
- /// `hRootStore` members and releases them when the connection is closed.
35
+ /// represents the client's credentials. The returned credentials are passed to [AcquireCredentialsHandle] to
36
+ /// create the credential handle for the connection; see the Schannel documentation for details on the
37
+ /// available fields. The SSL transport takes ownership of the credentials' `paCred` and `hRootStore` members
38
+ /// and releases them when the connection is closed.
39
+ ///
40
+ /// Certificate validation is not performed through the returned credentials. Use `trustedRootCertificates`
41
+ /// or `serverCertificateValidationCallback` instead.
37
42
  ///
38
43
  /// @param host The target host name.
39
44
  /// @return The client SSL credentials.
@@ -42,9 +47,12 @@ namespace Ice::SSL
42
47
  /// @snippet Ice/SSL/SchannelClientAuthenticationOptions.cpp clientCertificateSelectionCallback
43
48
  ///
44
49
  /// @see [SCH_CREDENTIALS]
50
+ /// @see [AcquireCredentialsHandle]
45
51
  ///
46
52
  /// [SCH_CREDENTIALS]:
47
53
  /// https://learn.microsoft.com/en-us/windows/win32/api/schannel/ns-schannel-sch_credentials
54
+ /// [AcquireCredentialsHandle]:
55
+ /// https://learn.microsoft.com/en-us/windows/win32/secauthn/acquirecredentialshandle--schannel
48
56
  std::function<SCH_CREDENTIALS(const std::string& host)> clientCredentialsSelectionCallback;
49
57
 
50
58
  /// A callback invoked before initiating a new SSL handshake, providing an opportunity to customize the SSL
@@ -33,8 +33,13 @@ namespace Ice::SSL
33
33
  ///
34
34
  /// This callback is invoked by the SSL transport for each new incoming connection before starting the SSL
35
35
  /// handshake to determine the appropriate server credentials. The callback must return a `SCH_CREDENTIALS` that
36
- /// represents the server's credentials. The SSL transport takes ownership of the credentials' `paCred` and
37
- /// `hRootStore` members and releases them when the connection is closed.
36
+ /// represents the server's credentials. The returned credentials are passed to [AcquireCredentialsHandle] to
37
+ /// create the credential handle for the connection; see the Schannel documentation for details on the
38
+ /// available fields. The SSL transport takes ownership of the credentials' `paCred` and `hRootStore` members
39
+ /// and releases them when the connection is closed.
40
+ ///
41
+ /// Certificate validation is not performed through the returned credentials. Use `trustedRootCertificates`
42
+ /// or `clientCertificateValidationCallback` instead.
38
43
  ///
39
44
  /// @param adapterName The name of the object adapter that accepted the connection.
40
45
  /// @return The server SSL credentials.
@@ -43,9 +48,12 @@ namespace Ice::SSL
43
48
  /// @snippet Ice/SSL/SchannelServerAuthenticationOptions.cpp serverCertificateSelectionCallback
44
49
  ///
45
50
  /// @see [SCH_CREDENTIALS]
51
+ /// @see [AcquireCredentialsHandle]
46
52
  ///
47
53
  /// [SCH_CREDENTIALS]:
48
54
  /// https://learn.microsoft.com/en-us/windows/win32/api/schannel/ns-schannel-sch_credentials
55
+ /// [AcquireCredentialsHandle]:
56
+ /// https://learn.microsoft.com/en-us/windows/win32/secauthn/acquirecredentialshandle--schannel
49
57
  std::function<SCH_CREDENTIALS(const std::string& adapterName)> serverCredentialsSelectionCallback;
50
58
 
51
59
  /// A callback invoked before initiating a new SSL handshake, providing an opportunity to customize the SSL
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) ZeroC, Inc.
2
2
 
3
- // slice2cpp version 3.8.0
3
+ // slice2cpp version 3.8.2
4
4
  // <auto-generated>Generated from Slice file 'BuiltinSequences.ice'.</auto-generated>
5
5
  // clang-format off
6
6
 
@@ -24,7 +24,7 @@
24
24
  # if ICE_INT_VERSION % 100 >= 50
25
25
  # error Beta header file detected
26
26
  # endif
27
- # if ICE_INT_VERSION % 100 < 0
27
+ # if ICE_INT_VERSION % 100 < 2
28
28
  # error Ice patch level mismatch!
29
29
  # endif
30
30
  #endif
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) ZeroC, Inc.
2
2
 
3
- // slice2cpp version 3.8.0
3
+ // slice2cpp version 3.8.2
4
4
  // <auto-generated>Generated from Slice file 'Context.ice'.</auto-generated>
5
5
  // clang-format off
6
6
 
@@ -19,7 +19,7 @@
19
19
  # if ICE_INT_VERSION % 100 >= 50
20
20
  # error Beta header file detected
21
21
  # endif
22
- # if ICE_INT_VERSION % 100 < 0
22
+ # if ICE_INT_VERSION % 100 < 2
23
23
  # error Ice patch level mismatch!
24
24
  # endif
25
25
  #endif
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) ZeroC, Inc.
2
2
 
3
- // slice2cpp version 3.8.0
3
+ // slice2cpp version 3.8.2
4
4
  // <auto-generated>Generated from Slice file 'EndpointTypes.ice'.</auto-generated>
5
5
  // clang-format off
6
6
 
@@ -18,7 +18,7 @@
18
18
  # if ICE_INT_VERSION % 100 >= 50
19
19
  # error Beta header file detected
20
20
  # endif
21
- # if ICE_INT_VERSION % 100 < 0
21
+ # if ICE_INT_VERSION % 100 < 2
22
22
  # error Ice patch level mismatch!
23
23
  # endif
24
24
  #endif
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) ZeroC, Inc.
2
2
 
3
- // slice2cpp version 3.8.0
3
+ // slice2cpp version 3.8.2
4
4
  // <auto-generated>Generated from Slice file 'Identity.ice'.</auto-generated>
5
5
  // clang-format off
6
6
 
@@ -21,7 +21,7 @@
21
21
  # if ICE_INT_VERSION % 100 >= 50
22
22
  # error Beta header file detected
23
23
  # endif
24
- # if ICE_INT_VERSION % 100 < 0
24
+ # if ICE_INT_VERSION % 100 < 2
25
25
  # error Ice patch level mismatch!
26
26
  # endif
27
27
  #endif
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) ZeroC, Inc.
2
2
 
3
- // slice2cpp version 3.8.0
3
+ // slice2cpp version 3.8.2
4
4
  // <auto-generated>Generated from Slice file 'Locator.ice'.</auto-generated>
5
5
  // clang-format off
6
6
 
@@ -18,7 +18,7 @@
18
18
  # if ICE_INT_VERSION % 100 >= 50
19
19
  # error Beta header file detected
20
20
  # endif
21
- # if ICE_INT_VERSION % 100 < 0
21
+ # if ICE_INT_VERSION % 100 < 2
22
22
  # error Ice patch level mismatch!
23
23
  # endif
24
24
  #endif
@@ -82,7 +82,7 @@ namespace Ice
82
82
  return *this;
83
83
  }
84
84
 
85
- /// Finds an object by identity and returns a dummy proxy with the endpoint(s) that can be used to reach this
85
+ /// Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this
86
86
  /// object. This dummy proxy may be an indirect proxy that requires further resolution using
87
87
  /// ::Ice::LocatorPrx::findAdapterById.
88
88
  /// @param id The identity.
@@ -92,7 +92,7 @@ namespace Ice
92
92
  /// should treat this exception like a null return value.
93
93
  std::optional<Ice::ObjectPrx> findObjectById(const Identity& id, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)
94
94
 
95
- /// Finds an object by identity and returns a dummy proxy with the endpoint(s) that can be used to reach this
95
+ /// Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this
96
96
  /// object. This dummy proxy may be an indirect proxy that requires further resolution using
97
97
  /// ::Ice::LocatorPrx::findAdapterById.
98
98
  /// @param id The identity.
@@ -101,7 +101,7 @@ namespace Ice
101
101
  /// - A dummy proxy, or null if an object with the requested identity was not found.
102
102
  [[nodiscard]] std::future<std::optional<Ice::ObjectPrx>> findObjectByIdAsync(const Identity& id, const Ice::Context& context = Ice::noExplicitContext) const;
103
103
 
104
- /// Finds an object by identity and returns a dummy proxy with the endpoint(s) that can be used to reach this
104
+ /// Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this
105
105
  /// object. This dummy proxy may be an indirect proxy that requires further resolution using
106
106
  /// ::Ice::LocatorPrx::findAdapterById.
107
107
  /// @param id The identity.
@@ -279,8 +279,7 @@ namespace Ice
279
279
 
280
280
  namespace Ice
281
281
  {
282
- /// The exception that is thrown by a LocatorPrx implementation when it cannot find an object adapter with the
283
- /// provided adapter ID.
282
+ /// The exception that is thrown by a LocatorPrx implementation when it cannot find an object adapter.
284
283
  /// @remarks The Slice compiler generated this exception class from Slice exception `::Ice::AdapterNotFoundException`.
285
284
  /// @headerfile Ice/Ice.h
286
285
  class ICE_API AdapterNotFoundException : public Ice::UserException
@@ -302,8 +301,7 @@ namespace Ice
302
301
  void _readImpl(Ice::InputStream*) override;
303
302
  };
304
303
 
305
- /// The exception that is thrown by a LocatorPrx implementation when it cannot find an object with the provided
306
- /// identity.
304
+ /// The exception that is thrown by a LocatorPrx implementation when it cannot find an object.
307
305
  /// @remarks The Slice compiler generated this exception class from Slice exception `::Ice::ObjectNotFoundException`.
308
306
  /// @headerfile Ice/Ice.h
309
307
  class ICE_API ObjectNotFoundException : public Ice::UserException
@@ -348,7 +346,7 @@ namespace Ice
348
346
 
349
347
  [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
350
348
 
351
- /// Finds an object by identity and returns a dummy proxy with the endpoint(s) that can be used to reach this
349
+ /// Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this
352
350
  /// object. This dummy proxy may be an indirect proxy that requires further resolution using
353
351
  /// ::Ice::LocatorPrx::findAdapterById.
354
352
  /// @param id The identity.
@@ -449,7 +447,7 @@ namespace Ice
449
447
 
450
448
  [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
451
449
 
452
- /// Finds an object by identity and returns a dummy proxy with the endpoint(s) that can be used to reach this
450
+ /// Finds an object by identity and returns a dummy proxy with endpoint(s) that can be used to reach this
453
451
  /// object. This dummy proxy may be an indirect proxy that requires further resolution using
454
452
  /// ::Ice::LocatorPrx::findAdapterById.
455
453
  /// @param id The identity.
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) ZeroC, Inc.
2
2
 
3
- // slice2cpp version 3.8.0
3
+ // slice2cpp version 3.8.2
4
4
  // <auto-generated>Generated from Slice file 'LocatorRegistry.ice'.</auto-generated>
5
5
  // clang-format off
6
6
 
@@ -18,7 +18,7 @@
18
18
  # if ICE_INT_VERSION % 100 >= 50
19
19
  # error Beta header file detected
20
20
  # endif
21
- # if ICE_INT_VERSION % 100 < 0
21
+ # if ICE_INT_VERSION % 100 < 2
22
22
  # error Ice patch level mismatch!
23
23
  # endif
24
24
  #endif