+/**
+ * Possible options to pass to a set operation.
+ *
+ * Used as tag for struct #GNUNET_SET_Option.
+ */
+enum GNUNET_SET_OptionType
+{
+ /**
+ * List terminator.
+ */
+ GNUNET_SET_OPTION_END=0,
+ /**
+ * Fail set operations when the other peer shows weird behavior
+ * that might by a Byzantine fault.
+ *
+ * For set union, 'v.num' is a lower bound on elements
+ * that the other peer must have in common with us.
+ */
+ GNUNET_SET_OPTION_BYZANTINE=1,
+ /**
+ * Do not use the optimized set operation, but send full sets.
+ * Might trigger Byzantine fault detection.
+ */
+ GNUNET_SET_OPTION_FORCE_FULL=2,
+ /**
+ * Only use optimized set operations, even though for this
+ * particular set operation they might be much slower.
+ * Might trigger Byzantine fault detection.
+ */
+ GNUNET_SET_OPTION_FORCE_DELTA=4,
+};
+
+
+/**
+ * Option for set operations.
+ */
+struct GNUNET_SET_Option
+{
+ /**
+ * Type of the option.
+ */
+ enum GNUNET_SET_OptionType type;
+
+ /**
+ * Value for the option, only used with some options.
+ */
+ union {
+ uint64_t num;
+ } v;
+};
+
+
+/**
+ * Continuation used for some of the set operations
+ *
+ * @param cls closure
+ */
+typedef void
+(*GNUNET_SET_Continuation) (void *cls);
+
+
+/**
+ * Callback for set operation results. Called for each element
+ * in the result set.
+ *
+ * @param cls closure
+ * @param element a result element, only valid if status is #GNUNET_SET_STATUS_OK
+ * @param current_size current set size
+ * @param status see `enum GNUNET_SET_Status`
+ */
+typedef void
+(*GNUNET_SET_ResultIterator) (void *cls,
+ const struct GNUNET_SET_Element *element,
+ uint64_t current_size,
+ enum GNUNET_SET_Status status);
+
+/**
+ * Iterator for set elements.
+ *
+ * @param cls closure
+ * @param element the current element, NULL if all elements have been
+ * iterated over
+ * @return #GNUNET_YES to continue iterating, #GNUNET_NO to stop.
+ */
+typedef int
+(*GNUNET_SET_ElementIterator) (void *cls,
+ const struct GNUNET_SET_Element *element);
+
+
+/**
+ * Called when another peer wants to do a set operation with the
+ * local peer. If a listen error occurs, the @a request is NULL.
+ *
+ * @param cls closure
+ * @param other_peer the other peer
+ * @param context_msg message with application specific information from
+ * the other peer
+ * @param request request from the other peer (never NULL), use GNUNET_SET_accept()
+ * to accept it, otherwise the request will be refused
+ * Note that we can't just return value from the listen callback,
+ * as it is also necessary to specify the set we want to do the
+ * operation with, whith sometimes can be derived from the context
+ * message. It's necessary to specify the timeout.
+ */
+typedef void
+(*GNUNET_SET_ListenCallback) (void *cls,
+ const struct GNUNET_PeerIdentity *other_peer,
+ const struct GNUNET_MessageHeader *context_msg,
+ struct GNUNET_SET_Request *request);
+
+
+
+typedef void
+(*GNUNET_SET_CopyReadyCallback) (void *cls,
+ struct GNUNET_SET_Handle *copy);
+
+