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 unhandled_cb(
struct aura_node *dev,
21 printf(
"Unhandled event name %s %d with arg %lld!\n",
22 o->name, numevt, (
long long unsigned int) arg);
23 if (arg != (
void *) ARG2)
26 aura_hexdump(
"Out buffer", retbuf->
data, retbuf->
size);
28 printf(
"Breaking the loop\n");
37 struct aura_node *n =
aura_open(
"dummy", NULL);
41 printf(
"call started with ret %d\n", ret);
46 printf(
"event handler set with ret %d\n", ret);
48 printf(
"Closing teh 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)
struct aura_node * aura_open(const char *name, const char *opts)
const struct aura_object * aura_get_current_object(struct aura_node *node)
Obtain the pointer to the current aura_object.
void aura_unhandled_evt_cb(struct aura_node *node, void(*cb)(struct aura_node *node, struct aura_buffer *buf, void *arg), void *arg)
void aura_eventloop_break(struct aura_eventloop *loop)
void aura_close(struct aura_node *node)
int aura_start_call(struct aura_node *node, const char *name, void(*calldonecb)(struct aura_node *dev, int status, struct aura_buffer *ret, void *arg), void *arg,...)