Skip to content

Commit 1fff97b

Browse files
authored
Remove unimplemented methods, add missing dtors (#704)
1 parent 37e3606 commit 1fff97b

File tree

2 files changed

+12
-32
lines changed

2 files changed

+12
-32
lines changed

eventstream_rpc/include/aws/eventstreamrpc/EventStreamClient.h

+12-26
Original file line numberDiff line numberDiff line change
@@ -71,32 +71,14 @@ namespace Aws
7171
EventStreamHeader(
7272
const struct aws_event_stream_header_value_pair &header,
7373
Crt::Allocator *allocator = Crt::g_allocator);
74-
EventStreamHeader(const Crt::String &name, bool value);
75-
EventStreamHeader(const Crt::String &name, int8_t value);
76-
EventStreamHeader(const Crt::String &name, int16_t value);
77-
EventStreamHeader(const Crt::String &name, int32_t value);
78-
EventStreamHeader(const Crt::String &name, int64_t value);
79-
EventStreamHeader(const Crt::String &name, Crt::DateTime &value);
8074
EventStreamHeader(
8175
const Crt::String &name,
8276
const Crt::String &value,
8377
Crt::Allocator *allocator = Crt::g_allocator) noexcept;
84-
EventStreamHeader(const Crt::String &name, Crt::ByteBuf &value);
85-
EventStreamHeader(const Crt::String &name, Crt::UUID value);
8678

87-
HeaderValueType GetHeaderValueType();
8879
Crt::String GetHeaderName() const noexcept;
89-
void SetHeaderName(const Crt::String &);
90-
91-
bool GetValueAsBoolean(bool &);
92-
bool GetValueAsByte(int8_t &);
93-
bool GetValueAsShort(int16_t &);
94-
bool GetValueAsInt(int32_t &);
95-
bool GetValueAsLong(int64_t &);
96-
bool GetValueAsTimestamp(Crt::DateTime &);
80+
9781
bool GetValueAsString(Crt::String &) const noexcept;
98-
bool GetValueAsBytes(Crt::ByteBuf &);
99-
bool GetValueAsUUID(Crt::UUID &);
10082

10183
const struct aws_event_stream_header_value_pair *GetUnderlyingHandle() const;
10284

@@ -229,6 +211,8 @@ namespace Aws
229211
class AWS_EVENTSTREAMRPC_API ConnectionLifecycleHandler
230212
{
231213
public:
214+
virtual ~ConnectionLifecycleHandler() noexcept = default;
215+
232216
/**
233217
* This callback is only invoked upon receiving a CONNECT_ACK with the
234218
* CONNECTION_ACCEPTED flag set by the server. Therefore, once this callback
@@ -300,7 +284,7 @@ namespace Aws
300284
* the TERMINATE_STREAM flag, or when the connection shuts down.
301285
*/
302286
virtual void OnContinuationClosed() = 0;
303-
virtual ~ClientContinuationHandler() noexcept;
287+
virtual ~ClientContinuationHandler() noexcept = default;
304288

305289
private:
306290
friend class ClientContinuation;
@@ -352,7 +336,6 @@ namespace Aws
352336
* @return True if the continuation has been closed, false otherwise.
353337
*/
354338
bool IsClosed() noexcept;
355-
void Release() noexcept;
356339

357340
/**
358341
* Send message on the continuation.
@@ -394,7 +377,7 @@ namespace Aws
394377
{
395378
public:
396379
AbstractShapeBase() noexcept;
397-
virtual ~AbstractShapeBase() noexcept;
380+
virtual ~AbstractShapeBase() noexcept = default;
398381
static void s_customDeleter(AbstractShapeBase *shape) noexcept;
399382
virtual void SerializeToJsonObject(Crt::JsonObject &payloadObject) const = 0;
400383
virtual Crt::String GetModelName() const noexcept = 0;
@@ -409,7 +392,7 @@ namespace Aws
409392
class AWS_EVENTSTREAMRPC_API OperationError : public AbstractShapeBase
410393
{
411394
public:
412-
explicit OperationError() noexcept;
395+
explicit OperationError() noexcept = default;
413396
static void s_customDeleter(OperationError *shape) noexcept;
414397
virtual void SerializeToJsonObject(Crt::JsonObject &payloadObject) const override;
415398
virtual Crt::Optional<Crt::String> GetMessage() noexcept = 0;
@@ -423,6 +406,8 @@ namespace Aws
423406
class AWS_EVENTSTREAMRPC_API StreamResponseHandler
424407
{
425408
public:
409+
virtual ~StreamResponseHandler() noexcept = default;
410+
426411
/**
427412
* Invoked when stream is closed, so no more messages will be received.
428413
*/
@@ -523,6 +508,7 @@ namespace Aws
523508
{
524509
/* An interface shared by all operations for retrieving the response object given the model name. */
525510
public:
511+
virtual ~ResponseRetriever() noexcept = default;
526512
virtual ExpectedResponseFactory GetInitialResponseFromModelName(
527513
const Crt::String &modelName) const noexcept = 0;
528514
virtual ExpectedResponseFactory GetStreamingResponseFromModelName(
@@ -534,6 +520,7 @@ namespace Aws
534520
class AWS_EVENTSTREAMRPC_API ServiceModel
535521
{
536522
public:
523+
virtual ~ServiceModel() noexcept = default;
537524
virtual Crt::ScopedResource<OperationError> AllocateOperationErrorFromPayload(
538525
const Crt::String &errorModelName,
539526
Crt::StringView stringView,
@@ -548,6 +535,8 @@ namespace Aws
548535
public:
549536
OperationModelContext(const ServiceModel &serviceModel) noexcept;
550537

538+
virtual ~OperationModelContext() noexcept = default;
539+
551540
/**
552541
* Parse the given string into an initial response object.
553542
* @param stringView String to parse the response from.
@@ -662,9 +651,6 @@ namespace Aws
662651
std::future<RpcError> Activate(
663652
const AbstractShapeBase *shape,
664653
OnMessageFlushCallback onMessageFlushCallback) noexcept;
665-
std::future<RpcError> SendStreamEvent(
666-
AbstractShapeBase *shape,
667-
OnMessageFlushCallback onMessageFlushCallback) noexcept;
668654

669655
/**
670656
* Returns the canonical model name associated with this operation across any client language.

eventstream_rpc/source/EventStreamClient.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -886,8 +886,6 @@ namespace Aws
886886
}
887887
}
888888

889-
ClientContinuationHandler::~ClientContinuationHandler() noexcept {}
890-
891889
void ClientContinuation::s_onContinuationMessage(
892890
struct aws_event_stream_rpc_client_continuation_token *continuationToken,
893891
const struct aws_event_stream_rpc_message_args *messageArgs,
@@ -1101,14 +1099,10 @@ namespace Aws
11011099
{
11021100
}
11031101

1104-
OperationError::OperationError() noexcept {}
1105-
11061102
void OperationError::SerializeToJsonObject(Crt::JsonObject &payloadObject) const { (void)payloadObject; }
11071103

11081104
AbstractShapeBase::AbstractShapeBase() noexcept : m_allocator(nullptr) {}
11091105

1110-
AbstractShapeBase::~AbstractShapeBase() noexcept {}
1111-
11121106
ClientOperation::ClientOperation(
11131107
ClientConnection &connection,
11141108
std::shared_ptr<StreamResponseHandler> streamHandler,

0 commit comments

Comments
 (0)