/**
* Byte offset of this @e fragment of the @e message.
+ *
+ * FIXME: needed?
*/
uint64_t fragment_offset GNUNET_PACKED;
uint64_t state_delta GNUNET_PACKED;
/**
- * Flags for this message.
+ * Flags for this message fragment.
*/
enum GNUNET_MULTICAST_MessageFlags flags GNUNET_PACKED;
*/
struct GNUNET_MULTICAST_JoinHandle;
-/**
- * Handle that identifies a part request.
- *
- * Used to match calls to #GNUNET_MULTICAST_PartCallback to the
- * corresponding calls to GNUNET_MULTICAST_part_ack().
- */
-struct GNUNET_MULTICAST_PartHandle;
-
/**
* Function to call with the decision made for a join request.
const struct GNUNET_PeerIdentity *relays);
-/**
- * Part acknowledgment.
- *
- * @param ph Part handle.
- */
-void
-GNUNET_MULTICAST_part_ack (struct GNUNET_MULTICAST_PartHandle *ph);
-
-
/**
* Method called whenever another peer wants to join the multicast group.
*
struct GNUNET_MULTICAST_JoinHandle *jh);
-/**
- * Method called whenever another peer wants to part the multicast group.
- *
- * A part request must always be honoured, and answered with GNUNET_MULTICAST_part_ack();
- *
- * @param cls Closure.
- * @param peer Identity of the peer that wants to part.
- * @param msg Application-dependent part message from the leaving user.
- * @param ph Part handle.
- */
-typedef void (*GNUNET_MULTICAST_PartCallback)(void *cls,
- const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *msg,
- struct GNUNET_MULTICAST_PartHandle *ph);
-
-
/**
* Handle to pass back for the answer of a membership test.
*/
* @param replay_cb Function that can be called to replay a message.
* @param test_cb Function multicast can use to test group membership.
* @param join_cb Function called to approve / disapprove joining of a peer.
- * @param part_cb Function called when a member wants to part the group.
* @param request_cb Function called with messages from group members.
* @return Handle for the origin, NULL on error.
*/
GNUNET_MULITCAST_ReplayCallback replay_cb,
GNUNET_MULITCAST_MembershipTestCallback test_cb,
GNUNET_MULTICAST_JoinCallback join_cb,
- GNUNET_MULTICAST_PartCallback part_cb,
GNUNET_MULTICAST_RequestCallback request_cb);
* @param pub_key ECC key that identifies the group.
* @param origin Peer identity of the origin.
* @param max_known_fragment_id Largest known message fragment ID to the replay
- service; all messages with IDs larger than this ID will be replayed if
+ * service; all messages with IDs larger than this ID will be replayed if
* possible (lower IDs will be considered known and thus only
* be replayed upon explicit request).
* @param max_known_state_fragment_id Largest known message fragment ID with a
- non-zero value for the @e state_delta; state messages with
+ * non-zero value for the @e state_delta; state messages with
* larger IDs than this value will be replayed with high priority
* (lower IDs will be considered known and thus only
* be replayed upon explicit request).
/**
* Part a multicast group.
*
+ * Disconnects from all group members and invalidates the @a member handle.
+ *
+ * An application-dependent part message can be transmitted beforehand using
+ * GNUNET_MULTICAST_member_to_origin())
+ *
* @param member Membership handle.
- * @param part_req Application-dependent part request to send to the origin.
*/
void
-GNUNET_MULTICAST_member_part (struct GNUNET_MULTICAST_Member *member,
- const struct GNUNET_MessageHeader *part_req);
+GNUNET_MULTICAST_member_part (struct GNUNET_MULTICAST_Member *member);
/**
*/
struct GNUNET_PSYC_JoinHandle;
-/**
- * Handle that identifies a part request.
- *
- * Used to match calls to #GNUNET_PSYC_PartCallback to the
- * corresponding calls to GNUNET_PSYC_part_ack().
- */
-struct GNUNET_PSYC_PartHandle;
-
/**
* Method called from PSYC upon receiving a message indicating a call
struct GNUNET_PSYC_JoinHandle *jh);
-/**
- * Method called from PSYC upon receiving a part request.
- *
- * @param cls Closure.
- * @param peer Peer requesting to leave.
- * @param method_name Method name in the part request.
- * @param header_length Number of modifiers in header.
- * @param header Modifiers present in the message.
- * @param data_size Number of bytes in @a data.
- * @param data Data stream given to the method (might not be zero-terminated
- * if data is binary).
- */
-typedef int (*GNUNET_PSYC_PartCallback)(void *cls,
- const struct GNUNET_PeerIdentity *peer,
- const char *method_name,
- size_t header_length,
- GNUNET_PSYC_Modifier *header,
- size_t data_size,
- const void *data,
- struct GNUNET_PSYC_PartHandle *ph);
-
-
/**
* Function to call with the decision made for a join request.
*
const void *data);
-/**
- * Send a part acknowledgment.
- *
- * @param ph Part handle.
- */
-void
-GNUNET_PSYC_part_ack (struct GNUNET_PSYC_PartHandle *ph);
-
-
/**
* Handle for the master of a PSYC channel.
*/
* Used to automate group management decisions.
* @param method_cb Function to invoke on messages received from members.
* @param join_cb Function to invoke when a peer wants to join.
- * @param part_cb Function to invoke when a peer wants to part.
* @param cls Closure for the callbacks.
* @return Handle for the channel master, NULL on error.
*/
enum GNUNET_MULTICAST_JoinPolicy join_policy,
GNUNET_PSYC_Method method_cb,
GNUNET_PSYC_JoinCallback join_cb,
- GNUNET_PSYC_PartCallback part_cb,
void *cls);
* first explicitly send a @e part request (via GNUNET_PSYC_slave_to_master()).
*
* @param slave Slave handle.
- * @param method_name Method name for the part request.
- * @param env Environment containing transient variables for the request, or NULL.
- * @param data_size Number of bytes in @a data.
- * @param data Payload for the part message.
*/
void
-GNUNET_PSYC_slave_part (struct GNUNET_PSYC_Slave *slave,
- const char *method_name,
- const struct GNUNET_ENV_Environment *env,
- size_t data_size,
- const void *data);
+GNUNET_PSYC_slave_part (struct GNUNET_PSYC_Slave *slave);
/**