Skip to content

Commit

Permalink
Rename matching methods and types from zc_ to z_ (#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc authored Jan 29, 2025
1 parent 220ef86 commit 7a21b9d
Show file tree
Hide file tree
Showing 13 changed files with 383 additions and 387 deletions.
2 changes: 1 addition & 1 deletion build-resources/opaque-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ get_opaque_type_data!(Publisher<'static>, z_loaned_publisher_t);
///
/// A listener that sends notifications when the [`MatchingStatus`] of a publisher or querier changes.
/// Dropping the corresponding publisher, also drops matching listener.
get_opaque_type_data!(Option<MatchingListener<()>>, zc_owned_matching_listener_t);
get_opaque_type_data!(Option<MatchingListener<()>>, z_owned_matching_listener_t);

/// An owned Zenoh <a href="https://zenoh.io/docs/manual/abstractions/#subscriber"> subscriber </a>.
///
Expand Down
30 changes: 15 additions & 15 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -477,20 +477,20 @@ Matching

Types
-----
.. doxygenstruct:: zc_owned_matching_listener_t
.. doxygenstruct:: zc_owned_closure_matching_status_t
.. doxygenstruct:: zc_matching_status_t
.. doxygenstruct:: z_owned_matching_listener_t
.. doxygenstruct:: z_owned_closure_matching_status_t
.. doxygenstruct:: z_matching_status_t
:members:

Functions
---------

.. doxygenfunction:: zc_matching_listener_drop
.. doxygenfunction:: zc_undeclare_matching_listener
.. doxygenfunction:: zc_closure_matching_status_drop
.. doxygenfunction:: zc_closure_matching_status_loan
.. doxygenfunction:: zc_closure_matching_status_call
.. doxygenfunction:: zc_closure_matching_status
.. doxygenfunction:: z_matching_listener_drop
.. doxygenfunction:: z_undeclare_matching_listener
.. doxygenfunction:: z_closure_matching_status_drop
.. doxygenfunction:: z_closure_matching_status_loan
.. doxygenfunction:: z_closure_matching_status_call
.. doxygenfunction:: z_closure_matching_status


Publication
Expand Down Expand Up @@ -540,9 +540,9 @@ Functions

.. doxygenfunction:: z_reliability_default

.. doxygenfunction:: zc_publisher_get_matching_status
.. doxygenfunction:: zc_publisher_declare_matching_listener
.. doxygenfunction:: zc_publisher_declare_background_matching_listener
.. doxygenfunction:: z_publisher_get_matching_status
.. doxygenfunction:: z_publisher_declare_matching_listener
.. doxygenfunction:: z_publisher_declare_background_matching_listener

Subscription
============
Expand Down Expand Up @@ -726,9 +726,9 @@ Functions
.. doxygenfunction:: z_querier_id
.. doxygenfunction:: z_querier_keyexpr
.. doxygenfunction:: z_querier_get
.. doxygenfunction:: zc_querier_get_matching_status
.. doxygenfunction:: zc_querier_declare_matching_listener
.. doxygenfunction:: zc_querier_declare_background_matching_listener
.. doxygenfunction:: z_querier_get_matching_status
.. doxygenfunction:: z_querier_declare_matching_listener
.. doxygenfunction:: z_querier_declare_background_matching_listener

.. doxygenfunction:: z_querier_options_default
.. doxygenfunction:: z_querier_get_options_default
Expand Down
6 changes: 3 additions & 3 deletions examples/z_pub.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct args_t {
struct args_t parse_args(int argc, char** argv, z_owned_config_t* config);

#if defined(Z_FEATURE_UNSTABLE_API)
void matching_status_handler(const zc_matching_status_t* matching_status, void* arg) {
void matching_status_handler(const z_matching_status_t* matching_status, void* arg) {
if (matching_status->matching) {
printf("Publisher has matching subscribers.\n");
} else {
Expand Down Expand Up @@ -63,9 +63,9 @@ int main(int argc, char** argv) {

#if defined(Z_FEATURE_UNSTABLE_API)
if (args.add_matching_listener) {
zc_owned_closure_matching_status_t callback;
z_owned_closure_matching_status_t callback;
z_closure(&callback, matching_status_handler, NULL, NULL);
zc_publisher_declare_background_matching_listener(z_loan(pub), z_move(callback));
z_publisher_declare_background_matching_listener(z_loan(pub), z_move(callback));
}
#endif

Expand Down
6 changes: 3 additions & 3 deletions examples/z_pub_shm.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct args_t {
struct args_t parse_args(int argc, char** argv, z_owned_config_t* config);

#if defined(Z_FEATURE_UNSTABLE_API)
void matching_status_handler(const zc_matching_status_t* matching_status, void* arg) {
void matching_status_handler(const z_matching_status_t* matching_status, void* arg) {
if (matching_status->matching) {
printf("Publisher has matching subscribers.\n");
} else {
Expand Down Expand Up @@ -60,9 +60,9 @@ int main(int argc, char** argv) {
}
#if defined(Z_FEATURE_UNSTABLE_API)
if (args.add_matching_listener) {
zc_owned_closure_matching_status_t callback;
z_owned_closure_matching_status_t callback;
z_closure(&callback, matching_status_handler, NULL, NULL);
zc_publisher_declare_background_matching_listener(z_loan(pub), z_move(callback));
z_publisher_declare_background_matching_listener(z_loan(pub), z_move(callback));
}
#endif

Expand Down
6 changes: 3 additions & 3 deletions examples/z_querier.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct args_t {
struct args_t parse_args(int argc, char** argv, z_owned_config_t* config);

#if defined(Z_FEATURE_UNSTABLE_API)
void matching_status_handler(const zc_matching_status_t* matching_status, void* arg) {
void matching_status_handler(const z_matching_status_t* matching_status, void* arg) {
if (matching_status->matching) {
printf("Querier has matching queryables.\n");
} else {
Expand Down Expand Up @@ -82,9 +82,9 @@ int main(int argc, char** argv) {

#if defined(Z_FEATURE_UNSTABLE_API)
if (args.add_matching_listener) {
zc_owned_closure_matching_status_t callback;
z_owned_closure_matching_status_t callback;
z_closure(&callback, matching_status_handler, NULL, NULL);
zc_querier_declare_background_matching_listener(z_loan(querier), z_move(callback));
z_querier_declare_background_matching_listener(z_loan(querier), z_move(callback));
}
#endif

Expand Down
Loading

0 comments on commit 7a21b9d

Please sign in to comment.