@@ -139,6 +139,23 @@ namespace Aws
139
139
Crt::Allocator *m_allocator;
140
140
};
141
141
142
+ enum EventStreamRpcStatusCode
143
+ {
144
+ EVENT_STREAM_RPC_SUCCESS = 0 ,
145
+ EVENT_STREAM_RPC_NULL_PARAMETER,
146
+ EVENT_STREAM_RPC_UNINITIALIZED,
147
+ EVENT_STREAM_RPC_ALLOCATION_ERROR,
148
+ EVENT_STREAM_RPC_CONNECTION_SETUP_FAILED,
149
+ EVENT_STREAM_RPC_CONNECTION_ACCESS_DENIED,
150
+ EVENT_STREAM_RPC_CONNECTION_ALREADY_ESTABLISHED,
151
+ EVENT_STREAM_RPC_CONNECTION_CLOSED,
152
+ EVENT_STREAM_RPC_CONTINUATION_CLOSED,
153
+ EVENT_STREAM_RPC_UNKNOWN_PROTOCOL_MESSAGE,
154
+ EVENT_STREAM_RPC_UNMAPPED_DATA,
155
+ EVENT_STREAM_RPC_UNSUPPORTED_CONTENT_TYPE,
156
+ EVENT_STREAM_RPC_CRT_ERROR
157
+ };
158
+
142
159
/* *
143
160
* Configuration structure holding all configurations relating to eventstream RPC connection establishment
144
161
*/
@@ -184,6 +201,8 @@ namespace Aws
184
201
m_connectRequestCallback = connectRequestCallback;
185
202
}
186
203
204
+ EventStreamRpcStatusCode Validate () const noexcept ;
205
+
187
206
protected:
188
207
Crt::Optional<Crt::String> m_hostName;
189
208
Crt::Optional<uint32_t > m_port;
@@ -194,23 +213,6 @@ namespace Aws
194
213
OnMessageFlushCallback m_connectRequestCallback;
195
214
};
196
215
197
- enum EventStreamRpcStatusCode
198
- {
199
- EVENT_STREAM_RPC_SUCCESS = 0 ,
200
- EVENT_STREAM_RPC_NULL_PARAMETER,
201
- EVENT_STREAM_RPC_UNINITIALIZED,
202
- EVENT_STREAM_RPC_ALLOCATION_ERROR,
203
- EVENT_STREAM_RPC_CONNECTION_SETUP_FAILED,
204
- EVENT_STREAM_RPC_CONNECTION_ACCESS_DENIED,
205
- EVENT_STREAM_RPC_CONNECTION_ALREADY_ESTABLISHED,
206
- EVENT_STREAM_RPC_CONNECTION_CLOSED,
207
- EVENT_STREAM_RPC_CONTINUATION_CLOSED,
208
- EVENT_STREAM_RPC_UNKNOWN_PROTOCOL_MESSAGE,
209
- EVENT_STREAM_RPC_UNMAPPED_DATA,
210
- EVENT_STREAM_RPC_UNSUPPORTED_CONTENT_TYPE,
211
- EVENT_STREAM_RPC_CRT_ERROR
212
- };
213
-
214
216
struct AWS_EVENTSTREAMRPC_API RpcError
215
217
{
216
218
explicit operator bool () const noexcept { return baseStatus == EVENT_STREAM_RPC_SUCCESS; }
@@ -268,20 +270,18 @@ namespace Aws
268
270
{
269
271
public:
270
272
271
- explicit ClientConnection (Crt::Allocator *allocator = Crt::g_allocator ) noexcept ;
273
+ explicit ClientConnection (Crt::Allocator *allocator, aws_client_bootstrap *bootstrap ) noexcept ;
272
274
~ClientConnection () noexcept ;
273
275
274
276
/* *
275
277
* Initiates a new outgoing event-stream-rpc connection.
276
278
* @param connectionOptions Connection options.
277
279
* @param connectionLifecycleHandler Handler to process connection lifecycle events.
278
- * @param clientBootstrap ClientBootstrap object to run the connection on.
279
280
* @return Future that will be resolved when connection either succeeds or fails.
280
281
*/
281
282
std::future<RpcError> Connect (
282
283
const ConnectionConfig &connectionOptions,
283
- ConnectionLifecycleHandler *connectionLifecycleHandler,
284
- Crt::Io::ClientBootstrap &clientBootstrap) noexcept ;
284
+ ConnectionLifecycleHandler *connectionLifecycleHandler) noexcept ;
285
285
286
286
/* *
287
287
* Create a new stream.
@@ -302,12 +302,6 @@ namespace Aws
302
302
*/
303
303
bool IsOpen () const noexcept ;
304
304
305
- /* *
306
- * Returns the C connection object, if it exists.
307
- * @return the C connection object, if it exists.
308
- */
309
- struct aws_event_stream_rpc_client_connection *GetUnderlyingHandle () const noexcept ;
310
-
311
305
private:
312
306
313
307
std::shared_ptr<ClientConnectionImpl> m_impl;
0 commit comments