Skip to content

Commit 53d3c8e

Browse files
committed
Bug fixes from code gen
1 parent 98d25fe commit 53d3c8e

File tree

11 files changed

+3814
-3595
lines changed

11 files changed

+3814
-3595
lines changed

eventstreamrpc/include/aws/eventstreamrpc/EventStreamClient.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,9 @@ namespace Aws
621621
const OperationModelContext &m_operationModelContext;
622622

623623
private:
624-
EventStreamRpcStatusCode HandleData(const Crt::String &modelName, const Crt::Optional<Crt::ByteBuf> &payload);
624+
EventStreamRpcStatusCode HandleData(
625+
const Crt::String &modelName,
626+
const Crt::Optional<Crt::ByteBuf> &payload);
625627
EventStreamRpcStatusCode HandleError(
626628
const Crt::String &modelName,
627629
const Crt::Optional<Crt::ByteBuf> &payload,

eventstreamrpc/source/EventStreamClient.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ namespace Aws
3232
std::promise<RpcError> onFlushPromise;
3333
};
3434

35-
MessageAmendment::MessageAmendment(Crt::Allocator *allocator) noexcept : m_headers(), m_payload(), m_allocator(allocator)
35+
MessageAmendment::MessageAmendment(Crt::Allocator *allocator) noexcept
36+
: m_headers(), m_payload(), m_allocator(allocator)
3637
{
3738
}
3839

@@ -247,15 +248,15 @@ namespace Aws
247248

248249
struct aws_event_stream_rpc_client_connection_options connOptions;
249250
AWS_ZERO_STRUCT(connOptions);
250-
if(connectionConfig.GetHostName().has_value())
251+
if (connectionConfig.GetHostName().has_value())
251252
{
252253
connOptions.host_name = connectionConfig.GetHostName().value().c_str();
253254
}
254255
else
255256
{
256257
baseError = EVENT_STREAM_RPC_NULL_PARAMETER;
257258
}
258-
if(connectionConfig.GetPort().has_value())
259+
if (connectionConfig.GetPort().has_value())
259260
{
260261
connOptions.port = connectionConfig.GetPort().value();
261262
}
@@ -264,7 +265,7 @@ namespace Aws
264265
baseError = EVENT_STREAM_RPC_NULL_PARAMETER;
265266
}
266267

267-
if(connectionConfig.GetClientBootstrap() != nullptr)
268+
if (connectionConfig.GetClientBootstrap() != nullptr)
268269
{
269270
connOptions.bootstrap = connectionConfig.GetClientBootstrap()->GetUnderlyingHandle();
270271
}
@@ -287,15 +288,16 @@ namespace Aws
287288
if (connectionConfig.GetSocketType().has_value())
288289
{
289290
socketOptions.SetSocketType(connectionConfig.GetSocketType().value());
290-
}
291+
}
291292
connOptions.socket_options = &socketOptions.GetImpl();
292293

293294
connOptions.on_connection_setup = ClientConnection::s_onConnectionSetup;
294295
connOptions.on_connection_protocol_message = ClientConnection::s_onProtocolMessage;
295296
connOptions.on_connection_shutdown = ClientConnection::s_onConnectionShutdown;
296297
connOptions.user_data = reinterpret_cast<void *>(this);
297298
m_lifecycleHandler = connectionLifecycleHandler;
298-
if(connectMessageAmender) {
299+
if (connectMessageAmender)
300+
{
299301
m_connectMessageAmender = connectMessageAmender;
300302
}
301303

ipc/include/aws/greengrass/GreengrassCoreIpcClient.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ namespace Aws
2424
{
2525
public:
2626
GreengrassCoreIpcClient(
27-
Crt::Io::ClientBootstrap &clientBootstrap,
28-
Crt::Allocator *allocator = Crt::g_allocator) noexcept;
27+
Aws::Crt::Io::ClientBootstrap &clientBootstrap,
28+
Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept;
2929
std::future<RpcError> Connect(
3030
ConnectionLifecycleHandler &lifecycleHandler,
3131
ConnectionConfig connectionConfig = DefaultConnectionConfig()) noexcept;
@@ -64,8 +64,8 @@ namespace Aws
6464
private:
6565
GreengrassCoreIpcServiceModel m_greengrassCoreIpcServiceModel;
6666
ClientConnection m_connection;
67-
Crt::Io::ClientBootstrap &m_clientBootstrap;
68-
Crt::Allocator *m_allocator;
67+
Aws::Crt::Io::ClientBootstrap &m_clientBootstrap;
68+
Aws::Crt::Allocator *m_allocator;
6969
MessageAmendment m_connectAmendment;
7070
};
7171
} // namespace Greengrass

ipc/include/aws/greengrass/GreengrassCoreIpcModel.h

Lines changed: 1250 additions & 1224 deletions
Large diffs are not rendered by default.

ipc/source/GreengrassCoreIpcClient.cpp

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,34 @@ namespace Aws
66
namespace Greengrass
77
{
88
GreengrassCoreIpcClient::GreengrassCoreIpcClient(
9-
Crt::Io::ClientBootstrap &clientBootstrap,
10-
Crt::Allocator *allocator) noexcept
9+
Aws::Crt::Io::ClientBootstrap &clientBootstrap,
10+
Aws::Crt::Allocator *allocator) noexcept
1111
: m_connection(allocator), m_clientBootstrap(clientBootstrap), m_allocator(allocator)
1212
{
1313
m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse(
14-
Crt::String("aws.greengrass#InvalidTokenError"), InvalidTokenError::s_allocateFromPayload);
14+
Aws::Crt::String("aws.greengrass#InvalidTokenError"), InvalidTokenError::s_allocateFromPayload);
1515
m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse(
16-
Crt::String("aws.greengrass#FailedUpdateConditionCheckError"),
16+
Aws::Crt::String("aws.greengrass#FailedUpdateConditionCheckError"),
1717
FailedUpdateConditionCheckError::s_allocateFromPayload);
1818
m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse(
19-
Crt::String("aws.greengrass#ConflictError"), ConflictError::s_allocateFromPayload);
19+
Aws::Crt::String("aws.greengrass#ConflictError"), ConflictError::s_allocateFromPayload);
2020
m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse(
21-
Crt::String("aws.greengrass#ComponentNotFoundError"), ComponentNotFoundError::s_allocateFromPayload);
21+
Aws::Crt::String("aws.greengrass#ComponentNotFoundError"),
22+
ComponentNotFoundError::s_allocateFromPayload);
2223
m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse(
23-
Crt::String("aws.greengrass#ResourceNotFoundError"), ResourceNotFoundError::s_allocateFromPayload);
24+
Aws::Crt::String("aws.greengrass#ResourceNotFoundError"), ResourceNotFoundError::s_allocateFromPayload);
2425
m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse(
25-
Crt::String("aws.greengrass#InvalidArgumentsError"), InvalidArgumentsError::s_allocateFromPayload);
26+
Aws::Crt::String("aws.greengrass#InvalidArgumentsError"), InvalidArgumentsError::s_allocateFromPayload);
2627
m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse(
27-
Crt::String("aws.greengrass#InvalidArtifactsDirectoryPathError"),
28+
Aws::Crt::String("aws.greengrass#InvalidArtifactsDirectoryPathError"),
2829
InvalidArtifactsDirectoryPathError::s_allocateFromPayload);
2930
m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse(
30-
Crt::String("aws.greengrass#InvalidRecipeDirectoryPathError"),
31+
Aws::Crt::String("aws.greengrass#InvalidRecipeDirectoryPathError"),
3132
InvalidRecipeDirectoryPathError::s_allocateFromPayload);
3233
m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse(
33-
Crt::String("aws.greengrass#ServiceError"), ServiceError::s_allocateFromPayload);
34+
Aws::Crt::String("aws.greengrass#ServiceError"), ServiceError::s_allocateFromPayload);
3435
m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse(
35-
Crt::String("aws.greengrass#UnauthorizedError"), UnauthorizedError::s_allocateFromPayload);
36+
Aws::Crt::String("aws.greengrass#UnauthorizedError"), UnauthorizedError::s_allocateFromPayload);
3637
}
3738

3839
std::future<RpcError> GreengrassCoreIpcClient::Connect(

0 commit comments

Comments
 (0)