AWS IoT Device SDK C++ v2
1.34.0
AWS IoT Device SDK C++ v2
|
Go to the documentation of this file.
10 #include <aws/iotdevice/secure_tunneling.h>
17 namespace Iotsecuretunneling
26 const aws_secure_tunnel_message_view &raw_options,
32 uint32_t connectionId,
40 uint32_t connectionId,
58 Message &WithConnectionId(uint32_t connectionId) noexcept;
68 bool initializeRawOptions(aws_secure_tunnel_message_view &raw_options) noexcept;
82 const uint32_t &getConnectionId()
const noexcept;
113 uint32_t m_connectionId;
124 Crt::
ByteBuf m_serviceIdStorage;
143 enum aws_secure_tunnel_message_type type,
172 Crt::
ByteBuf m_messageTypeStorage;
191 const aws_secure_tunnel_connection_view &raw_options,
245 Crt::
ByteBuf m_serviceId1Storage;
246 Crt::
ByteBuf m_serviceId2Storage;
247 Crt::
ByteBuf m_serviceId3Storage;
266 const aws_secure_tunnel_message_view &raw_options,
281 const uint32_t &getConnectionId()
const noexcept;
305 uint32_t m_connectionId;
310 Crt::
ByteBuf m_serviceIdStorage;
329 const aws_secure_tunnel_message_view &raw_options,
359 Crt::
ByteBuf m_serviceIdStorage;
378 const aws_secure_tunnel_message_view &raw_options,
393 const uint32_t &getConnectionId()
const noexcept;
416 uint32_t m_connectionId;
421 Crt::
ByteBuf m_serviceIdStorage;
440 const aws_secure_tunnel_message_view &raw_options,
455 const uint32_t &getConnectionId()
const noexcept;
478 uint32_t m_connectionId;
483 Crt::
ByteBuf m_serviceIdStorage;
596 const std::string &accessToken,
597 aws_secure_tunneling_local_proxy_mode localProxyMode,
598 const std::string &endpointHost);
606 const std::string &accessToken,
607 aws_secure_tunneling_local_proxy_mode localProxyMode,
608 const std::string &endpointHost);
615 const std::string &accessToken,
616 aws_secure_tunneling_local_proxy_mode localProxyMode,
617 const std::string &endpointHost);
796 std::shared_ptr<SecureTunnel> Build() noexcept;
819 std::string m_accessToken;
824 aws_secure_tunneling_local_proxy_mode m_localProxyMode;
829 std::string m_endpointHost;
837 std::string m_clientToken;
848 std::string m_rootCa;
963 const std::string &accessToken,
964 aws_secure_tunneling_local_proxy_mode localProxyMode,
965 const std::string &endpointHost,
966 const std::string &rootCa,
980 const std::string &accessToken,
981 aws_secure_tunneling_local_proxy_mode localProxyMode,
982 const std::string &endpointHost,
983 const std::string &rootCa,
1025 int SendMessage(
std::shared_ptr<
Message> messageOptions) noexcept;
1034 int SendStreamStart();
1044 int SendStreamStart(
std::
string serviceId);
1054 int SendStreamStart(Crt::
ByteCursor serviceId);
1066 int SendStreamStart(
std::
string serviceId, uint32_t connectionId);
1078 int SendStreamStart(Crt::
ByteCursor serviceId, uint32_t connectionId);
1087 int SendConnectionStart(uint32_t connectionId);
1098 int SendConnectionStart(
std::
string serviceId, uint32_t connectionId);
1109 int SendConnectionStart(Crt::
ByteCursor serviceId, uint32_t connectionId);
1111 aws_secure_tunnel *GetUnderlyingHandle();
1134 int SendStreamReset();
1143 Crt::Io::ClientBootstrap *clientBootstrap,
1144 const Crt::Io::SocketOptions &socketOptions,
1145 const
std::
string &accessToken,
1146 const
std::
string &clientToken,
1147 aws_secure_tunneling_local_proxy_mode localProxyMode,
1148 const
std::
string &endpointHost,
1150 Crt::Io::TlsConnectionOptions *tslOptions,
1151 const
std::
string &rootCa,
1152 Crt::Http::HttpClientConnectionProxyOptions *httpClientConnectionProxyOptions,
1172 static
void s_OnMessageReceived(const struct aws_secure_tunnel_message_view *message,
void *user_data);
1173 static
void s_OnConnectionComplete(
1174 const struct aws_secure_tunnel_connection_view *connection,
1177 static
void s_OnConnectionFailure(
int error_code,
void *user_data);
1178 static
void s_OnConnectionShutdown(
int error_code,
void *user_data);
1179 static
void s_OnSendDataComplete(
int error_code,
void *user_data);
1180 static
void s_OnSendMessageComplete(
1181 enum aws_secure_tunnel_message_type type,
1184 static
void s_OnStreamStopped(
1185 const struct aws_secure_tunnel_message_view *message,
1188 static
void s_OnSessionReset(
void *user_data);
1189 static
void s_OnStopped(
void *user_data);
1190 static
void s_OnTerminationComplete(
void *user_data);
1191 static
void s_OnStreamStarted(
1192 const struct aws_secure_tunnel_message_view *message,
1195 static
void s_OnConnectionStarted(
1196 const struct aws_secure_tunnel_message_view *message,
1199 static
void s_OnConnectionReset(
1200 const struct aws_secure_tunnel_message_view *message,
1204 void OnTerminationComplete();
1264 aws_secure_tunnel *m_secure_tunnel;
SecureTunnel & operator=(const SecureTunnel &)=delete
std::shared_ptr< StreamStartedData > streamStartedData
Definition: SecureTunnel.h:319
StreamStoppedData(const StreamStoppedData &)=delete
std::function< void(SecureTunnel *secureTunnel, int errorCode, const ConnectionStartedEventData &)> OnConnectionStarted
Definition: SecureTunnel.h:544
std::shared_ptr< ConnectionData > connectionData
Definition: SecureTunnel.h:256
SendMessageCompleteData(const SendMessageCompleteData &)=delete
std::function< void(void)> OnConnectionShutdown
Definition: SecureTunnel.h:514
AWS_CRT_CPP_API Allocator * ApiAllocator() noexcept
Definition: Allocator.cpp:24
Message(const Message &)=delete
SendMessageCompleteData(SendMessageCompleteData &&) noexcept=delete
std::shared_ptr< ConnectionStartedData > connectionStartedData
Definition: SecureTunnel.h:430
Definition: SecureTunnel.h:428
Definition: SecureTunnel.h:366
Definition: SecureTunnel.h:179
Definition: SecureTunnel.h:437
Definition: SecureTunnel.h:587
std::function< void(SecureTunnel *secureTunnel, int errorCode, const ConnectionResetEventData &)> OnConnectionReset
Definition: SecureTunnel.h:550
std::function< void(SecureTunnel *secureTunnel, const StreamStoppedEventData &)> OnStreamStopped
Definition: SecureTunnel.h:537
std::shared_ptr< ConnectionResetData > connectionResetData
Definition: SecureTunnel.h:492
std::function< void(SecureTunnel *secureTunnel, int errorCode)> OnConnectionFailure
Definition: SecureTunnel.h:509
Definition: TlsOptions.h:293
std::function< void()> OnStreamStart
Definition: SecureTunnel.h:573
StreamStoppedData(StreamStoppedData &&) noexcept=delete
ConnectionData(const ConnectionData &)=delete
std::function< void(void)> OnStreamReset
Definition: SecureTunnel.h:577
ConnectionStartedEventData()
Definition: SecureTunnel.h:429
ConnectionResetEventData()
Definition: SecureTunnel.h:491
StreamStoppedEventData()
Definition: SecureTunnel.h:367
Definition: SecureTunnel.h:317
Definition: SecureTunnel.h:375
MessageReceivedEventData()
Definition: SecureTunnel.h:132
#define AWS_IOTSECURETUNNELING_API
Definition: Exports.h:30
Definition: SecureTunnel.h:326
Definition: SecureTunnel.h:131
ConnectionStartedData(ConnectionStartedData &&) noexcept=delete
std::function< void(void)> OnSessionReset
Definition: SecureTunnel.h:555
SecureTunnel(const SecureTunnel &)=delete
std::function< void(SecureTunnel *secureTunnel, const ConnectionSuccessEventData &)> OnConnectionSuccess
Definition: SecureTunnel.h:503
StreamStartedData(StreamStartedData &&) noexcept=delete
Definition: SecureTunnel.h:263
Definition: SecureTunnel.h:490
StreamStartedEventData()
Definition: SecureTunnel.h:318
Definition: SecureTunnel.h:188
Definition: HttpConnection.h:270
Definition: SocketOptions.h:48
std::function< void(SecureTunnel *secureTunnel)> OnStopped
Definition: SecureTunnel.h:560
aws_byte_buf ByteBuf
Definition: Types.h:30
Definition: StringView.h:852
ConnectionData(ConnectionData &&) noexcept=delete
ConnectionResetData(ConnectionResetData &&) noexcept=delete
Definition: Allocator.h:11
std::shared_ptr< SendMessageCompleteData > sendMessageCompleteData
Definition: SecureTunnel.h:181
std::function< void(SecureTunnel *secureTunnel, const MessageReceivedEventData &)> OnMessageReceived
Definition: SecureTunnel.h:525
ConnectionResetData(const ConnectionResetData &)=delete
std::function< void(SecureTunnel *secureTunnel, int errorCode, const SendMessageCompleteEventData &)> OnSendMessageComplete
Definition: SecureTunnel.h:520
aws_byte_cursor ByteCursor
Definition: Types.h:31
std::function< void(SecureTunnel *secureTunnel, int errorCode, const StreamStartedEventData &)> OnStreamStarted
Definition: SecureTunnel.h:532
aws_allocator Allocator
Definition: Allocator.h:14
Definition: SecureTunnel.h:23
SendMessageCompleteEventData()
Definition: SecureTunnel.h:180
std::function< void(void)> OnConnectionComplete
Definition: SecureTunnel.h:565
std::function< void(const Crt::ByteBuf &data)> OnDataReceive
Definition: SecureTunnel.h:569
std::shared_ptr< Message > message
Definition: SecureTunnel.h:133
Definition: Bootstrap.h:35
Definition: SecureTunnel.h:254
std::function< void(int errorCode)> OnSendDataComplete
Definition: SecureTunnel.h:581
Definition: SecureTunnel.h:140
StreamStartedData(const StreamStartedData &)=delete
Message(Message &&) noexcept=delete
Definition: SecureTunnel.h:956
std::shared_ptr< StreamStoppedData > streamStoppedData
Definition: SecureTunnel.h:368
ConnectionSuccessEventData()
Definition: SecureTunnel.h:255
ConnectionStartedData(const ConnectionStartedData &)=delete