typedef void (*DataCallback) ();
-/**
+/**
* Handle for an operation with the PSYCstore service.
*/
struct GNUNET_PSYCSTORE_OperationHandle
}
-/**
+/**
* Find operation by ID.
- *
+ *
* @return OperationHandle if found, or NULL otherwise.
*/
static struct GNUNET_PSYCSTORE_OperationHandle *
GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op);
if (NULL != op->data_cb)
((GNUNET_PSYCSTORE_CountersCallback)
- op->data_cb) (op->cls,
+ op->data_cb) (op->cls, ntohl (cres->result_code),
GNUNET_ntohll (cres->max_fragment_id),
GNUNET_ntohll (cres->max_message_id),
GNUNET_ntohll (cres->max_group_generation),
}
-/**
+/**
* Store join/leave events for a PSYC channel in order to be able to answer
* membership test queries later.
*
*/
struct GNUNET_PSYCSTORE_OperationHandle *
GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h,
- const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
- const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key,
int did_join,
uint64_t announced_at,
uint64_t effective_since,
}
-/**
+/**
* Test if a member was admitted to the channel at the given message ID.
*
* This is useful when relaying and replaying messages to check if a particular
*/
struct GNUNET_PSYCSTORE_OperationHandle *
GNUNET_PSYCSTORE_membership_test (struct GNUNET_PSYCSTORE_Handle *h,
- const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
- const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key,
uint64_t message_id,
uint64_t group_generation,
GNUNET_PSYCSTORE_ResultCallback rcb,
}
-/**
+/**
* Store a message fragment sent to a channel.
*
* @param h Handle for the PSYCstore.
* state modifiers.
* @param rcb Callback to call with the result of the operation.
* @param rcb_cls Closure for the callback.
- *
+ *
* @return Handle that can be used to cancel the operation.
*/
struct GNUNET_PSYCSTORE_OperationHandle *
GNUNET_PSYCSTORE_fragment_store (struct GNUNET_PSYCSTORE_Handle *h,
- const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
const struct GNUNET_MULTICAST_MessageHeader *message,
uint32_t psycstore_flags,
GNUNET_PSYCSTORE_ResultCallback rcb,
}
-/**
+/**
* Retrieve a message fragment by fragment ID.
*
* @param h Handle for the PSYCstore.
* @param fcb Callback to call with the retrieved fragments.
* @param rcb Callback to call with the result of the operation.
* @param cls Closure for the callbacks.
- *
+ *
* @return Handle that can be used to cancel the operation.
*/
struct GNUNET_PSYCSTORE_OperationHandle *
GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h,
- const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
uint64_t fragment_id,
GNUNET_PSYCSTORE_FragmentCallback fcb,
GNUNET_PSYCSTORE_ResultCallback rcb,
}
-/**
+/**
* Retrieve all fragments of a message.
*
* @param h Handle for the PSYCstore.
* @param fcb Callback to call with the retrieved fragments.
* @param rcb Callback to call with the result of the operation.
* @param cls Closure for the callbacks.
- *
+ *
* @return Handle that can be used to cancel the operation.
*/
struct GNUNET_PSYCSTORE_OperationHandle *
GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h,
- const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
uint64_t message_id,
GNUNET_PSYCSTORE_FragmentCallback fcb,
GNUNET_PSYCSTORE_ResultCallback rcb,
}
-/**
+/**
* Retrieve a fragment of message specified by its message ID and fragment
* offset.
*
* @param fcb Callback to call with the retrieved fragments.
* @param rcb Callback to call with the result of the operation.
* @param cls Closure for the callbacks.
- *
+ *
* @return Handle that can be used to cancel the operation.
*/
struct GNUNET_PSYCSTORE_OperationHandle *
GNUNET_PSYCSTORE_message_get_fragment (struct GNUNET_PSYCSTORE_Handle *h,
- const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
uint64_t message_id,
uint64_t fragment_offset,
GNUNET_PSYCSTORE_FragmentCallback fcb,
}
-/**
+/**
* Retrieve latest values of counters for a channel master.
*
* The current value of counters are needed when a channel master is restarted,
* @param channel_key Public key that identifies the channel.
* @param mccb Callback to call with the result.
* @param mccb_cls Closure for the callback.
- *
+ *
* @return Handle that can be used to cancel the operation.
*/
struct GNUNET_PSYCSTORE_OperationHandle *
GNUNET_PSYCSTORE_counters_get (struct GNUNET_PSYCSTORE_Handle *h,
- struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
+ struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
GNUNET_PSYCSTORE_CountersCallback ccb,
void *mccb_cls)
{
}
-/**
+/**
* Apply modifiers of a message to the current channel state.
*
* An error is returned if there are missing messages containing state
* @param modifiers List of modifiers to apply.
* @param rcb Callback to call with the result of the operation.
* @param rcb_cls Closure for the callback.
- *
+ *
* @return Handle that can be used to cancel the operation.
*/
struct GNUNET_PSYCSTORE_OperationHandle *
GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h,
- const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
uint64_t message_id,
uint64_t state_delta,
size_t modifier_count,
}
-/**
+/**
* Store synchronized state.
*
* @param h Handle for the PSYCstore.
* @param modifiers Full state to store.
* @param rcb Callback to call with the result of the operation.
* @param rcb_cls Closure for the callback.
- *
+ *
* @return Handle that can be used to cancel the operation.
*/
struct GNUNET_PSYCSTORE_OperationHandle *
GNUNET_PSYCSTORE_state_sync (struct GNUNET_PSYCSTORE_Handle *h,
- const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
uint64_t message_id,
size_t modifier_count,
const struct GNUNET_ENV_Modifier *modifiers,
}
-/**
+/**
* Reset the state of a channel.
*
* Delete all state variables stored for the given channel.
* @param channel_key The channel we are interested in.
* @param rcb Callback to call with the result of the operation.
* @param rcb_cls Closure for the callback.
- *
+ *
* @return Handle that can be used to cancel the operation.
*/
struct GNUNET_PSYCSTORE_OperationHandle *
GNUNET_PSYCSTORE_state_reset (struct GNUNET_PSYCSTORE_Handle *h,
- const struct GNUNET_CRYPTO_EccPublicSignKey
+ const struct GNUNET_CRYPTO_EddsaPublicKey
*channel_key,
GNUNET_PSYCSTORE_ResultCallback rcb,
void *rcb_cls)
-/**
+/**
* Update signed values of state variables in the state store.
*
* @param h Handle for the PSYCstore.
*/
struct GNUNET_PSYCSTORE_OperationHandle *
GNUNET_PSYCSTORE_state_hash_update (struct GNUNET_PSYCSTORE_Handle *h,
- const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
uint64_t message_id,
const struct GNUNET_HashCode *hash,
GNUNET_PSYCSTORE_ResultCallback rcb,
}
-/**
+/**
* Retrieve the best matching state variable.
*
* @param h Handle for the PSYCstore.
* @param scb Callback to return the matching state variable.
* @param rcb Callback to call with the result of the operation.
* @param cls Closure for the callbacks.
- *
+ *
* @return Handle that can be used to cancel the operation.
*/
struct GNUNET_PSYCSTORE_OperationHandle *
GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h,
- const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
const char *name,
GNUNET_PSYCSTORE_StateCallback scb,
GNUNET_PSYCSTORE_ResultCallback rcb,
-/**
+/**
* Retrieve all state variables for a channel with the given prefix.
*
* @param h Handle for the PSYCstore.
* @param scb Callback to return matching state variables.
* @param rcb Callback to call with the result of the operation.
* @param cls Closure for the callbacks.
- *
+ *
* @return Handle that can be used to cancel the operation.
*/
struct GNUNET_PSYCSTORE_OperationHandle *
GNUNET_PSYCSTORE_state_get_prefix (struct GNUNET_PSYCSTORE_Handle *h,
- const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
const char *name_prefix,
GNUNET_PSYCSTORE_StateCallback scb,
GNUNET_PSYCSTORE_ResultCallback rcb,