Skip to content

Commit

Permalink
rename z_declare_xxx functions to z_xxx_declare
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisBiryukov91 committed Oct 9, 2024
1 parent 91b64d1 commit ecd772c
Show file tree
Hide file tree
Showing 33 changed files with 307 additions and 307 deletions.
18 changes: 9 additions & 9 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ Functions
.. doxygenfunction:: z_put
.. doxygenfunction:: z_delete

.. doxygenfunction:: z_declare_publisher
.. doxygenfunction:: z_publisher_declare
.. doxygenfunction:: z_publisher_put
.. doxygenfunction:: z_publisher_delete
.. doxygenfunction:: z_publisher_keyexpr
Expand Down Expand Up @@ -613,8 +613,8 @@ Types
Functions
---------

.. doxygenfunction:: z_declare_subscriber
.. doxygenfunction:: z_declare_background_subscriber
.. doxygenfunction:: z_subscriber_declare
.. doxygenfunction:: z_subscriber_declare_background
.. doxygenfunction:: z_subscriber_keyexpr

.. doxygenfunction:: z_subscriber_drop
Expand Down Expand Up @@ -670,7 +670,7 @@ Types
Functions
---------
.. doxygenfunction:: z_declare_queryable
.. doxygenfunction:: z_declare_background_queryable
.. doxygenfunction:: z_queryable_declare_background
.. doxygenfunction:: z_queryable_id

.. doxygenfunction:: z_queryable_options_default
Expand Down Expand Up @@ -816,8 +816,8 @@ Types

Functions
---------
.. doxygenfunction:: zc_liveliness_declare_subscriber
.. doxygenfunction:: zc_liveliness_declare_background_subscriber
.. doxygenfunction:: zc_liveliness_subscriber_declare
.. doxygenfunction:: zc_liveliness_subscriber_declare_background
.. doxygenfunction:: zc_liveliness_get

.. doxygenfunction:: zc_liveliness_declare_token
Expand All @@ -844,7 +844,7 @@ Types
Functions
---------

.. doxygenfunction:: ze_declare_publication_cache
.. doxygenfunction:: ze_publication_cache_declare

.. doxygenfunction:: ze_publication_cache_drop
.. doxygenfunction:: ze_publication_cache_loan
Expand All @@ -867,8 +867,8 @@ Types
Functions
---------

.. doxygenfunction:: ze_declare_querying_subscriber
.. doxygenfunction:: ze_declare_background_querying_subscriber
.. doxygenfunction:: ze_querying_subscriber_declare
.. doxygenfunction:: ze_querying_subscriber_declare_background
.. doxygenfunction:: ze_querying_subscriber_get

.. doxygenfunction:: ze_querying_subscriber_drop
Expand Down
2 changes: 1 addition & 1 deletion docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Subscribe
z_view_keyexpr_from_string(&key_expr, "key/expression");
z_owned_subscriber_t sub;
if (z_declare_subscriber(&sub, z_loan(s), z_loan(key_expr) z_move(callback), NULL) != 0) {
if (z_subscriber_declare(&sub, z_loan(s), z_loan(key_expr) z_move(callback), NULL) != 0) {
printf("Unable to create Zenoh subscriber.\n");
z_drop(z_move(s));
exit(-1);
Expand Down
4 changes: 2 additions & 2 deletions examples/z_ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ int main(int argc, char** argv) {
z_view_keyexpr_t pong;
z_view_keyexpr_from_str_unchecked(&pong, "test/pong");
z_owned_publisher_t pub;
z_declare_publisher(&pub, z_loan(session), z_loan(ping), NULL);
z_publisher_declare(&pub, z_loan(session), z_loan(ping), NULL);
z_owned_closure_sample_t respond;
z_closure(&respond, callback, drop, (void*)(&pub));
z_owned_subscriber_t sub;
z_declare_subscriber(&sub, z_loan(session), z_loan(pong), z_move(respond), NULL);
z_subscriber_declare(&sub, z_loan(session), z_loan(pong), z_move(respond), NULL);
uint8_t* data = z_malloc(args.size);
for (int i = 0; i < args.size; i++) {
data[i] = i % 10;
Expand Down
4 changes: 2 additions & 2 deletions examples/z_ping_shm.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ int main(int argc, char** argv) {
z_view_keyexpr_t pong;
z_view_keyexpr_from_str_unchecked(&pong, "test/pong");
z_owned_publisher_t pub;
z_declare_publisher(&pub, z_loan(session), z_loan(ping), NULL);
z_publisher_declare(&pub, z_loan(session), z_loan(ping), NULL);
z_owned_closure_sample_t respond;
z_closure(&respond, callback, drop, (void*)(&pub));
z_owned_subscriber_t sub;
z_declare_subscriber(&sub, z_loan(session), z_loan(pong), z_move(respond), NULL);
z_subscriber_declare(&sub, z_loan(session), z_loan(pong), z_move(respond), NULL);

// Create SHM Provider
z_alloc_alignment_t alignment = {0};
Expand Down
4 changes: 2 additions & 2 deletions examples/z_pong.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ int main(int argc, char** argv) {
z_view_keyexpr_t pong;
z_view_keyexpr_from_str_unchecked(&pong, "test/pong");
z_owned_publisher_t pub;
z_declare_publisher(&pub, z_loan(session), z_loan(pong), NULL);
z_publisher_declare(&pub, z_loan(session), z_loan(pong), NULL);
z_owned_closure_sample_t respond;
z_closure(&respond, callback, drop, (void*)&pub);
z_declare_background_subscriber(z_loan(session), z_loan(ping), z_move(respond), NULL);
z_subscriber_declare_background(z_loan(session), z_loan(ping), z_move(respond), NULL);

while (1) {
z_sleep_s(1);
Expand Down
2 changes: 1 addition & 1 deletion examples/z_pub.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int main(int argc, char** argv) {
z_owned_publisher_t pub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, args.keyexpr);
if (z_declare_publisher(&pub, z_loan(s), z_loan(ke), NULL) < 0) {
if (z_publisher_declare(&pub, z_loan(s), z_loan(ke), NULL) < 0) {
printf("Unable to declare Publisher for key expression!\n");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/z_pub_attachment.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int main(int argc, char** argv) {
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, args.keyexpr);
z_owned_publisher_t pub;
if (z_declare_publisher(&pub, z_loan(s), z_loan(ke), NULL)) {
if (z_publisher_declare(&pub, z_loan(s), z_loan(ke), NULL)) {
printf("Unable to declare Publisher for key expression!\n");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/z_pub_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int main(int argc, char** argv) {
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, args.keyexpr);

if (ze_declare_publication_cache(&pub_cache, z_loan(s), z_loan(ke), &pub_cache_opts) != Z_OK) {
if (ze_publication_cache_declare(&pub_cache, z_loan(s), z_loan(ke), &pub_cache_opts) != Z_OK) {
printf("Unable to declare publication cache for key expression!\n");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/z_pub_shm.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int main(int argc, char** argv) {
z_owned_publisher_t pub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, args.keyexpr);
if (z_declare_publisher(&pub, z_loan(s), z_loan(ke), NULL) < 0) {
if (z_publisher_declare(&pub, z_loan(s), z_loan(ke), NULL) < 0) {
printf("Unable to declare Publisher for key expression!\n");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/z_pub_shm_thr.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int main(int argc, char **argv) {
z_owned_publisher_t pub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, keyexpr);
if (z_declare_publisher(&pub, z_loan(s), z_loan(ke), &options)) {
if (z_publisher_declare(&pub, z_loan(s), z_loan(ke), &options)) {
printf("Unable to declare publisher for key expression!\n");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/z_pub_thr.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int main(int argc, char** argv) {
z_owned_publisher_t pub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, keyexpr);
if (z_declare_publisher(&pub, z_loan(s), z_loan(ke), &options)) {
if (z_publisher_declare(&pub, z_loan(s), z_loan(ke), &options)) {
printf("Unable to declare publisher for key expression!\n");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/z_pull.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int main(int argc, char** argv) {
z_view_keyexpr_from_str(&ke, args.keyexpr);
z_owned_subscriber_t sub;

if (z_declare_subscriber(&sub, z_loan(s), z_loan(ke), z_move(closure), NULL) < 0) {
if (z_subscriber_declare(&sub, z_loan(s), z_loan(ke), z_move(closure), NULL) < 0) {
printf("Unable to declare subscriber.\n");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/z_query_sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int main(int argc, char** argv) {
z_closure(&callback, data_handler, NULL, NULL);
printf("Declaring querying subscriber on '%s'...\n", args.keyexpr);
ze_owned_querying_subscriber_t sub;
if (ze_declare_querying_subscriber(&sub, z_loan(s), z_loan(ke), z_move(callback), &sub_opts) < 0) {
if (ze_querying_subscriber_declare(&sub, z_loan(s), z_loan(ke), z_move(callback), &sub_opts) < 0) {
printf("Unable to declare querying subscriber.\n");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/z_sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int main(int argc, char **argv) {
z_closure(&callback, data_handler, NULL, NULL);
printf("Declaring Subscriber on '%s'...\n", args.keyexpr);
z_owned_subscriber_t sub;
if (z_declare_subscriber(&sub, z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
if (z_subscriber_declare(&sub, z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
printf("Unable to declare subscriber.\n");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/z_sub_attachment.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int main(int argc, char** argv) {
z_closure(&callback, data_handler, NULL, NULL);
printf("Declaring Subscriber on '%s'...\n", args.keyexpr);
z_owned_subscriber_t sub;
if (z_declare_subscriber(&sub, z_loan(s), z_loan(ke), z_move(callback), NULL)) {
if (z_subscriber_declare(&sub, z_loan(s), z_loan(ke), z_move(callback), NULL)) {
printf("Unable to declare subscriber.\n");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/z_sub_liveliness.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ int main(int argc, char** argv) {
z_owned_closure_sample_t callback;
z_closure(&callback, data_handler, NULL, NULL);
z_owned_subscriber_t sub;
if (zc_liveliness_declare_subscriber(&sub, z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
if (zc_liveliness_subscriber_declare(&sub, z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
printf("Unable to declare liveliness subscriber.\n");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/z_sub_shm.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ int main(int argc, char **argv) {
z_closure(&callback, data_handler, NULL, NULL);
printf("Declaring Subscriber on '%s'...\n", keyexpr);
z_owned_subscriber_t sub;
if (z_declare_subscriber(&sub, z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
if (z_subscriber_declare(&sub, z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
printf("Unable to declare subscriber.\n");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/z_sub_thr.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ int main(int argc, char **argv) {
z_stats_t *context = z_stats_make();
z_owned_closure_sample_t callback;
z_closure(&callback, on_sample, drop_stats, context);
if (z_declare_background_subscriber(z_loan(s), z_loan(declared_ke), z_move(callback), NULL)) {
if (z_subscriber_declare_background(z_loan(s), z_loan(declared_ke), z_move(callback), NULL)) {
printf("Unable to create subscriber.\n");
exit(-1);
}
Expand Down
Loading

0 comments on commit ecd772c

Please sign in to comment.