Skip to content

Commit

Permalink
Add export "C" for proper closures callbacks export
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Oct 15, 2024
1 parent c75c89a commit 4ca6e48
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/zenoh-pico/net/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
#include "zenoh-pico/net/session.h"
#include "zenoh-pico/protocol/core.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* The query to be answered by a queryable.
*/
Expand Down Expand Up @@ -58,4 +62,8 @@ _z_queryable_t _z_queryable_null(void);
bool _z_queryable_check(const _z_queryable_t *queryable);
#endif

#ifdef __cplusplus
}
#endif

#endif /* ZENOH_PICO_QUERY_NETAPI_H */
8 changes: 8 additions & 0 deletions include/zenoh-pico/net/reply.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#include "zenoh-pico/protocol/core.h"
#include "zenoh-pico/session/session.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* Reply tag values.
*
Expand Down Expand Up @@ -97,4 +101,8 @@ void _z_pending_reply_clear(_z_pending_reply_t *res);
_Z_ELEM_DEFINE(_z_pending_reply, _z_pending_reply_t, _z_noop_size, _z_pending_reply_clear, _z_noop_copy)
_Z_LIST_DEFINE(_z_pending_reply, _z_pending_reply_t)

#ifdef __cplusplus
}
#endif

#endif /* ZENOH_PICO_REPLY_NETAPI_H */
7 changes: 7 additions & 0 deletions include/zenoh-pico/net/sample.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
#include "zenoh-pico/protocol/core.h"
#include "zenoh-pico/session/session.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* A zenoh-net data sample.
*
Expand Down Expand Up @@ -58,5 +62,8 @@ _z_sample_t _z_sample_duplicate(const _z_sample_t *src);
_z_sample_t _z_sample_create(_z_keyexpr_t *key, const _z_bytes_t payload, const _z_timestamp_t *timestamp,
_z_encoding_t *encoding, const z_sample_kind_t kind, const _z_qos_t qos,
const _z_bytes_t attachment, z_reliability_t reliability);
#ifdef __cplusplus
}
#endif

#endif /* ZENOH_PICO_SAMPLE_NETAPI_H */
8 changes: 8 additions & 0 deletions include/zenoh-pico/session/session.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#include "zenoh-pico/protocol/core.h"
#include "zenoh-pico/transport/manager.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* The callback signature of the cleanup functions.
*/
Expand Down Expand Up @@ -203,4 +207,8 @@ void _z_declare_data_clear(_z_declare_data_t *data);
_Z_ELEM_DEFINE(_z_declare_data, _z_declare_data_t, _z_noop_size, _z_declare_data_clear, _z_noop_copy)
_Z_LIST_DEFINE(_z_declare_data, _z_declare_data_t)

#ifdef __cplusplus
}
#endif

#endif /* INCLUDE_ZENOH_PICO_SESSION_SESSION_H */

0 comments on commit 4ca6e48

Please sign in to comment.