gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r30328 - in gnunet/src: conversation include multicast psyc


From: gnunet
Subject: [GNUnet-SVN] r30328 - in gnunet/src: conversation include multicast psyc psycstore set
Date: Fri, 18 Oct 2013 16:59:27 +0200

Author: grothoff
Date: 2013-10-18 16:59:27 +0200 (Fri, 18 Oct 2013)
New Revision: 30328

Modified:
   gnunet/src/conversation/conversation_api.c
   gnunet/src/conversation/gnunet-conversation.c
   gnunet/src/include/gnunet_fs_service.h
   gnunet/src/include/gnunet_psyc_service.h
   gnunet/src/include/gnunet_psycstore_service.h
   gnunet/src/include/gnunet_strings_lib.h
   gnunet/src/multicast/multicast_api.c
   gnunet/src/psyc/psyc_api.c
   gnunet/src/psycstore/psycstore_api.c
   gnunet/src/set/set_api.c
Log:
-doxygen fixes

Modified: gnunet/src/conversation/conversation_api.c
===================================================================
--- gnunet/src/conversation/conversation_api.c  2013-10-18 14:50:56 UTC (rev 
30327)
+++ gnunet/src/conversation/conversation_api.c  2013-10-18 14:59:27 UTC (rev 
30328)
@@ -19,7 +19,7 @@
  */
 
 /**
- * @file conversation/conversation_api2.c
+ * @file conversation/conversation_api.c
  * @brief API to the conversation service
  * @author Simon Dieterle
  * @author Andreas Fuchs

Modified: gnunet/src/conversation/gnunet-conversation.c
===================================================================
--- gnunet/src/conversation/gnunet-conversation.c       2013-10-18 14:50:56 UTC 
(rev 30327)
+++ gnunet/src/conversation/gnunet-conversation.c       2013-10-18 14:59:27 UTC 
(rev 30328)
@@ -645,7 +645,7 @@
 /**
  * Action function to print help for the command shell.
  *
- * @param arguments arguments given to the command
+ * @param args arguments given to the command
  */
 static void
 do_help (const char *args)

Modified: gnunet/src/include/gnunet_fs_service.h
===================================================================
--- gnunet/src/include/gnunet_fs_service.h      2013-10-18 14:50:56 UTC (rev 
30327)
+++ gnunet/src/include/gnunet_fs_service.h      2013-10-18 14:59:27 UTC (rev 
30328)
@@ -850,7 +850,7 @@
 
         /**
         * These values are only valid for
-        * #GNUNET_FS_STATUS_PUBLISH_DIRECTORY_PROGRESS events.
+        * #GNUNET_FS_STATUS_PUBLISH_PROGRESS_DIRECTORY events.
         */
         struct
         {

Modified: gnunet/src/include/gnunet_psyc_service.h
===================================================================
--- gnunet/src/include/gnunet_psyc_service.h    2013-10-18 14:50:56 UTC (rev 
30327)
+++ gnunet/src/include/gnunet_psyc_service.h    2013-10-18 14:59:27 UTC (rev 
30328)
@@ -415,7 +415,7 @@
  *        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 @@
                           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 @@
  *        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.
@@ -598,7 +600,7 @@
  * 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 @@
  */
 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);
 

Modified: gnunet/src/include/gnunet_psycstore_service.h
===================================================================
--- gnunet/src/include/gnunet_psycstore_service.h       2013-10-18 14:50:56 UTC 
(rev 30327)
+++ gnunet/src/include/gnunet_psycstore_service.h       2013-10-18 14:59:27 UTC 
(rev 30328)
@@ -315,7 +315,7 @@
  * @param h Handle for the PSYCstore.
  * @param channel_key Public key that identifies the channel.
  * @param ccb Callback to call with the result.
- * @param ccb_cls Closure for the callback.
+ * @param ccb_cls Closure for the @a ccb callback.
  *
  * @return Handle that can be used to cancel the operation.
  */
@@ -339,7 +339,7 @@
  * @param modifier_count Number of elements in the @a modifiers array.
  * @param modifiers List of modifiers to apply.
  * @param rcb Callback to call with the result of the operation.
- * @param rcb_cls Closure for the callback.
+ * @param rcb_cls Closure for the @a rcb callback.
  *
  * @return Handle that can be used to cancel the operation.
  */

Modified: gnunet/src/include/gnunet_strings_lib.h
===================================================================
--- gnunet/src/include/gnunet_strings_lib.h     2013-10-18 14:50:56 UTC (rev 
30327)
+++ gnunet/src/include/gnunet_strings_lib.h     2013-10-18 14:59:27 UTC (rev 
30328)
@@ -108,7 +108,7 @@
  * @param input input string
  * @param len number of bytes in @a input
  * @param input_charset character set used for @a input
- * @param ouptut_charset desired character set for the return value
+ * @param output_charset desired character set for the return value
  * @return the converted string (0-terminated),
  *  if conversion fails, a copy of the orignal
  *  string is returned.

Modified: gnunet/src/multicast/multicast_api.c
===================================================================
--- gnunet/src/multicast/multicast_api.c        2013-10-18 14:50:56 UTC (rev 
30327)
+++ gnunet/src/multicast/multicast_api.c        2013-10-18 14:59:27 UTC (rev 
30328)
@@ -33,7 +33,7 @@
 #define LOG(kind,...) GNUNET_log_from (kind, "multicast-api",__VA_ARGS__)
 
 
-/** 
+/**
  * Handle for a request to send a message to all multicast group members
  * (from the origin).
  */
@@ -508,7 +508,7 @@
  *        identity/pseudonym to peer identity, application-level message to
  *        origin, etc.).
  * @param join_cb Function called to approve / disapprove joining of a peer.
- * @param test_cb Function multicast can use to test group membership.
+ * @param mem_test_cb Function multicast can use to test group membership.
  * @param replay_frag_cb Function that can be called to replay message 
fragments
  *        this peer already knows from this group. NULL if this
  *        client is unable to support replay.
@@ -530,7 +530,7 @@
                               const struct GNUNET_PeerIdentity *relays,
                               const struct GNUNET_MessageHeader *join_request,
                               GNUNET_MULTICAST_JoinCallback join_cb,
-                              GNUNET_MULTICAST_MembershipTestCallback test_cb,
+                              GNUNET_MULTICAST_MembershipTestCallback 
mem_test_cb,
                               GNUNET_MULTICAST_ReplayFragmentCallback 
replay_frag_cb,
                               GNUNET_MULTICAST_ReplayMessageCallback 
replay_msg_cb,
                               GNUNET_MULTICAST_MessageCallback message_cb,

Modified: gnunet/src/psyc/psyc_api.c
===================================================================
--- gnunet/src/psyc/psyc_api.c  2013-10-18 14:50:56 UTC (rev 30327)
+++ gnunet/src/psyc/psyc_api.c  2013-10-18 14:59:27 UTC (rev 30328)
@@ -207,7 +207,7 @@
 /**
  * Reschedule a connect attempt to the service.
  *
- * @param h transport service to reconnect
+ * @param c channel to reconnect
  */
 static void
 reschedule_connect (struct GNUNET_PSYC_Channel *c)
@@ -237,13 +237,13 @@
 /**
  * Schedule transmission of the next message from our queue.
  *
- * @param h PSYC handle
+ * @param ch PSYC channel handle
  */
 static void
-transmit_next (struct GNUNET_PSYC_Channel *c);
+transmit_next (struct GNUNET_PSYC_Channel *ch);
 
 
-void
+static void
 master_transmit_data (struct GNUNET_PSYC_Master *mst)
 {
   struct GNUNET_PSYC_Channel *ch = &mst->ch;
@@ -295,12 +295,17 @@
  * @param msg message received, NULL on timeout or fatal error
  */
 static void
-message_handler (void *cls, const struct GNUNET_MessageHeader *msg)
+message_handler (void *cls,
+                 const struct GNUNET_MessageHeader *msg)
 {
+  // YUCK! => please have disjoint message handlers...
   struct GNUNET_PSYC_Channel *ch = cls;
   struct GNUNET_PSYC_Master *mst = cls;
   struct GNUNET_PSYC_Slave *slv = cls;
+  struct CountersResult *cres;
+  struct TransmitAck *tack;
 
+
   if (NULL == msg)
   {
     reschedule_connect (ch);
@@ -333,9 +338,6 @@
     return;
   }
 
-  struct CountersResult *cres;
-  struct TransmitAck *tack;
-
   switch (type)
   {
   case GNUNET_MESSAGE_TYPE_PSYC_MASTER_START_ACK:
@@ -382,6 +384,7 @@
                          GNUNET_TIME_UNIT_FOREVER_REL);
 }
 
+
 /**
  * Transmit next message to service.
  *
@@ -430,7 +433,7 @@
 /**
  * Schedule transmission of the next message from our queue.
  *
- * @param h PSYC handle.
+ * @param ch PSYC handle.
  */
 static void
 transmit_next (struct GNUNET_PSYC_Channel *ch)
@@ -485,13 +488,13 @@
 /**
  * Disconnect from the PSYC service.
  *
- * @param cls Channel handle.
- * @param tc Scheduler context.
+ * @param c Channel handle to disconnect
  */
 static void
 disconnect (void *c)
 {
   struct GNUNET_PSYC_Channel *ch = c;
+
   GNUNET_assert (NULL != ch);
   if (ch->transmit_head != ch->transmit_tail)
   {
@@ -546,7 +549,8 @@
  *        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 cls Closure for @a method and @a join_cb.
+ * @param master_started_cb Function to invoke after the channel master 
started.
+ * @param cls Closure for @a master_started_cb and @a join_cb.
  * @return Handle for the channel master, NULL on error.
  */
 struct GNUNET_PSYC_Master *
@@ -588,10 +592,10 @@
  * @param master PSYC channel master to stop.
  */
 void
-GNUNET_PSYC_master_stop (struct GNUNET_PSYC_Master *mst)
+GNUNET_PSYC_master_stop (struct GNUNET_PSYC_Master *master)
 {
-  disconnect (mst);
-  GNUNET_free (mst);
+  disconnect (master);
+  GNUNET_free (master);
 }
 
 
@@ -633,7 +637,7 @@
 
 /* FIXME: split up value into <64K chunks and transmit the continuations in
  *        MOD_CONT msgs */
-int
+static int
 send_modifier (void *cls, struct GNUNET_ENV_Modifier *mod)
 {
   struct GNUNET_PSYC_Channel *ch = cls;
@@ -658,7 +662,7 @@
 /**
  * Send a message to call a method to all members in the PSYC channel.
  *
- * @param mst Handle to the PSYC channel.
+ * @param master Handle to the PSYC channel.
  * @param method_name Which method should be invoked.
  * @param env Environment containing state operations and transient variables
  *            for the message, or NULL.
@@ -669,15 +673,15 @@
  *         queued).
  */
 struct GNUNET_PSYC_MasterTransmitHandle *
-GNUNET_PSYC_master_transmit (struct GNUNET_PSYC_Master *mst,
+GNUNET_PSYC_master_transmit (struct GNUNET_PSYC_Master *master,
                              const char *method_name,
                              const struct GNUNET_ENV_Environment *env,
                              GNUNET_PSYC_MasterTransmitNotify notify,
                              void *notify_cls,
                              enum GNUNET_PSYC_MasterTransmitFlags flags)
 {
-  GNUNET_assert (NULL != mst);
-  struct GNUNET_PSYC_Channel *ch = &mst->ch;
+  GNUNET_assert (NULL != master);
+  struct GNUNET_PSYC_Channel *ch = &master->ch;
   if (GNUNET_NO != ch->in_transmit)
     return NULL;
   ch->in_transmit = GNUNET_YES;
@@ -696,15 +700,15 @@
   memcpy (&pmeth[1], method_name, size);
 
   GNUNET_CONTAINER_DLL_insert_tail (ch->transmit_head, ch->transmit_tail, op);
-  GNUNET_ENV_environment_iterate (env, send_modifier, mst);
+  GNUNET_ENV_environment_iterate (env, send_modifier, master);
   transmit_next (ch);
 
-  mst->tmit = GNUNET_malloc (sizeof (*mst->tmit));
-  mst->tmit->master = mst;
-  mst->tmit->notify = notify;
-  mst->tmit->notify_cls = notify_cls;
-  mst->tmit->status = GNUNET_PSYC_DATA_CONT;
-  return mst->tmit;
+  master->tmit = GNUNET_malloc (sizeof (*master->tmit));
+  master->tmit->master = master;
+  master->tmit->notify = notify;
+  master->tmit->notify_cls = notify_cls;
+  master->tmit->status = GNUNET_PSYC_DATA_CONT;
+  return master->tmit;
 }
 
 
@@ -728,12 +732,10 @@
 void
 GNUNET_PSYC_master_transmit_cancel (struct GNUNET_PSYC_MasterTransmitHandle 
*th)
 {
-  struct GNUNET_PSYC_Master *mst = th->master;
-  struct GNUNET_PSYC_Channel *ch = &mst->ch;
+  struct GNUNET_PSYC_Master *master = th->master;
+  struct GNUNET_PSYC_Channel *ch = &master->ch;
   if (GNUNET_NO != ch->in_transmit)
     return;
-
-
 }
 
 
@@ -758,8 +760,10 @@
  *        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.
@@ -810,15 +814,15 @@
  * 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 slv Slave handle.
+ * @param slave Slave handle.
  */
 void
-GNUNET_PSYC_slave_part (struct GNUNET_PSYC_Slave *slv)
+GNUNET_PSYC_slave_part (struct GNUNET_PSYC_Slave *slave)
 {
-  disconnect (slv);
-  GNUNET_free (slv);
+  disconnect (slave);
+  GNUNET_free (slave);
 }
 
 
@@ -914,20 +918,20 @@
  * correctly; not doing so correctly will result in either denying other slaves
  * access or offering access to channel data to non-members.
  *
- * @param ch Channel handle.
+ * @param channel Channel handle.
  * @param slave_key Identity of channel slave to add.
  * @param announced_at ID of the message that announced the membership change.
  * @param effective_since Addition of slave is in effect since this message ID.
  */
 void
-GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *ch,
-                               const struct GNUNET_CRYPTO_EddsaPublicKey
-                               *slave_key,
+GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel,
+                               const struct GNUNET_CRYPTO_EddsaPublicKey 
*slave_key,
                                uint64_t announced_at,
                                uint64_t effective_since)
 {
   struct ChannelSlaveAdd *slvadd;
   struct OperationHandle *op = GNUNET_malloc (sizeof (*op) + sizeof (*slvadd));
+
   slvadd = (struct ChannelSlaveAdd *) &op[1];
   op->msg = (struct GNUNET_MessageHeader *) slvadd;
 
@@ -935,9 +939,10 @@
   slvadd->header.size = htons (sizeof (*slvadd));
   slvadd->announced_at = GNUNET_htonll (announced_at);
   slvadd->effective_since = GNUNET_htonll (effective_since);
-
-  GNUNET_CONTAINER_DLL_insert_tail (ch->transmit_head, ch->transmit_tail, op);
-  transmit_next (ch);
+  GNUNET_CONTAINER_DLL_insert_tail (channel->transmit_head,
+                                    channel->transmit_tail,
+                                    op);
+  transmit_next (channel);
 }
 
 
@@ -958,27 +963,27 @@
  * denying members access or offering access to channel data to
  * non-members.
  *
- * @param ch Channel handle.
+ * @param channel Channel handle.
  * @param slave_key Identity of channel slave to remove.
  * @param announced_at ID of the message that announced the membership change.
  */
 void
-GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *ch,
-                                  const struct GNUNET_CRYPTO_EddsaPublicKey
-                                  *slave_key,
+GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel,
+                                  const struct GNUNET_CRYPTO_EddsaPublicKey 
*slave_key,
                                   uint64_t announced_at)
 {
   struct ChannelSlaveRemove *slvrm;
   struct OperationHandle *op = GNUNET_malloc (sizeof (*op) + sizeof (*slvrm));
+
   slvrm = (struct ChannelSlaveRemove *) &op[1];
   op->msg = (struct GNUNET_MessageHeader *) slvrm;
-
   slvrm->header.type = GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_SLAVE_RM;
   slvrm->header.size = htons (sizeof (*slvrm));
   slvrm->announced_at = GNUNET_htonll (announced_at);
-
-  GNUNET_CONTAINER_DLL_insert_tail (ch->transmit_head, ch->transmit_tail, op);
-  transmit_next (ch);
+  GNUNET_CONTAINER_DLL_insert_tail (channel->transmit_head,
+                                    channel->transmit_tail,
+                                    op);
+  transmit_next (channel);
 }
 
 
@@ -990,24 +995,21 @@
  *
  * To get the latest message, use 0 for both the start and end message ID.
  *
- * @param ch Which channel should be replayed?
+ * @param channel Which channel should be replayed?
  * @param start_message_id Earliest interesting point in history.
  * @param end_message_id Last (exclusive) interesting point in history.
  * @param method Function to invoke on messages received from the story.
  * @param finish_cb Function to call when the requested story has been fully
  *        told (counting message IDs might not suffice, as some messages
  *        might be secret and thus the listener would not know the story is
- *        finished without being told explicitly)
-{
-  return NULL;
-} once this function
+ *        finished without being told explicitly) once this function
  *        has been called, the client must not call
  *        GNUNET_PSYC_channel_story_tell_cancel() anymore.
  * @param cls Closure for the callbacks.
  * @return Handle to cancel story telling operation.
  */
 struct GNUNET_PSYC_Story *
-GNUNET_PSYC_channel_story_tell (struct GNUNET_PSYC_Channel *ch,
+GNUNET_PSYC_channel_story_tell (struct GNUNET_PSYC_Channel *channel,
                                 uint64_t start_message_id,
                                 uint64_t end_message_id,
                                 GNUNET_PSYC_Method method,

Modified: gnunet/src/psycstore/psycstore_api.c
===================================================================
--- gnunet/src/psycstore/psycstore_api.c        2013-10-18 14:50:56 UTC (rev 
30327)
+++ gnunet/src/psycstore/psycstore_api.c        2013-10-18 14:59:27 UTC (rev 
30328)
@@ -948,8 +948,8 @@
  *
  * @param h Handle for the PSYCstore.
  * @param channel_key Public key that identifies the channel.
- * @param mccb Callback to call with the result.
- * @param mccb_cls Closure for the callback.
+ * @param ccb Callback to call with the result.
+ * @param ccb_cls Closure for the @a ccb callback.
  *
  * @return Handle that can be used to cancel the operation.
  */
@@ -957,14 +957,14 @@
 GNUNET_PSYCSTORE_counters_get (struct GNUNET_PSYCSTORE_Handle *h,
                                struct GNUNET_CRYPTO_EddsaPublicKey 
*channel_key,
                                GNUNET_PSYCSTORE_CountersCallback ccb,
-                               void *mccb_cls)
+                               void *ccb_cls)
 {
   struct OperationRequest *req;
   struct GNUNET_PSYCSTORE_OperationHandle *op
     = GNUNET_malloc (sizeof (*op) + sizeof (*req));
   op->h = h;
   op->data_cb = ccb;
-  op->cls = mccb_cls;
+  op->cls = ccb_cls;
 
   req = (struct OperationRequest *) &op[1];
   op->msg = (struct GNUNET_MessageHeader *) req;
@@ -995,7 +995,7 @@
  * @param modifier_count Number of elements in the @a modifiers array.
  * @param modifiers List of modifiers to apply.
  * @param rcb Callback to call with the result of the operation.
- * @param rcb_cls Closure for the callback.
+ * @param rcb_cls Closure for the @a rcb callback.
  *
  * @return Handle that can be used to cancel the operation.
  */

Modified: gnunet/src/set/set_api.c
===================================================================
--- gnunet/src/set/set_api.c    2013-10-18 14:50:56 UTC (rev 30327)
+++ gnunet/src/set/set_api.c    2013-10-18 14:59:27 UTC (rev 30328)
@@ -649,7 +649,7 @@
  * Accept a request we got via #GNUNET_SET_listen.  Must be called during
  * #GNUNET_SET_listen, as the 'struct GNUNET_SET_Request' becomes invalid
  * afterwards.
- * Call #GNUNET_SET_conclude to provide the local set to use for the operation,
+ * Call #GNUNET_SET_commit to provide the local set to use for the operation,
  * and to begin the exchange with the remote peer.
  *
  * @param request request to accept




reply via email to

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