-remove GNUNET_MQ_impl_send_commit, make it part of send_continue, to ensure calling...
[oweals/gnunet.git] / src / include / gnunet_psyc_service.h
index 7ac40a4c5d03931d50f12ead4e6d868e0b647ce8..91dcd0b07ad741ae42410ac5057eb8a349b5f2fb 100644 (file)
@@ -207,8 +207,8 @@ struct GNUNET_PSYC_MessageMethod
   uint32_t flags GNUNET_PACKED;
 
   /**
-   * Sending slave's public key. NULL if the message is from the master, or when
-   * transmitting a message.
+   * Sending slave's public key.
+   * NULL if the message is from the master, or when transmitting a message.
    */
   struct GNUNET_CRYPTO_EddsaPublicKey slave_key;
 
@@ -264,7 +264,7 @@ enum GNUNET_PSYC_DataStatus
 struct GNUNET_PSYC_MessageData
 {
   /**
-   * Type: GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MODIFIER
+   * Type: GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_DATA
    */
   struct GNUNET_MessageHeader header;
 
@@ -367,7 +367,7 @@ typedef int
 void
 GNUNET_PSYC_join_decision (struct GNUNET_PSYC_JoinHandle *jh,
                            int is_admitted,
-                           unsigned int relay_count,
+                           uint32_t relay_count,
                            const struct GNUNET_PeerIdentity *relays,
                            const char *method_name,
                            const struct GNUNET_ENV_Environment *env,
@@ -415,7 +415,7 @@ typedef void
  *        Used to automate join decisions.
  * @param method Function to invoke on messages received from slaves.
  * @param join_cb Function to invoke when a peer wants to join.
- * @param start_cb Function to invoke after the channel master started.
+ * @param master_started_cb Function to invoke after the channel master started.
  * @param cls Closure for @a method and @a join_cb.
  * @return Handle for the channel master, NULL on error.
  */
@@ -425,7 +425,7 @@ GNUNET_PSYC_master_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
                           enum GNUNET_PSYC_Policy policy,
                           GNUNET_PSYC_Method method,
                           GNUNET_PSYC_JoinCallback join_cb,
-                          GNUNET_PSYC_MasterStartCallback start_cb,
+                          GNUNET_PSYC_MasterStartCallback master_started_cb,
                           void *cls);
 
 
@@ -569,8 +569,10 @@ typedef void
  *        as relays and used to join the group at.
  * @param method Function to invoke on messages received from the channel,
  *        typically at least contains functions for @e join and @e part.
- * @param join_cb Function to invoke when a peer wants to join.
- * @param cls Closure for @a method_cb and @a join_cb.
+ * @param join_cb function invoked once we have joined with the current
+ *        message ID of the channel
+ * @param slave_joined_cb Function to invoke when a peer wants to join.
+ * @param cls Closure for @a method_cb and @a slave_joined_cb.
  * @param method_name Method name for the join request.
  * @param env Environment containing transient variables for the request, or NULL.
  * @param data Payload for the join message.
@@ -582,7 +584,7 @@ GNUNET_PSYC_slave_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
                         const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
                         const struct GNUNET_CRYPTO_EddsaPrivateKey *slave_key,
                         const struct GNUNET_PeerIdentity *origin,
-                        size_t relay_count,
+                        uint32_t relay_count,
                         const struct GNUNET_PeerIdentity *relays,
                         GNUNET_PSYC_Method method,
                         GNUNET_PSYC_JoinCallback join_cb,
@@ -591,14 +593,14 @@ GNUNET_PSYC_slave_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
                         const char *method_name,
                         const struct GNUNET_ENV_Environment *env,
                         const void *data,
-                        size_t data_size);
+                        uint16_t data_size);
 
 
 /**
  * Part a PSYC channel.
  *
  * Will terminate the connection to the PSYC service.  Polite clients should
- * first explicitly send a @e part request (via GNUNET_PSYC_slave_transmit()).
+ * first explicitly send a part request (via GNUNET_PSYC_slave_transmit()).
  *
  * @param slave Slave handle.
  */
@@ -732,8 +734,7 @@ GNUNET_PSYC_slave_get_channel (struct GNUNET_PSYC_Slave *slave);
  */
 void
 GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel,
-                               const struct GNUNET_CRYPTO_EddsaPublicKey
-                               *slave_key,
+                               const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key,
                                uint64_t announced_at,
                                uint64_t effective_since);