-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static API changes #124
Static API changes #124
Conversation
…n Object Operation handler. Add AwaStaticClient_SetObjectOperationHandler(). Deprecate AwaStaticClient_DefineObjectWithHandler(). Signed-off-by: David Antliff <[email protected]>
… a Resource Operation handler, or storage pointer. Add AwaStaticClient_DefineResource(). Add AwaStaticClient_SetResourceOperationHandler(). Add AwaStaticClient_SetResourceStorageWithPointer(). Add AwaStaticClient_SetResourceStorageWithPointerArray(). Deprecate AwaStaticClient_DefineResourceWithHandler(). Deprecate AwaStaticClient_DefineResourceWithPointer(). Deprecate AwaStaticClient_DefineResourceWithPointerArray(). Signed-off-by: David Antliff <[email protected]>
ASSERT_EQ(AwaError_Success, AwaStaticClient_DefineResource(client_, 7997, 1, "TestResource", AwaResourceType_Opaque, 1, 1, AwaResourceOperations_ReadWrite)); | ||
EXPECT_EQ(AwaError_StaticClientInvalid, AwaStaticClient_SetResourceStorageWithPointer(NULL, 7996, 1, &o, sizeof(o), 0)); | ||
EXPECT_EQ(AwaError_DefinitionInvalid, AwaStaticClient_SetResourceStorageWithPointer(client_, 7997, 1, &o, 0, 0)); | ||
EXPECT_EQ(AwaError_DefinitionInvalid, AwaStaticClient_SetResourceStorageWithPointer(client_, 7997, 1, NULL, 0, 0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to test AwaStaticClient_SetResourceStorageWithPointer on a resource that hasn't been defined using AwaStaticClient_DefineResource:
ASSERT_EQ(AwaError_DefinitionInvalid, AwaStaticClient_SetResourceStorageWithPointer(client_, 7996, 1, &o, sizeof(o), 0));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
+1 when comments addressed |
…jects and resources in the Static API. This is now consistent with the Gateway API, where Name follows the IDs. Add CMakeLists.txt for examples/tutorials, to ensure they are built alongside the API. Signed-off-by: David Antliff <[email protected]>
40b5d4c
to
1a446eb
Compare
Signed-off-by: David Antliff <[email protected]>
63b6da7
to
8fdaae8
Compare
These changes are intended to improve consistency with the Gateway API, and separate the concerns of Object/Resource definition from how the entity is managed or stored. This results in the deprecation of some existing API functions. These deprecated functions will be removed after 0.1.8 has been released.
Also includes a minor documentation update by reserving a section for "Best Practices".