From a0d7541c5aa864cec9242dcd35e54a424e1ed7e6 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Thu, 5 Sep 2024 11:43:53 +0200 Subject: [PATCH] updated autogenerared headers --- include/zenoh_commons.h | 6 ++++++ include/zenoh_macros.h | 26 +++++++++++++------------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/include/zenoh_commons.h b/include/zenoh_commons.h index 386c5582b..1b8f1a408 100644 --- a/include/zenoh_commons.h +++ b/include/zenoh_commons.h @@ -2613,6 +2613,12 @@ ZENOHC_API enum z_whatami_t z_hello_whatami(const struct z_loaned_hello_t *this_ #if defined(UNSTABLE) ZENOHC_API z_id_t z_hello_zid(const struct z_loaned_hello_t *this_); #endif +/** + * Formats the `z_id_t` into 16-digit hex string (LSB-first order) + */ +#if defined(UNSTABLE) +ZENOHC_API void z_id_to_string(const z_id_t *zid, struct z_owned_string_t *dst); +#endif /** * Fetches the Zenoh IDs of all connected peers. * diff --git a/include/zenoh_macros.h b/include/zenoh_macros.h index 8123e8af9..2919ffcc5 100644 --- a/include/zenoh_macros.h +++ b/include/zenoh_macros.h @@ -657,43 +657,43 @@ inline void z_call(const z_loaned_closure_sample_t* closure, const z_loaned_samp z_closure_sample_call(closure, sample); }; -extern "C" typedef void (*z_closure_drop_callback_t)(void*); +extern "C" using z_closure_drop_callback_t = void(void*); -extern "C" typedef void (*z_closure_hello_callback_t)(const z_loaned_hello_t*, void*); +extern "C" using z_closure_hello_callback_t = void(const z_loaned_hello_t*, void*); inline void z_closure( z_owned_closure_hello_t* closure, - z_closure_hello_callback_t call, - z_closure_drop_callback_t drop, + z_closure_hello_callback_t* call, + z_closure_drop_callback_t* drop, void *context) { closure->context = context; closure->drop = drop; closure->call = call; }; -extern "C" typedef void (*z_closure_query_callback_t)(const z_loaned_query_t*, void*); +extern "C" using z_closure_query_callback_t = void(const z_loaned_query_t*, void*); inline void z_closure( z_owned_closure_query_t* closure, - z_closure_query_callback_t call, - z_closure_drop_callback_t drop, + z_closure_query_callback_t* call, + z_closure_drop_callback_t* drop, void *context) { closure->context = context; closure->drop = drop; closure->call = call; }; -extern "C" typedef void (*z_closure_reply_callback_t)(const z_loaned_reply_t*, void*); +extern "C" using z_closure_reply_callback_t = void(const z_loaned_reply_t*, void*); inline void z_closure( z_owned_closure_reply_t* closure, - z_closure_reply_callback_t call, - z_closure_drop_callback_t drop, + z_closure_reply_callback_t* call, + z_closure_drop_callback_t* drop, void *context) { closure->context = context; closure->drop = drop; closure->call = call; }; -extern "C" typedef void (*z_closure_sample_callback_t)(const z_loaned_sample_t*, void*); +extern "C" using z_closure_sample_callback_t = void(const z_loaned_sample_t*, void*); inline void z_closure( z_owned_closure_sample_t* closure, - z_closure_sample_callback_t call, - z_closure_drop_callback_t drop, + z_closure_sample_callback_t* call, + z_closure_drop_callback_t* drop, void *context) { closure->context = context; closure->drop = drop;