GNUnet  0.11.x
Data Structures | Macros | Typedefs | Enumerations | Functions
gnunet_seti_service.h File Reference
#include "gnunet_common.h"
#include "gnunet_time_lib.h"
#include "gnunet_configuration_lib.h"
Include dependency graph for gnunet_seti_service.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GNUNET_SETI_Element
 Element stored in a set. More...
 
struct  GNUNET_SETI_Option
 Option for set operations. More...
 

Macros

#define GNUNET_SETI_CONTEXT_MESSAGE_MAX_SIZE   ((1 << 16) - 1024)
 Maximum size of a context message for set operation requests. More...
 

Typedefs

typedef void(* GNUNET_SETI_ResultIterator) (void *cls, const struct GNUNET_SETI_Element *element, uint64_t current_size, enum GNUNET_SETI_Status status)
 Callback for set union operation results. More...
 
typedef void(* GNUNET_SETI_ListenCallback) (void *cls, const struct GNUNET_PeerIdentity *other_peer, const struct GNUNET_MessageHeader *context_msg, struct GNUNET_SETI_Request *request)
 Called when another peer wants to do a set operation with the local peer. More...
 

Enumerations

enum  GNUNET_SETI_Status { GNUNET_SETI_STATUS_ADD_LOCAL, GNUNET_SETI_STATUS_DEL_LOCAL, GNUNET_SETI_STATUS_FAILURE, GNUNET_SETI_STATUS_DONE }
 Status for the result callback. More...
 
enum  GNUNET_SETI_OptionType { GNUNET_SETI_OPTION_END = 0, GNUNET_SETI_OPTION_RETURN_INTERSECTION = 1 }
 Possible options to pass to a set operation. More...
 

Functions

struct GNUNET_SETI_HandleGNUNET_SETI_create (const struct GNUNET_CONFIGURATION_Handle *cfg)
 Create an empty set, supporting the specified operation. More...
 
int GNUNET_SETI_add_element (struct GNUNET_SETI_Handle *set, const struct GNUNET_SETI_Element *element, GNUNET_SCHEDULER_TaskCallback cb, void *cb_cls)
 Add an element to the given set. More...
 
void GNUNET_SETI_destroy (struct GNUNET_SETI_Handle *set)
 Destroy the set handle, and free all associated resources. More...
 
struct GNUNET_SETI_OperationHandleGNUNET_SETI_prepare (const struct GNUNET_PeerIdentity *other_peer, const struct GNUNET_HashCode *app_id, const struct GNUNET_MessageHeader *context_msg, const struct GNUNET_SETI_Option options[], GNUNET_SETI_ResultIterator result_cb, void *result_cls)
 Prepare a set operation to be evaluated with another peer. More...
 
struct GNUNET_SETI_ListenHandleGNUNET_SETI_listen (const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_HashCode *app_id, GNUNET_SETI_ListenCallback listen_cb, void *listen_cls)
 Wait for set operation requests for the given application ID. More...
 
void GNUNET_SETI_listen_cancel (struct GNUNET_SETI_ListenHandle *lh)
 Cancel the given listen operation. More...
 
struct GNUNET_SETI_OperationHandleGNUNET_SETI_accept (struct GNUNET_SETI_Request *request, const struct GNUNET_SETI_Option options[], GNUNET_SETI_ResultIterator result_cb, void *result_cls)
 Accept a request we got via GNUNET_SETI_listen(). More...
 
int GNUNET_SETI_commit (struct GNUNET_SETI_OperationHandle *oh, struct GNUNET_SETI_Handle *set)
 Commit a set to be used with a set operation. More...
 
void GNUNET_SETI_operation_cancel (struct GNUNET_SETI_OperationHandle *oh)
 Cancel the given set operation. More...
 
void GNUNET_SETI_element_hash (const struct GNUNET_SETI_Element *element, struct GNUNET_HashCode *ret_hash)
 Hash a set element. More...
 

Detailed Description

Author
Florian Dold
Christian Grothoff

Two-peer set intersection operations

Definition in file gnunet_seti_service.h.