AWS IoT Device SDK C++ v2  1.39.0
AWS IoT Device SDK C++ v2
Classes | Typedefs | Enumerations | Functions
Aws::Eventstreamrpc Namespace Reference

Classes

class  AbstractShapeBase
 
struct  AwsEventstreamConnectionImplClearSharedTask
 
struct  AwsEventstreamContinuationReleaseTask
 
class  ClientConnection
 
class  ClientConnectionImpl
 
class  ClientContinuationHandler
 
class  ClientContinuationImpl
 
class  ClientOperation
 
class  ConnectionCallbackContext
 
class  ConnectionConfig
 
class  ConnectionLifecycleHandler
 
struct  ContinuationSharedState
 
class  EventStreamHeader
 
class  EventstreamResultVariantType
 
class  MessageAmendment
 
struct  MessageDeserialization
 
struct  MessageResult
 
class  OnMessageFlushCallbackContainer
 
class  OnMessageFlushCallbackContainerWrapper
 
class  OperationError
 
class  OperationModelContext
 
class  ResponseRetriever
 
struct  RpcError
 
class  ServiceModel
 
class  StreamResponseHandler
 

Typedefs

using HeaderValueType = aws_event_stream_header_value_type
 
using MessageType = aws_event_stream_rpc_message_type
 
using OnMessageFlushCallback = std::function< void(int errorCode)>
 
using ConnectMessageAmender = std::function< const MessageAmendment &(void)>
 
using ExpectedResponseFactory = std::function< Crt::ScopedResource< AbstractShapeBase >(const Crt::StringView &payload, Crt::Allocator *allocator)>
 
using ErrorResponseFactory = std::function< Crt::ScopedResource< OperationError >(const Crt::StringView &payload, Crt::Allocator *allocator)>
 
using LoneResponseRetriever = std::function< ExpectedResponseFactory(const Crt::String &modelName)>
 
using StreamingResponseRetriever = std::function< ExpectedResponseFactory(const Crt::String &modelName)>
 
using ErrorResponseRetriever = std::function< ErrorResponseFactory(const Crt::String &modelName)>
 

Enumerations

enum  EventStreamRpcStatusCode {
  EVENT_STREAM_RPC_SUCCESS = 0, EVENT_STREAM_RPC_NULL_PARAMETER, EVENT_STREAM_RPC_UNINITIALIZED, EVENT_STREAM_RPC_ALLOCATION_ERROR,
  EVENT_STREAM_RPC_CONNECTION_SETUP_FAILED, EVENT_STREAM_RPC_CONNECTION_ACCESS_DENIED, EVENT_STREAM_RPC_CONNECTION_ALREADY_ESTABLISHED, EVENT_STREAM_RPC_CONNECTION_CLOSED,
  EVENT_STREAM_RPC_CONTINUATION_CLOSED, EVENT_STREAM_RPC_UNKNOWN_PROTOCOL_MESSAGE, EVENT_STREAM_RPC_UNMAPPED_DATA, EVENT_STREAM_RPC_UNSUPPORTED_CONTENT_TYPE,
  EVENT_STREAM_RPC_CRT_ERROR, EVENT_STREAM_RPC_CONTINUATION_NOT_YET_OPENED
}
 
enum  ResultType { NONE, OPERATION_RESPONSE, OPERATION_ERROR, RPC_ERROR }
 
enum  ConnectionCallbackActionType { ConnectionCallbackActionType::None, ConnectionCallbackActionType::CompleteConnectPromise, ConnectionCallbackActionType::DisconnectionCallback }
 
enum  EventStreamMessageRoutingType { EventStreamMessageRoutingType::Response, EventStreamMessageRoutingType::Stream, EventStreamMessageRoutingType::Error }
 
enum  ContinuationStateType {
  ContinuationStateType::None, ContinuationStateType::PendingActivate, ContinuationStateType::Activated, ContinuationStateType::PendingClose,
  ContinuationStateType::Closed
}
 

Functions

static void s_protocolMessageCallback (int errorCode, void *userData) noexcept
 
static void s_fillNativeHeadersArray (const Crt::List< EventStreamHeader > &headers, struct aws_array_list *headersArray, Crt::Allocator *m_allocator=Crt::g_allocator)
 
static void s_zeroSharedReference (struct aws_task *task, void *arg, enum aws_task_status status)
 
static const EventStreamHeaders_GetHeaderByName (const Crt::List< EventStreamHeader > &headers, const Crt::String &name) noexcept
 
static void s_releaseContinuation (struct aws_task *task, void *arg, enum aws_task_status status)
 

Typedef Documentation

◆ ConnectMessageAmender

using Aws::Eventstreamrpc::ConnectMessageAmender = typedef std::function<const MessageAmendment &(void)>

Allows the application to add headers and change the payload of the CONNECT packet sent out by the client.

Returns
The MessageAmendment for the client to use during an attempt to connect.

◆ ErrorResponseFactory

◆ ErrorResponseRetriever

using Aws::Eventstreamrpc::ErrorResponseRetriever = typedef std::function<ErrorResponseFactory(const Crt::String &modelName)>

◆ ExpectedResponseFactory

◆ HeaderValueType

using Aws::Eventstreamrpc::HeaderValueType = typedef aws_event_stream_header_value_type

◆ LoneResponseRetriever

using Aws::Eventstreamrpc::LoneResponseRetriever = typedef std::function<ExpectedResponseFactory(const Crt::String &modelName)>

◆ MessageType

using Aws::Eventstreamrpc::MessageType = typedef aws_event_stream_rpc_message_type

◆ OnMessageFlushCallback

using Aws::Eventstreamrpc::OnMessageFlushCallback = typedef std::function<void(int errorCode)>

A callback prototype that is called upon flushing a message over the wire.

Parameters
errorCodeA non-zero value if an error occurred while attempting to flush the message.

◆ StreamingResponseRetriever

Enumeration Type Documentation

◆ ConnectionCallbackActionType

Enumerator
None 
CompleteConnectPromise 
DisconnectionCallback 

◆ ContinuationStateType

Enumerator
None 
PendingActivate 
Activated 
PendingClose 
Closed 

◆ EventStreamMessageRoutingType

Enumerator
Response 
Stream 
Error 

◆ EventStreamRpcStatusCode

Enumerator
EVENT_STREAM_RPC_SUCCESS 
EVENT_STREAM_RPC_NULL_PARAMETER 
EVENT_STREAM_RPC_UNINITIALIZED 
EVENT_STREAM_RPC_ALLOCATION_ERROR 
EVENT_STREAM_RPC_CONNECTION_SETUP_FAILED 
EVENT_STREAM_RPC_CONNECTION_ACCESS_DENIED 
EVENT_STREAM_RPC_CONNECTION_ALREADY_ESTABLISHED 
EVENT_STREAM_RPC_CONNECTION_CLOSED 
EVENT_STREAM_RPC_CONTINUATION_CLOSED 
EVENT_STREAM_RPC_UNKNOWN_PROTOCOL_MESSAGE 
EVENT_STREAM_RPC_UNMAPPED_DATA 
EVENT_STREAM_RPC_UNSUPPORTED_CONTENT_TYPE 
EVENT_STREAM_RPC_CRT_ERROR 
EVENT_STREAM_RPC_CONTINUATION_NOT_YET_OPENED 

◆ ResultType

Enumerator
NONE 
OPERATION_RESPONSE 
OPERATION_ERROR 
RPC_ERROR 

Function Documentation

◆ s_fillNativeHeadersArray()

static void Aws::Eventstreamrpc::s_fillNativeHeadersArray ( const Crt::List< EventStreamHeader > &  headers,
struct aws_array_list *  headersArray,
Crt::Allocator m_allocator = Crt::g_allocator 
)
static

◆ s_GetHeaderByName()

static const EventStreamHeader* Aws::Eventstreamrpc::s_GetHeaderByName ( const Crt::List< EventStreamHeader > &  headers,
const Crt::String name 
)
staticnoexcept

◆ s_protocolMessageCallback()

static void Aws::Eventstreamrpc::s_protocolMessageCallback ( int  errorCode,
void *  userData 
)
staticnoexcept

◆ s_releaseContinuation()

static void Aws::Eventstreamrpc::s_releaseContinuation ( struct aws_task *  task,
void *  arg,
enum aws_task_status  status 
)
static

◆ s_zeroSharedReference()

static void Aws::Eventstreamrpc::s_zeroSharedReference ( struct aws_task *  task,
void *  arg,
enum aws_task_status  status 
)
static