55 #include <sys/resource.h>
69 #include <amxc/amxc_macros.h>
70 #include <amxc/amxc.h>
89 const amxc_var_t*
const data,
91 uint32_t data_type = amxc_var_type_of(data);
92 uint32_t data_value = GET_UINT32(data, NULL);
94 check_expected(sig_name);
95 check_expected(data_type);
96 check_expected(data_value);
100 assert_int_equal(pipe(
fds), 0);
134 assert_non_null(con);
135 assert_int_equal(con->
fd,
fds[0]);
137 assert_string_equal(con->
uri,
"test://localhost:1700");
171 assert_non_null(con);
172 assert_int_equal(con->
fd,
fds[0]);
174 assert_string_equal(con->
uri,
"test://localhost:1700");
176 assert_non_null(con);
216 assert_non_null(con);
217 assert_int_equal(con->
fd,
fds[0]);
219 assert_string_equal(con->
uri,
"test://localhost:1700");
#define AMXP_CONNECTION_CUSTOM
#define AMXP_CONNECTION_BUS
#define AMXP_CONNECTION_LISTEN
Ambiorix signal manager and signal API header file.
Ambiorix slot API header file.
int amxp_connection_add(int fd, amxp_fd_cb_t reader, const char *uri, uint32_t type, void *priv)
Adds a file descriptor (fd) to the list of fds that must be watched.
amxc_llist_t * amxp_connection_get_listeners(void)
Get of the current listen sockets of the application.
amxp_connection_t * amxp_connection_get_next(amxp_connection_t *con, uint32_t type)
Gets the next connection data for a file descriptor.
int amxp_connection_set_el_data(int fd, void *el_data)
Sets event-loop data.
int amxp_connection_wait_write(int fd, amxp_fd_cb_t can_write_cb)
Adds a watcher to check if a fd is ready for write.
amxp_connection_t * amxp_connection_get_first(uint32_t type)
Gets the first connection of the given type.
amxp_connection_t * amxp_connection_get(int fd)
Gets the connection data for a file descriptor.
amxc_llist_t * amxp_connection_get_connections(void)
Get a list of the current connections of the application.
int amxp_connection_remove(int fd)
Removes the fd from the connection list.
int amxp_signal_read(void)
Reads from the amxp signal file descriptor.
void amxp_slot_disconnect_all(amxp_slot_fn_t fn)
Disconnects a slot from all signals it was connected to.
int amxp_slot_connect(amxp_signal_mngr_t *const sig_mngr, const char *const sig_name, const char *const expression, amxp_slot_fn_t fn, void *const priv)
Connects a slot (function) to a named signal of a signal manager.
void test_can_store_event_loop_data(UNUSED void **state)
int test_connection_teardown(UNUSED void **state)
void test_can_fetch_connection(UNUSED void **state)
void test_can_fetch_listener(UNUSED void **state)
void test_can_add_wait_write_connection(UNUSED void **state)
void test_can_add_listener(UNUSED void **state)
static void reader(UNUSED int fd, UNUSED void *priv)
void test_can_add_connection(UNUSED void **state)
void test_can_remove_connection(UNUSED void **state)
int test_connection_setup(UNUSED void **state)
void test_can_iterate_connections(UNUSED void **state)
static void writer(UNUSED int fd, UNUSED void *priv)
void test_can_remove_listener(UNUSED void **state)
static void connection_check_signal(const char *const sig_name, const amxc_var_t *const data, UNUSED void *const priv)