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 d69a333 commit adf3920
Show file tree
Hide file tree
Showing 63 changed files with 90 additions and 90 deletions.
10 changes: 5 additions & 5 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ Functions
.. autocfunction:: primitives.h::z_put
.. autocfunction:: primitives.h::z_delete
.. autocfunction:: primitives.h::z_declare_publisher
.. autocfunction:: primitives.h::z_publisher_declare
.. autocfunction:: primitives.h::z_publisher_put
.. autocfunction:: primitives.h::z_publisher_delete
.. autocfunction:: primitives.h::z_publisher_keyexpr
Expand Down Expand Up @@ -914,8 +914,8 @@ Option Types
Functions
---------
.. autocfunction:: primitives.h::z_declare_subscriber
.. autocfunction:: primitives.h::z_declare_background_subscriber
.. autocfunction:: primitives.h::z_subscriber_declare
.. autocfunction:: primitives.h::z_subscriber_declare_background
.. autocfunction:: primitives.h::z_subscriber_options_default
.. autocfunction:: primitives.h::z_subscriber_keyexpr
Expand Down Expand Up @@ -959,8 +959,8 @@ Option Types
Functions
---------
.. autocfunction:: primitives.h::z_declare_queryable
.. autocfunction:: primitives.h::z_declare_background_queryable
.. autocfunction:: primitives.h::z_queryable_declare
.. autocfunction:: primitives.h::z_queryable_declare_background
.. autocfunction:: primitives.h::z_queryable_options_default
.. autocfunction:: primitives.h::z_query_reply_options_default
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino/z_pub.ino
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void setup() {
Serial.println("...");
z_view_keyexpr_t ke;
z_view_keyexpr_from_str_unchecked(&ke, KEYEXPR);
if (z_declare_publisher(&pub, z_session_loan(&s), z_view_keyexpr_loan(&ke), NULL) < 0) {
if (z_publisher_declare(&pub, z_session_loan(&s), z_view_keyexpr_loan(&ke), NULL) < 0) {
Serial.println("Unable to declare publisher for key expression!");
while (1) {
;
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino/z_pull.ino
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void setup() {
z_ring_channel_sample_new(&closure, &handler, SIZE);
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, KEYEXPR);
if (z_declare_subscriber(&sub, z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_sample_move(&closure),
if (z_subscriber_declare(&sub, z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_sample_move(&closure),
NULL) < 0) {
Serial.println("Unable to declare subscriber.");
return;
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino/z_queryable.ino
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void setup() {
z_closure_query(&callback, query_handler, NULL, NULL);
z_view_keyexpr_t ke;
z_view_keyexpr_from_str_unchecked(&ke, KEYEXPR);
if (z_declare_queryable(&qable, z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_query_move(&callback),
if (z_queryable_declare(&qable, z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_query_move(&callback),
NULL) < 0) {
Serial.println("Unable to declare queryable.");
while (1) {
Expand Down
2 changes: 1 addition & 1 deletion examples/arduino/z_sub.ino
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void setup() {
z_closure_sample(&callback, data_handler, NULL, NULL);
z_view_keyexpr_t ke;
z_view_keyexpr_from_str_unchecked(&ke, KEYEXPR);
if (z_declare_subscriber(&sub, z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_sample_move(&callback),
if (z_subscriber_declare(&sub, z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_sample_move(&callback),
NULL) < 0) {
Serial.println("Unable to declare subscriber.");
while (1) {
Expand Down
2 changes: 1 addition & 1 deletion examples/espidf/z_pub.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void app_main() {
z_owned_publisher_t pub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str_unchecked(&ke, 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/espidf/z_pull.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void app_main() {
z_owned_subscriber_t sub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, KEYEXPR);
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/espidf/z_queryable.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void app_main() {
z_owned_queryable_t qable;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str_unchecked(&ke, KEYEXPR);
if (z_declare_queryable(&qable, z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
if (z_queryable_declare(&qable, z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
printf("Unable to declare queryable.\n");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/espidf/z_sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void app_main() {
z_owned_subscriber_t sub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str_unchecked(&ke, KEYEXPR);
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/freertos_plus_tcp/z_pub.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void app_main(void) {
z_owned_publisher_t pub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str_unchecked(&ke, 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");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/freertos_plus_tcp/z_pub_st.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void app_main(void) {
z_owned_publisher_t pub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str_unchecked(&ke, 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");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/freertos_plus_tcp/z_pull.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void app_main(void) {
z_owned_subscriber_t sub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, KEYEXPR);
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");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/freertos_plus_tcp/z_queryable.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void app_main(void) {
z_owned_closure_query_t callback;
z_closure(&callback, query_handler);
z_owned_queryable_t qable;
if (z_declare_queryable(&qable, z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
if (z_queryable_declare(&qable, z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
printf("Unable to create queryable.\n");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/freertos_plus_tcp/z_sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void app_main(void) {
z_view_keyexpr_t ke;
z_view_keyexpr_from_str_unchecked(&ke, 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");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/freertos_plus_tcp/z_sub_st.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void app_main(void) {
z_view_keyexpr_t ke;
z_view_keyexpr_from_str_unchecked(&ke, 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");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/mbed/z_pub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ int main(int argc, char **argv) {
z_owned_publisher_t pub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str_unchecked(&ke, KEYEXPR);
if (z_declare_publisher(&pub, z_session_loan(&s), z_view_keyexpr_loan(&ke), NULL) < 0) {
if (z_publisher_declare(&pub, z_session_loan(&s), z_view_keyexpr_loan(&ke), NULL) < 0) {
printf("Unable to declare publisher for key expression!\n");
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/mbed/z_pull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ int main(int argc, char **argv) {
z_owned_subscriber_t sub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, KEYEXPR);
if (z_declare_subscriber(&sub, z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_sample_move(&closure),
if (z_subscriber_declare(&sub, z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_sample_move(&closure),
NULL) < 0) {
printf("Unable to declare subscriber.\n");
return -1;
Expand Down
2 changes: 1 addition & 1 deletion examples/mbed/z_queryable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int main(int argc, char **argv) {
z_owned_queryable_t qable;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str_unchecked(&ke, KEYEXPR);
if (z_declare_queryable(&qable, z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_query_move(&callback),
if (z_queryable_declare(&qable, z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_query_move(&callback),
NULL) < 0) {
printf("Unable to declare queryable.\n");
exit(-1);
Expand Down
2 changes: 1 addition & 1 deletion examples/mbed/z_sub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int main(int argc, char **argv) {
z_owned_subscriber_t sub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str_unchecked(&ke, KEYEXPR);
if (z_declare_subscriber(&sub, z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_sample_move(&callback),
if (z_subscriber_declare(&sub, z_session_loan(&s), z_view_keyexpr_loan(&ke), z_closure_sample_move(&callback),
NULL) < 0) {
printf("Unable to declare subscriber.\n");
exit(-1);
Expand Down
4 changes: 2 additions & 2 deletions examples/unix/c11/z_ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ int main(int argc, char** argv) {
z_view_keyexpr_from_str_unchecked(&pong, "test/pong");

z_owned_publisher_t pub;
if (z_declare_publisher(&pub, z_loan(session), z_loan(ping), NULL) < 0) {
if (z_publisher_declare(&pub, z_loan(session), z_loan(ping), NULL) < 0) {
printf("Unable to declare publisher for key expression!\n");
return -1;
}

z_owned_closure_sample_t respond;
z_closure(&respond, callback, drop, NULL);
z_owned_subscriber_t sub;
if (z_declare_subscriber(&sub, z_loan(session), z_loan(pong), z_move(respond), NULL) < 0) {
if (z_subscriber_declare(&sub, z_loan(session), z_loan(pong), z_move(respond), NULL) < 0) {
printf("Unable to declare subscriber for key expression.\n");
return -1;
}
Expand Down
4 changes: 2 additions & 2 deletions examples/unix/c11/z_pong.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ 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;
if (z_declare_publisher(&pub, z_loan(session), z_loan(pong), NULL) < 0) {
if (z_publisher_declare(&pub, z_loan(session), z_loan(pong), NULL) < 0) {
printf("Unable to declare publisher for key expression!\n");
return -1;
}
Expand All @@ -60,7 +60,7 @@ int main(int argc, char** argv) {
z_view_keyexpr_from_str_unchecked(&ping, "test/ping");
z_owned_closure_sample_t respond;
z_closure(&respond, callback, drop, (void*)(&pub));
if (z_declare_background_subscriber(z_loan(session), z_loan(ping), z_move(respond), NULL) < 0) {
if (z_subscriber_declare_background(z_loan(session), z_loan(ping), z_move(respond), NULL) < 0) {
printf("Unable to declare subscriber for key expression.\n");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_pub.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,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), NULL) < 0) {
if (z_publisher_declare(&pub, z_loan(s), z_loan(ke), NULL) < 0) {
printf("Unable to declare publisher for key expression!\n");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_pub_attachment.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int main(int argc, char **argv) {
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, keyexpr);
z_owned_publisher_t pub;
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");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_pub_st.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,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), NULL) < 0) {
if (z_publisher_declare(&pub, z_loan(s), z_loan(ke), NULL) < 0) {
printf("Unable to declare publisher for key expression!\n");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_pub_thr.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_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), 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/unix/c11/z_pull.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int main(int argc, char **argv) {
z_owned_subscriber_t sub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, keyexpr);
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");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_queryable.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ int main(int argc, char **argv) {
z_owned_closure_query_t callback;
z_closure(&callback, query_handler);
z_owned_queryable_t qable;
if (z_declare_queryable(&qable, z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
if (z_queryable_declare(&qable, z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
printf("Unable to create queryable.\n");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_queryable_attachment.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ int main(int argc, char **argv) {
z_owned_closure_query_t callback;
z_closure(&callback, query_handler);
z_owned_queryable_t qable;
if (z_declare_queryable(&qable, z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
if (z_queryable_declare(&qable, z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
printf("Unable to create queryable.\n");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_queryable_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int main(int argc, char **argv) {
z_owned_ring_handler_query_t handler;
z_ring_channel_query_new(&closure, &handler, 10);
z_owned_queryable_t qable;
if (z_declare_queryable(&qable, z_loan(s), z_loan(ke), z_move(closure), NULL) < 0) {
if (z_queryable_declare(&qable, z_loan(s), z_loan(ke), z_move(closure), NULL) < 0) {
printf("Unable to create queryable.\n");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ int main(int argc, char **argv) {
z_owned_subscriber_t sub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, keyexpr);
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");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_sub_attachment.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int main(int argc, char **argv) {
z_owned_subscriber_t sub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, keyexpr);
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");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_sub_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ int main(int argc, char **argv) {
z_owned_subscriber_t sub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, keyexpr);
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");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_sub_st.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ int main(int argc, char **argv) {
z_owned_subscriber_t sub;
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, keyexpr);
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");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c11/z_sub_thr.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ int main(int argc, char **argv) {
z_closure(&callback, on_sample, drop_stats, (void *)context);
z_view_keyexpr_t ke;
z_view_keyexpr_from_str(&ke, keyexpr);
if (z_declare_background_subscriber(z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
if (z_subscriber_declare_background(z_loan(s), z_loan(ke), z_move(callback), NULL) < 0) {
printf("Unable to create subscriber.\n");
exit(-1);
}
Expand Down
4 changes: 2 additions & 2 deletions examples/unix/c99/z_ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ int main(int argc, char** argv) {
z_view_keyexpr_t ping;
z_view_keyexpr_from_str_unchecked(&ping, "test/ping");
z_owned_publisher_t pub;
if (z_declare_publisher(&pub, z_session_loan(&session), z_view_keyexpr_loan(&ping), NULL) < 0) {
if (z_publisher_declare(&pub, z_session_loan(&session), z_view_keyexpr_loan(&ping), NULL) < 0) {
printf("Unable to declare publisher for key expression!\n");
return -1;
}
Expand All @@ -92,7 +92,7 @@ int main(int argc, char** argv) {
z_owned_closure_sample_t respond;
z_closure_sample(&respond, callback, drop, NULL);
z_owned_subscriber_t sub;
if (z_declare_subscriber(&sub, z_session_loan(&session), z_view_keyexpr_loan(&pong),
if (z_subscriber_declare(&sub, z_session_loan(&session), z_view_keyexpr_loan(&pong),
z_closure_sample_move(&respond), NULL) < 0) {
printf("Unable to declare subscriber for key expression.\n");
return -1;
Expand Down
4 changes: 2 additions & 2 deletions examples/unix/c99/z_pong.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ 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;
if (z_declare_publisher(&pub, z_session_loan(&session), z_view_keyexpr_loan(&pong), NULL) < 0) {
if (z_publisher_declare(&pub, z_session_loan(&session), z_view_keyexpr_loan(&pong), NULL) < 0) {
printf("Unable to declare publisher for key expression!\n");
return -1;
}
Expand All @@ -64,7 +64,7 @@ int main(int argc, char** argv) {
z_owned_closure_sample_t respond;
z_closure_sample(&respond, callback, drop, (void*)(&pub));

if (z_declare_background_subscriber(z_session_loan(&session), z_view_keyexpr_loan(&ping),
if (z_subscriber_declare_background(z_session_loan(&session), z_view_keyexpr_loan(&ping),
z_closure_sample_move(&respond), NULL) < 0) {
printf("Unable to declare subscriber for key expression.\n");
return -1;
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c99/z_pub.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,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_session_loan(&s), z_view_keyexpr_loan(&ke), NULL) < 0) {
if (z_publisher_declare(&pub, z_session_loan(&s), z_view_keyexpr_loan(&ke), NULL) < 0) {
printf("Unable to declare publisher for key expression!\n");
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/unix/c99/z_pub_st.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,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_session_loan(&s), z_view_keyexpr_loan(&ke), NULL) < 0) {
if (z_publisher_declare(&pub, z_session_loan(&s), z_view_keyexpr_loan(&ke), NULL) < 0) {
printf("Unable to declare publisher for key expression!\n");
return -1;
}
Expand Down
Loading

0 comments on commit adf3920

Please sign in to comment.