/**
- * Signature of functions that implement the creation of set operations
- * (currently "evaluate" and "accept").
+ * Signature of functions that implement accepting a set operation.
*
- * @param op operation that is created, should be initialized by the implementation
+ * @param op operation that is created by accepting the operation,
+ * should be initialized by the implementation
*/
typedef void
-(*OpCreateImpl) (struct Operation *op);
+(*OpAcceptImpl) (struct Operation *op);
+
+
+/**
+ * Signature of functions that implement starting the evaluation of
+ * set operations.
+ *
+ * @param op operation that is created, should be initialized to
+ * begin the evaluation
+ * @param opaque_context message to be transmitted to the listener
+ * to convince him to accept, may be NULL
+ */
+typedef void
+(*OpEvaluateImpl) (struct Operation *op,
+ const struct GNUNET_MessageHeader *opaque_context);
/**
/**
* Callback for accepting a set operation request
*/
- OpCreateImpl accept;
+ OpAcceptImpl accept;
/**
* Callback for starting evaluation with a remote peer.
*/
- OpCreateImpl evaluate;
+ OpEvaluateImpl evaluate;
/**
* Callback for destruction of the set state.
struct OperationSpecification *spec;
/**
- * Operation-specific operation state.
+ * Operation-specific operation state. Note that the exact
+ * type depends on this being a union or intersection operation
+ * (and thus on @e vt).
*/
struct OperationState *state;
*/
struct Operation *prev;
+ /**
+ * The identity of the requesting peer. Needs to
+ * be stored here as the op spec might not have been created yet.
+ */
+ struct GNUNET_PeerIdentity peer;
+
+ /**
+ * Timeout task, if the incoming peer has not been accepted
+ * after the timeout, it will be disconnected.
+ */
+ GNUNET_SCHEDULER_TaskIdentifier timeout_task;
+
+ /**
+ * Unique request id for the request from a remote peer, sent to the
+ * client, which will accept or reject the request. Set to '0' iff
+ * the request has not been suggested yet.
+ */
+ uint32_t suggest_id;
+
/**
* #GNUNET_YES if this is not a "real" set operation yet, and we still
* need to wait for the other peer to give us more details.
*/
enum GNUNET_SET_OperationType operation;
+ /**
+ * Each @e iter is assigned a unique number, so that the client
+ * can distinguish iterations.
+ */
+ uint16_t iteration_id;
+
};