19 #ifndef _ASTERISK_STASIS_TEST_H 20 #define _ASTERISK_STASIS_TEST_H 41 #define STASIS_SINK_DEFAULT_WAIT 5000 Structure that collects messages from a topic.
Asterisk locking-related definitions:
struct stasis_message ** messages
int stasis_message_sink_wait_for(struct stasis_message_sink *sink, int start, stasis_wait_cb cmp_cb, const void *data, int timeout_millis)
Wait for a message that matches the given criteria.
Stasis Message Bus API. See Stasis Message Bus API for detailed documentation.
struct stasis_message_type * stasis_test_message_type(void)
Gets the type of messages created by stasis_test_message_create().
int stasis_message_sink_wait_for_count(struct stasis_message_sink *sink, int num_messages, int timeout_millis)
Wait for a sink's num_messages field to reach a certain level.
struct stasis_message_sink * stasis_message_sink_create(void)
Create a message sink.
struct stasis_message * stasis_test_message_create(void)
Creates a test message.
pthread_cond_t ast_cond_t
stasis_subscription_cb stasis_message_sink_cb(void)
Topic callback to receive messages.
void(* stasis_subscription_cb)(void *data, struct stasis_subscription *sub, struct stasis_message *message)
Callback function type for Stasis subscriptions.
int stasis_message_sink_should_stay(struct stasis_message_sink *sink, int num_messages, int timeout_millis)
Ensures that no new messages are received.
int(* stasis_wait_cb)(struct stasis_message *msg, const void *data)
Structure for mutex and tracking information.