31#ifndef GNUNET_SCALARPRODUCT_SERVICE_H
32#define GNUNET_SCALARPRODUCT_SERVICE_H
33#define GCRYPT_NO_DEPRECATED
47#define GNUNET_SCALARPRODUCT_VERSION 0x00000044
89struct GNUNET_SCALARPRODUCT_Handle;
164 uint32_t element_count,
185 uint32_t element_count,
static struct GNUNET_ARM_Handle * h
Connection with ARM.
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
static int status
The program status; 0 for success.
static int result
Global testing status.
static struct GNUNET_HashCode session_key
the session key identifying this computation
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
#define GNUNET_PACKED
gcc-ism to get packed structs.
void(* GNUNET_SCALARPRODUCT_DatumProcessor)(void *cls, enum GNUNET_SCALARPRODUCT_ResponseStatus status, gcry_mpi_t result)
Process a datum that was stored in the scalarproduct.
GNUNET_SCALARPRODUCT_ResponseStatus
Result status values for the computation.
struct GNUNET_SCALARPRODUCT_ComputationHandle * GNUNET_SCALARPRODUCT_start_computation(const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_HashCode *session_key, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_SCALARPRODUCT_Element *elements, uint32_t element_count, GNUNET_SCALARPRODUCT_DatumProcessor cont, void *cont_cls)
Request by Alice's client for computing a scalar product.
void GNUNET_SCALARPRODUCT_cancel(struct GNUNET_SCALARPRODUCT_ComputationHandle *h)
Cancel an ongoing computation or revoke our collaboration offer.
GNUNET_NETWORK_STRUCT_END typedef void(* GNUNET_SCALARPRODUCT_ContinuationWithStatus)(void *cls, enum GNUNET_SCALARPRODUCT_ResponseStatus status)
Continuation called to notify client about result of the operation.
struct GNUNET_SCALARPRODUCT_ComputationHandle * GNUNET_SCALARPRODUCT_accept_computation(const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_HashCode *session_key, const struct GNUNET_SCALARPRODUCT_Element *elements, uint32_t element_count, GNUNET_SCALARPRODUCT_ContinuationWithStatus cont, void *cont_cls)
Used by Bob's client to cooperate with Alice,.
@ GNUNET_SCALARPRODUCT_STATUS_INIT
Operation is still active (never returned, used internally).
@ GNUNET_SCALARPRODUCT_STATUS_SUCCESS
The computation was successful.
@ GNUNET_SCALARPRODUCT_STATUS_ACTIVE
Operation is still active (never returned, used internally).
@ GNUNET_SCALARPRODUCT_STATUS_FAILURE
We encountered some error.
@ GNUNET_SCALARPRODUCT_STATUS_DISCONNECTED
We got disconnected from the SCALARPRODUCT service.
@ GNUNET_SCALARPRODUCT_STATUS_INVALID_RESPONSE
We got an invalid response.
The identity of the host (wraps the signing key of the peer).
A handle returned for each computation.
void * cont_cls
Closure for cont_status or cont_datum.
An element key-value pair for scalarproduct.
struct GNUNET_HashCode key
Key used to identify matching pairs of values to multiply.
int64_t value
Value to multiply in scalar product, in NBO.