gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r28261 - gnunet/src/include


From: gnunet
Subject: [GNUnet-SVN] r28261 - gnunet/src/include
Date: Tue, 23 Jul 2013 07:38:35 +0200

Author: tg
Date: 2013-07-23 07:38:35 +0200 (Tue, 23 Jul 2013)
New Revision: 28261

Modified:
   gnunet/src/include/gnunet_multicast_service.h
   gnunet/src/include/gnunet_psyc_service.h
Log:
multicast/psyc: no part cb needed

Modified: gnunet/src/include/gnunet_multicast_service.h
===================================================================
--- gnunet/src/include/gnunet_multicast_service.h       2013-07-23 05:38:33 UTC 
(rev 28260)
+++ gnunet/src/include/gnunet_multicast_service.h       2013-07-23 05:38:35 UTC 
(rev 28261)
@@ -164,6 +164,8 @@
 
   /** 
    * Byte offset of this @e fragment of the @e message.
+   *
+   * FIXME: needed?
    */
   uint64_t fragment_offset GNUNET_PACKED;
 
@@ -201,7 +203,7 @@
   uint64_t state_delta GNUNET_PACKED;
 
   /**
-   * Flags for this message.
+   * Flags for this message fragment.
    */
   enum GNUNET_MULTICAST_MessageFlags flags GNUNET_PACKED;
 
@@ -265,15 +267,7 @@
  */
 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.
  *
@@ -305,15 +299,6 @@
 
 
 /** 
- * 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.
  *
  * Implementations of this function must call GNUNET_MULTICAST_join_decision()
@@ -334,22 +319,6 @@
 
 
 /** 
- * 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.
  */
 struct GNUNET_MULTICAST_MembershipTestHandle;
@@ -507,7 +476,6 @@
  * @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.
  */
@@ -519,7 +487,6 @@
                                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);
 
 
@@ -580,11 +547,11 @@
  * @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).
@@ -652,12 +619,15 @@
 /** 
  * 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);
 
 
 /** 

Modified: gnunet/src/include/gnunet_psyc_service.h
===================================================================
--- gnunet/src/include/gnunet_psyc_service.h    2013-07-23 05:38:33 UTC (rev 
28260)
+++ gnunet/src/include/gnunet_psyc_service.h    2013-07-23 05:38:35 UTC (rev 
28261)
@@ -130,15 +130,7 @@
  */
 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
  * to a @e method.
@@ -195,28 +187,6 @@
 
 
 /** 
- * 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.
  *
  * Must be called once and only once in response to an invocation of the
@@ -240,15 +210,6 @@
 
 
 /** 
- * 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.
  */
 struct GNUNET_PSYC_Master;
@@ -279,7 +240,6 @@
  *                 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.
  */
@@ -289,7 +249,6 @@
                           enum GNUNET_MULTICAST_JoinPolicy join_policy,
                           GNUNET_PSYC_Method method_cb,
                           GNUNET_PSYC_JoinCallback join_cb,
-                          GNUNET_PSYC_PartCallback part_cb,
                           void *cls);
 
 
@@ -410,17 +369,9 @@
  * 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);
 
 
 /** 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]