Skip to content

Commit

Permalink
Add OC_API annotations to oc_enums.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielius1922 committed Sep 27, 2024
1 parent e4b351b commit be6eb62
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/oc_enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
extern "C" {
#endif

#include "oc_export.h"
#include "oc_helpers.h"
#include "util/oc_compiler.h"

Expand Down Expand Up @@ -204,6 +205,7 @@ typedef enum oc_locn_t {
* @param val the enum value
* @return const char* the string
*/
OC_API
const char *oc_enum_to_str(oc_enum_t val);

/**
Expand All @@ -212,6 +214,7 @@ const char *oc_enum_to_str(oc_enum_t val);
* @param pos the enum value of the position description
* @return const char* the string
*/
OC_API
const char *oc_enum_pos_desc_to_str(oc_pos_description_t pos);

/**
Expand All @@ -220,6 +223,7 @@ const char *oc_enum_pos_desc_to_str(oc_pos_description_t pos);
* @param locn the location enum value
* @return const char* the string
*/
OC_API
const char *oc_enum_locn_to_str(oc_locn_t locn);

/**
Expand All @@ -230,6 +234,7 @@ const char *oc_enum_locn_to_str(oc_locn_t locn);
* NULL)
* @return oc_locn_t the location value
*/
OC_API
oc_locn_t oc_str_to_enum_locn(oc_string_t locn_str, bool *oc_defined)
OC_NONNULL(2);

Expand Down
1 change: 1 addition & 0 deletions port/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ set(sources
${CMAKE_CURRENT_SOURCE_DIR}/../../../api/client/oc_client_cb.c
${CMAKE_CURRENT_SOURCE_DIR}/../../../api/oc_base64.c
${CMAKE_CURRENT_SOURCE_DIR}/../../../api/oc_blockwise.c
${CMAKE_CURRENT_SOURCE_DIR}/../../../api/oc_buffer_settings.c
${CMAKE_CURRENT_SOURCE_DIR}/../../../api/oc_client_api.c
${CMAKE_CURRENT_SOURCE_DIR}/../../../api/oc_client_role.c
${CMAKE_CURRENT_SOURCE_DIR}/../../../api/oc_con_resource.c
Expand Down
1 change: 1 addition & 0 deletions port/windows/vs2015/IoTivity-lite.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@
<ClCompile Include="..\..\..\api\cloud\rd_client.c" />
<ClCompile Include="..\..\..\api\oc_base64.c" />
<ClCompile Include="..\..\..\api\oc_blockwise.c" />
<ClCompile Include="..\..\..\api\oc_buffer_settings.c" />
<ClCompile Include="..\..\..\api\oc_client_api.c" />
<ClCompile Include="..\..\..\api\oc_clock.c" />
<ClCompile Include="..\..\..\api\oc_collection.c" />
Expand Down
3 changes: 3 additions & 0 deletions port/windows/vs2015/IoTivity-lite.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@
<ClCompile Include="..\..\..\api\oc_blockwise.c">
<Filter>Core</Filter>
</ClCompile>
<ClCompile Include="..\..\..\api\oc_buffer_settings.c">
<Filter>Core</Filter>
</ClCompile>
<ClCompile Include="..\..\..\util\oc_buffer.c">
<Filter>Core</Filter>
</ClCompile>
Expand Down
1 change: 1 addition & 0 deletions swig/swig_interfaces/oc_buffer_settings.i
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
%rename (getMaxAppDataSize) oc_get_max_app_data_size;
%rename (getBlockSize) oc_get_block_size;

#define OC_API
%include "oc_buffer_settings.h"
1 change: 1 addition & 0 deletions swig/swig_interfaces/oc_enums.i
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@
%rename(locationToString) oc_enum_locn_to_str;
%rename(stringToLocation) oc_str_to_enum_locn;

#define OC_API
#define OC_NONNULL(...)
%include "oc_enums.h"

0 comments on commit be6eb62

Please sign in to comment.