* Everything went ok.
*/
GNUNET_SET_STATUS_OK,
+
/**
* There was a timeout.
*/
GNUNET_SET_STATUS_TIMEOUT,
+
/**
* The other peer refused to to the operation with us,
* or something went wrong.
*/
GNUNET_SET_STATUS_FAILURE,
+
+ /**
+ * Success, all elements have been returned (but the other
+ * peer might still be receiving some from us, so we are not done).
+ */
+ GNUNET_SET_STATUS_HALF_DONE,
+
/**
- * Success, all elements have been sent.
+ * Success, all elements have been sent (and received).
*/
GNUNET_SET_STATUS_DONE
};
/**
* Actual data of the element
*/
- void *data;
+ const void *data;
};
* @param status see enum GNUNET_SET_Status
*/
typedef void (*GNUNET_SET_ResultIterator) (void *cls,
- struct GNUNET_SET_Element *element,
+ const struct GNUNET_SET_Element *element,
enum GNUNET_SET_Status status);
* fail due to hash collisions, using a different salt for each operation
* makes it harder for an attacker to exploit this
* @param timeout result_cb will be called with GNUNET_SET_STATUS_TIMEOUT
- * if the operation is not done after the specified time
+ * if the operation is not done after the specified time; @deprecated
* @param result_mode specified how results will be returned,
* see 'GNUNET_SET_ResultMode'.
* @param result_cb called on error or success
*
* @param request request to accept
* @param set set used for the requested operation
- * @param timeout timeout for the set operation
+ * @param timeout timeout for the set operation, @deprecated
* @param result_mode specified how results will be returned,
* see 'GNUNET_SET_ResultMode'.
* @param result_cb callback for the results
GNUNET_MQ_queue_for_server_client (struct GNUNET_SERVER_Client *client);
-
/**
* Create a message queue for a GNUNET_STREAM_Socket.
* If handlers are specfied, receive messages from the stream socket.
* @param handlers handlers for receiving messages
* @param cls closure for the handlers
* @return the message queue
+ * @deprecated - GNUNET_MQ_queue_create_with_callbacks
*/
struct GNUNET_MQ_MessageQueue *
GNUNET_MQ_queue_for_stream_socket (struct GNUNET_STREAM_Socket *socket,
const struct GNUNET_MQ_Handler *handlers,
void *cls);
+
/**
* Replace the handlers of a message queue with new handlers.
* Takes effect immediately, even for messages that already have been received, but for
void *cls);
-
/**
* Call a callback once the message has been sent, that is, the message
* can not be canceled anymore.
GNUNET_MQ_NotifyCallback cb,
void *cls);
+
/**
* Call a callback once all messages queued have been sent,
* i.e. the message queue is empty.
* @param mqm the message queue to send the notification for
* @param cb the callback to call on an empty queue
* @param cls closure for cb
+ * @deprecated
*/
void
GNUNET_MQ_notify_empty (struct GNUNET_MQ_MessageQueue *mqm,
* @param mqm the message queue to send the notification for
* @param cb the callback to call on a read error
* @param cls closure for cb
+ * @deprecated, integrate with queue creation
*/
void
GNUNET_MQ_notify_read_error (struct GNUNET_MQ_MessageQueue *mqm,
/*
This file is part of GNUnet.
- (C) 2012 Christian Grothoff (and other contributing authors)
+ (C) 2012, 2013 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
/**
* Operation type, values of enum GNUNET_SET_OperationType
*/
+ // FIXME: use 32_t for 'enum'.
uint16_t operation GNUNET_PACKED;
};
struct GNUNET_MessageHeader header;
/**
- * application id
+ * Operation type, values of enum GNUNET_SET_OperationType
*/
- struct GNUNET_HashCode app_id;
+ uint16_t operation GNUNET_PACKED;
/**
- * Operation type, values of enum GNUNET_SET_OperationType
+ * application id
*/
- uint16_t operation GNUNET_PACKED;
+ struct GNUNET_HashCode app_id;
+
};
*/
struct GNUNET_MessageHeader header;
- /**
- * Identity of the requesting peer.
- */
- struct GNUNET_PeerIdentity peer_id;
-
/**
* ID of the request we want to accept,
* chosen by the service.
*/
uint32_t accept_id GNUNET_PACKED;
+ /**
+ * Identity of the requesting peer.
+ */
+ struct GNUNET_PeerIdentity peer_id;
+
/* rest: nested context message */
};
*/
struct GNUNET_MessageHeader header;
+ /**
+ * id of our evaluate, chosen by the client
+ */
+ uint32_t request_id GNUNET_PACKED;
+
/**
* Peer to evaluate the operation with
*/
*/
struct GNUNET_HashCode app_id;
- /**
- * id of our evaluate, chosen by the client
- */
- uint32_t request_id GNUNET_PACKED;
-
/**
* Salt to use for the operation
*/
+# @INLINE@ test_set_defaults.conf
+[PATHS]
+SERVICEHOME = /tmp/test-gnunet-set/
+
[set]
AUTOSTART = YES
PORT = 2106