diff --git a/include/zenoh-pico/session/interest.h b/include/zenoh-pico/session/interest.h index 83763beb9..d1e7b900a 100644 --- a/include/zenoh-pico/session/interest.h +++ b/include/zenoh-pico/session/interest.h @@ -27,10 +27,10 @@ void _z_unregister_interest(_z_session_t *zn, _z_session_interest_rc_t *intr); void _z_flush_interest(_z_session_t *zn); #endif // Z_FEATURE_INTEREST == 1 -int8_t _z_interest_process_declare(_z_session_t *zn, const _z_declaration_t *decl); -int8_t _z_interest_process_undeclare(_z_session_t *zn, const _z_declaration_t *decl); -int8_t _z_process_final_interest(_z_session_t *zn, uint32_t id); -int8_t _z_process_undeclare_interest(_z_session_t *zn, uint32_t id); -int8_t _z_process_declare_interest(_z_session_t *zn, _z_keyexpr_t key, uint32_t id, uint8_t flags); +int8_t _z_interest_process_declares(_z_session_t *zn, const _z_declaration_t *decl); +int8_t _z_interest_process_undeclares(_z_session_t *zn, const _z_declaration_t *decl); +int8_t _z_interest_process_final_interest(_z_session_t *zn, uint32_t id); +int8_t _z_interest_process_undeclare_interest(_z_session_t *zn, uint32_t id); +int8_t _z_interest_process_declare_interest(_z_session_t *zn, _z_keyexpr_t key, uint32_t id, uint8_t flags); #endif /* ZENOH_PICO_SESSION_INTEREST_H */ diff --git a/src/session/interest.c b/src/session/interest.c index 5f54ec048..515b15b21 100644 --- a/src/session/interest.c +++ b/src/session/interest.c @@ -113,7 +113,7 @@ _z_session_interest_rc_t *_z_register_interest(_z_session_t *zn, _z_session_inte return ret; } -int8_t _z_interest_process_declare(_z_session_t *zn, const _z_declaration_t *decl) { +int8_t _z_interest_process_declares(_z_session_t *zn, const _z_declaration_t *decl) { const _z_keyexpr_t *decl_key = NULL; _z_interest_msg_t msg; switch (decl->_tag) { @@ -154,7 +154,7 @@ int8_t _z_interest_process_declare(_z_session_t *zn, const _z_declaration_t *dec return _Z_RES_OK; } -int8_t _z_interest_process_undeclare(_z_session_t *zn, const _z_declaration_t *decl) { +int8_t _z_interest_process_undeclares(_z_session_t *zn, const _z_declaration_t *decl) { const _z_keyexpr_t *decl_key = NULL; _z_interest_msg_t msg; switch (decl->_tag) { @@ -208,7 +208,7 @@ void _z_flush_interest(_z_session_t *zn) { _zp_session_unlock_mutex(zn); } -int8_t _z_process_final_interest(_z_session_t *zn, uint32_t id) { +int8_t _z_interest_process_final_interest(_z_session_t *zn, uint32_t id) { _z_interest_msg_t msg = {.type = _Z_INTEREST_MSG_TYPE_FINAL, .id = id}; // Retrieve interest _zp_session_lock_mutex(zn); @@ -221,7 +221,7 @@ int8_t _z_process_final_interest(_z_session_t *zn, uint32_t id) { return _Z_RES_OK; } -int8_t _z_process_undeclare_interest(_z_session_t *zn, uint32_t id) { +int8_t _z_interest_process_undeclare_interest(_z_session_t *zn, uint32_t id) { _ZP_UNUSED(zn); _ZP_UNUSED(id); // Update future masks @@ -318,7 +318,7 @@ static int8_t _z_interest_send_final_interest(_z_session_t *zn, uint32_t id) { return _Z_RES_OK; } -int8_t _z_process_declare_interest(_z_session_t *zn, _z_keyexpr_t key, uint32_t id, uint8_t flags) { +int8_t _z_interest_process_declare_interest(_z_session_t *zn, _z_keyexpr_t key, uint32_t id, uint8_t flags) { _ZP_UNUSED(key); _ZP_UNUSED(id); // Check transport type @@ -350,31 +350,31 @@ int8_t _z_process_declare_interest(_z_session_t *zn, _z_keyexpr_t key, uint32_t } #else -int8_t _z_interest_process_declare(_z_session_t *zn, const _z_declaration_t *decl) { +int8_t _z_interest_process_declares(_z_session_t *zn, const _z_declaration_t *decl) { _ZP_UNUSED(zn); _ZP_UNUSED(decl); return _Z_RES_OK; } -int8_t _z_interest_process_undeclare(_z_session_t *zn, const _z_declaration_t *decl) { +int8_t _z_interest_process_undeclares(_z_session_t *zn, const _z_declaration_t *decl) { _ZP_UNUSED(zn); _ZP_UNUSED(decl); return _Z_RES_OK; } -int8_t _z_process_final_interest(_z_session_t *zn, uint32_t id) { +int8_t _z_interest_process_final_interest(_z_session_t *zn, uint32_t id) { _ZP_UNUSED(zn); _ZP_UNUSED(id); return _Z_RES_OK; } -int8_t _z_process_undeclare_interest(_z_session_t *zn, uint32_t id) { +int8_t _z_interest_process_undeclare_interest(_z_session_t *zn, uint32_t id) { _ZP_UNUSED(zn); _ZP_UNUSED(id); return _Z_RES_OK; } -int8_t _z_process_declare_interest(_z_session_t *zn, _z_keyexpr_t key, uint32_t id, uint8_t flags) { +int8_t _z_interest_process_declare_interest(_z_session_t *zn, _z_keyexpr_t key, uint32_t id, uint8_t flags) { _ZP_UNUSED(zn); _ZP_UNUSED(key); _ZP_UNUSED(id); diff --git a/src/session/rx.c b/src/session/rx.c index 1a965f6fd..bdbe96be1 100644 --- a/src/session/rx.c +++ b/src/session/rx.c @@ -53,27 +53,27 @@ int8_t _z_handle_network_message(_z_session_t *zn, _z_zenoh_message_t *msg, uint _z_unregister_resource(zn, decl._decl._body._undecl_kexpr._id, local_peer_id); } break; case _Z_DECL_INTEREST: { - _z_process_declare_interest(zn, decl._decl._body._decl_interest._keyexpr, - decl._decl._body._decl_interest._id, - decl._decl._body._decl_interest.interest_flags); + _z_interest_process_declare_interest(zn, decl._decl._body._decl_interest._keyexpr, + decl._decl._body._decl_interest._id, + decl._decl._body._decl_interest.interest_flags); } break; case _Z_UNDECL_INTEREST: { - _z_process_undeclare_interest(zn, decl._decl._body._undecl_interest._id); + _z_interest_process_undeclare_interest(zn, decl._decl._body._undecl_interest._id); } break; case _Z_FINAL_INTEREST: { - _z_process_final_interest(zn, decl._decl._body._final_interest._id); + _z_interest_process_final_interest(zn, decl._decl._body._final_interest._id); } break; case _Z_DECL_SUBSCRIBER: { - _z_interest_process_declare(zn, &decl._decl); + _z_interest_process_declares(zn, &decl._decl); } break; case _Z_DECL_QUERYABLE: { - _z_interest_process_declare(zn, &decl._decl); + _z_interest_process_declares(zn, &decl._decl); } break; case _Z_UNDECL_SUBSCRIBER: { - _z_interest_process_undeclare(zn, &decl._decl); + _z_interest_process_undeclares(zn, &decl._decl); } break; case _Z_UNDECL_QUERYABLE: { - _z_interest_process_undeclare(zn, &decl._decl); + _z_interest_process_undeclares(zn, &decl._decl); } break; case _Z_DECL_TOKEN: { // TODO: add support or explicitly discard