6 void calldonecb(
struct aura_node *dev,
int status,
struct aura_buffer *retbuf,
void *arg)
8 printf(
"Call done with result %d arg %lld!\n", status, (
long long unsigned int) arg);
9 if (arg != (
void *) ARG)
11 aura_hexdump(
"Out buffer", retbuf->
data, retbuf->
size);
15 void pingcb(
struct aura_node *dev,
int status,
struct aura_buffer *retbuf,
void *arg)
18 printf(
"Event number %d with result %d arg %lld!\n", numevt, status, (
long long unsigned int) arg);
19 if (arg != (
void *) ARG2)
21 aura_hexdump(
"Out buffer", retbuf->
data, retbuf->
size);
23 printf(
"Breaking the loop\n");
32 struct aura_node *n =
aura_open(
"dummy", NULL);
40 printf(
"event handler set with ret %d\n", ret);
42 printf(
"Closing the shop...");
void aura_handle_events_forever(struct aura_eventloop *loop)
void aura_wait_status(struct aura_node *node, int status)
struct aura_eventloop * aura_eventloop_get_data(struct aura_node *node)
int aura_set_event_callback_raw(struct aura_node *node, int id, void(*calldonecb)(struct aura_node *dev, int status, struct aura_buffer *ret, void *arg), void *arg)
struct aura_node * aura_open(const char *name, const char *opts)
int aura_start_call_raw(struct aura_node *node, int id, void(*calldonecb)(struct aura_node *dev, int status, struct aura_buffer *ret, void *arg), void *arg,...)
void aura_eventloop_break(struct aura_eventloop *loop)
void aura_close(struct aura_node *node)