From b76ceb4e6e499cdb21393e9ab625b9ceecbcef5c Mon Sep 17 00:00:00 2001 From: Pierre Avital Date: Wed, 17 Jan 2024 11:28:21 +0100 Subject: [PATCH] remove accidental internal header inclusions --- examples/unix/c11/z_put.c | 2 -- examples/unix/c11/z_sub.c | 3 --- include/zenoh-pico/api/types.h | 6 +++--- src/api/api.c | 14 +++++--------- zenohpico.pc | 2 +- 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/examples/unix/c11/z_put.c b/examples/unix/c11/z_put.c index 294e03ef5..e79639f25 100644 --- a/examples/unix/c11/z_put.c +++ b/examples/unix/c11/z_put.c @@ -22,8 +22,6 @@ #include "zenoh-pico/api/macros.h" #include "zenoh-pico/api/types.h" -#include "zenoh-pico/collections/bytes.h" -#include "zenoh-pico/protocol/core.h" #if Z_FEATURE_PUBLICATION == 1 int main(int argc, char **argv) { diff --git a/examples/unix/c11/z_sub.c b/examples/unix/c11/z_sub.c index 8f263733a..c069960cb 100644 --- a/examples/unix/c11/z_sub.c +++ b/examples/unix/c11/z_sub.c @@ -20,9 +20,6 @@ #include #include -#include "zenoh-pico/api/types.h" -#include "zenoh-pico/protocol/core.h" - #if Z_FEATURE_SUBSCRIPTION == 1 int8_t attachment_handler(z_bytes_t key, z_bytes_t value, void *ctx) { (void)ctx; diff --git a/include/zenoh-pico/api/types.h b/include/zenoh-pico/api/types.h index 6de38aca3..a672ff4e2 100644 --- a/include/zenoh-pico/api/types.h +++ b/include/zenoh-pico/api/types.h @@ -274,11 +274,11 @@ typedef struct { * * Members: * z_encoding_t encoding: The encoding of the payload. + * z_attachment_t attachment: an attachment to the response. */ typedef struct { z_encoding_t encoding; - // TODO: * z_attachment_t attachment: an attachment to the response. - // TODO: z_attachment_t attachment; + z_attachment_t attachment; } z_query_reply_options_t; /** @@ -343,7 +343,7 @@ typedef struct { z_value_t value; z_query_consolidation_t consolidation; z_query_target_t target; - // TODO: z_attachment_t attachment; + z_attachment_t attachment; } z_get_options_t; /** diff --git a/src/api/api.c b/src/api/api.c index 7c0a10fb0..1b7eecb48 100644 --- a/src/api/api.c +++ b/src/api/api.c @@ -722,12 +722,10 @@ z_owned_keyexpr_t z_publisher_keyexpr(z_publisher_t publisher) { OWNED_FUNCTIONS_PTR_INTERNAL(z_reply_t, z_owned_reply_t, reply, _z_reply_free, _z_owner_noop_copy) z_get_options_t z_get_options_default(void) { - return (z_get_options_t){ - .target = z_query_target_default(), - .consolidation = z_query_consolidation_default(), - .value = {.encoding = z_encoding_default(), .payload = _z_bytes_empty()}, - // TODO: .attachment = z_attachment_null() - }; + return (z_get_options_t){.target = z_query_target_default(), + .consolidation = z_query_consolidation_default(), + .value = {.encoding = z_encoding_default(), .payload = _z_bytes_empty()}, + .attachment = z_attachment_null()}; } typedef struct __z_reply_handler_wrapper_t { @@ -775,9 +773,7 @@ int8_t z_get(z_session_t zs, z_keyexpr_t keyexpr, const char *parameters, z_owne } ret = _z_query(zs._val, keyexpr, parameters, opt.target, opt.consolidation.mode, opt.value, __z_reply_handler, - wrapped_ctx, callback->drop, ctx, z_attachment_null() - // TODO: opt.attachment - ); + wrapped_ctx, callback->drop, ctx, opt.attachment); return ret; } diff --git a/zenohpico.pc b/zenohpico.pc index 9d9ccaf90..5d300add1 100644 --- a/zenohpico.pc +++ b/zenohpico.pc @@ -3,6 +3,6 @@ prefix=/usr/local Name: zenohpico Description: URL: -Version: 0.11.20240116dev +Version: 0.11.20240117dev Cflags: -I${prefix}/include Libs: -L${prefix}/lib -lzenohpico