Skip to content

Commit

Permalink
Shared Library for Greengrass IPC (#620)
Browse files Browse the repository at this point in the history
* regenerate code, not formatted

* formatting

* formatting

* generated CMakeLists.txt

* regenerated

* initial formatting

* formatting

* generated export macro

* change AWS_GREENGRASS_API to AWS_GREENGRASSIPC_API

* ConnectionConfig needs to be a dll-interface class due to use by greengrassipc

* declspec

* add windows build shared libs job to ci

* update compile definition name

* declspec change

* export operations, structures, and enums

* revert back cmake file

* test with service client model name

* update event stream rpc export

* remove export for status

* keep enum private

* rename preprocessor macro name

* export enum value and remove sample test

* remove enum export

* remove forward decl

---------

Co-authored-by: Zhihui Xia <zhvxia@amazon.com>
  • Loading branch information
sbSteveK and xiazhvera authored Sep 6, 2023
1 parent 1ddf4ab commit f9b2afc
Show file tree
Hide file tree
Showing 8 changed files with 802 additions and 526 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,18 @@ jobs:
cd ${{ env.CI_FOLDER }}
echo "Starting to run AppVerifier with cycle pub-sub sample"
python ${{ env.CI_UTILS_FOLDER }}/appverifier_launch_sample.py --sample_file ".\aws-iot-device-sdk-cpp-v2\build\samples\pub_sub\cycle_pub_sub\RelWithDebInfo\cycle-pub-sub.exe" --sample_secret_endpoint 'ci/endpoint' --sample_secret_certificate 'ci/CyclePubSub/cert' --sample_secret_private_key 'ci/CyclePubSub/key'
windows-shared-lib:
runs-on: windows-latest
permissions:
id-token: write # This is required for requesting the JWT
steps:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
md ${{ env.CI_FOLDER }}
cd ${{ env.CI_FOLDER }}
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
osx:
runs-on: macos-latest
permissions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ namespace Aws
/**
* Configuration structure holding all configurations relating to eventstream RPC connection establishment
*/
class ConnectionConfig
class AWS_EVENTSTREAMRPC_API ConnectionConfig
{
public:
ConnectionConfig() noexcept : m_clientBootstrap(nullptr), m_connectRequestCallback(nullptr) {}
Expand Down Expand Up @@ -215,7 +215,7 @@ namespace Aws
EVENT_STREAM_RPC_CRT_ERROR
};

struct RpcError
struct AWS_EVENTSTREAMRPC_API RpcError
{
EventStreamRpcStatusCode baseStatus;
int crtError;
Expand Down Expand Up @@ -256,7 +256,7 @@ namespace Aws
};

/* User data passed to callbacks for a new stream. */
class ContinuationCallbackData
class AWS_EVENTSTREAMRPC_API ContinuationCallbackData
{
public:
ContinuationCallbackData(
Expand Down
4 changes: 2 additions & 2 deletions eventstream_rpc/tests/include/awstest/EchoTestRpcClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ using namespace Aws::Eventstreamrpc;

namespace Awstest
{
class DefaultConnectionConfig : public ConnectionConfig
class AWS_ECHOTESTRPC_API DefaultConnectionConfig : public ConnectionConfig
{
public:
DefaultConnectionConfig() noexcept;
};

class EchoTestRpcClient
class AWS_ECHOTESTRPC_API EchoTestRpcClient
{
public:
EchoTestRpcClient(
Expand Down
Loading

0 comments on commit f9b2afc

Please sign in to comment.