GNUnet debian-0.24.3-29-g453fda2cf
 
Loading...
Searching...
No Matches
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.
 
void GNUNET_OP_destroy (struct GNUNET_OP_Handle *h)
 Destroy operations handle.
 
uint64_t GNUNET_OP_get_next_id (struct GNUNET_OP_Handle *h)
 Get a unique operation ID to distinguish between asynchronous requests.
 
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.
 
uint64_t GNUNET_OP_add (struct GNUNET_OP_Handle *h, GNUNET_ResultCallback result_cb, void *cls, void *ctx)
 Add a new operation.
 
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.
 
int GNUNET_OP_remove (struct GNUNET_OP_Handle *h, uint64_t op_id)
 Remove / cancel an operation.
 

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.