GNUnet 0.21.2
gnunet_op_lib.h File Reference

Asynchronous operations; register callbacks for operations and call them when a response arrives. More...

#include "gnunet_util_lib.h"
Include dependency graph for gnunet_op_lib.h:

Go to the source code of this file.

Functions

struct GNUNET_OP_Handle * GNUNET_OP_create ()
 Create new operations handle. More...
 
void GNUNET_OP_destroy (struct GNUNET_OP_Handle *h)
 Destroy operations handle. More...
 
uint64_t GNUNET_OP_get_next_id (struct GNUNET_OP_Handle *h)
 Get a unique operation ID to distinguish between asynchronous requests. More...
 
int GNUNET_OP_get (struct GNUNET_OP_Handle *h, uint64_t op_id, GNUNET_ResultCallback *result_cb, void **cls, void **ctx)
 Find operation by ID. More...
 
uint64_t GNUNET_OP_add (struct GNUNET_OP_Handle *h, GNUNET_ResultCallback result_cb, void *cls, void *ctx)
 Add a new operation. More...
 
int GNUNET_OP_result (struct GNUNET_OP_Handle *h, uint64_t op_id, int64_t result_code, const void *data, uint16_t data_size, void **ctx)
 Call the result callback of an operation and remove it. More...
 
int GNUNET_OP_remove (struct GNUNET_OP_Handle *h, uint64_t op_id)
 Remove / cancel an operation. More...
 

Detailed Description

Asynchronous operations; register callbacks for operations and call them when a response arrives.

Author
Gabor X Toth

Definition in file gnunet_op_lib.h.