social: api, doc
authorGabor X Toth <*@tg-x.net>
Mon, 1 Feb 2016 14:59:22 +0000 (14:59 +0000)
committerGabor X Toth <*@tg-x.net>
Mon, 1 Feb 2016 14:59:22 +0000 (14:59 +0000)
src/include/gnunet_psyc_message.h
src/include/gnunet_social_service.h
src/social/gnunet-service-social.c
src/social/social_api.c
src/social/test_social.c

index e85f4005227b95b298748045d9427b0445023c01..42ff0ea86cd46880b5b1b8c69f1f271c161729ad 100644 (file)
@@ -208,8 +208,10 @@ GNUNET_PSYC_receive_reset (struct GNUNET_PSYC_ReceiveHandle *recv);
 /**
  * Handle incoming PSYC message.
  *
- * @param recv  Receive handle.
- * @param msg   The message.
+ * @param recv
+ *        Receive handle.
+ * @param msg
+ *        The message.
  *
  * @return #GNUNET_OK on success,
  *         #GNUNET_SYSERR on receive error.
@@ -222,10 +224,14 @@ GNUNET_PSYC_receive_message (struct GNUNET_PSYC_ReceiveHandle *recv,
 /**
  * Check if @a data contains a series of valid message parts.
  *
- * @param      data_size    Size of @a data.
- * @param      data        Data.
- * @param[out] first_ptype  Type of first message part.
- * @param[out] last_ptype   Type of last message part.
+ * @param data_size
+ *        Size of @a data.
+ * @param data
+ *        Data.
+ * @param[out] first_ptype
+ *        Type of first message part.
+ * @param[out] last_ptype
+ *        Type of last message part.
  *
  * @return Number of message parts found in @a data.
  *         or GNUNET_SYSERR if the message contains invalid parts.
index b8b452dfab52a064f7d6ab72b3a59588cb2da0d9..1392587adbd0afdaac23339f7160a9b1b68d9f00 100644 (file)
@@ -457,21 +457,28 @@ GNUNET_SOCIAL_nym_get_pub_key_hash (const struct GNUNET_SOCIAL_Nym *nym);
  * reference remains valid until the #GNUNET_SOCIAL_FarewellCallback is invoked
  * for it.
  *
- * @param cls Closure.
- * @param nym Handle for the user who wants to enter.
- * @param method_name Method name in the entry request.
- * @param variable_count Number of elements in the @a variables array.
- * @param variables Variables present in the message.
- * @param data_size Number of bytes in @a data.
- * @param data Payload given on enter (e.g. a password).
+ * @param cls
+ *        Closure.
+ * @param nym
+ *        Handle for the user who wants to enter.
+ * @param method_name
+ *        Method name in the entry request.
+ * @param variable_count
+ *        Number of elements in the @a variables array.
+ * @param variables
+ *        Variables present in the message.
+ * @param data
+ *        Payload given on enter (e.g. a password).
+ * @param data_size
+ *        Number of bytes in @a data.
  */
 typedef void
 (*GNUNET_SOCIAL_AnswerDoorCallback) (void *cls,
                                      struct GNUNET_SOCIAL_Nym *nym,
                                      const char *method_name,
                                      struct GNUNET_PSYC_Environment *env,
-                                     size_t data_size,
-                                     const void *data);
+                                     const void *data,
+                                     size_t data_size);
 
 
 /**
@@ -589,14 +596,8 @@ GNUNET_SOCIAL_host_enter_reconnect (struct GNUNET_SOCIAL_HostConnection *hconn,
  *        #GNUNET_YES    if @a nym is admitted,
  *        #GNUNET_NO     if @a nym is refused entry,
  *        #GNUNET_SYSERR if we cannot answer the request.
- * @param method_name
- *        Method name for the rejection message.
- * @param env
- *        Environment containing variables for the message, or NULL.
- * @param data
- *        Data for the rejection message to send back.
- * @param data_size
- *        Number of bytes in @a data for method.
+ * @param entry_resp
+ *        Entry response message, or NULL.
  * @return #GNUNET_OK on success,
  *         #GNUNET_SYSERR if the message is too large.
  */
@@ -860,14 +861,8 @@ typedef void
  *        Number of elements in the @a relays array.
  * @param relays
  *        Relays for the underlying multicast group.
- * @param method_name
- *        Method name for the message.
- * @param env
- *        Environment containing variables for the message, or NULL.
- * @param data
- *        Payload for the message to give to the enter callback.
- * @param data_size
- *        Number of bytes in @a data.
+ * @param entry_msg
+ *        Entry message.
  * @param slicer
  *        Slicer to use for processing incoming requests from guests.
  *
@@ -1190,8 +1185,6 @@ struct GNUNET_SOCIAL_LookHandle;
  *        The place to look the object at.
  * @param full_name
  *        Full name of the object.
- * @param value_size
- *        Set to the size of the returned value.
  *
  * @return NULL if there is no such object at this place.
  */
index df9f2a39575a220564aacac15b6110a15391b646..a15f8bdc17feb373d84a165ff87eef3e0f7e58c7 100644 (file)
@@ -3375,6 +3375,8 @@ identity_recv_ego (void *cls, struct GNUNET_IDENTITY_Ego *id_ego,
     GNUNET_CONTAINER_multihashmap_put (egos, &ego_pub_hash, ego,
                                        GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE);
   }
+
+  // FIXME: notify clients about changed ego
 }
 
 
index 0eafc852a89e168fdb9b2ee278723e08be2fab48..9c501344b7421dcbe6e8c5ac7a289cf9fe57f9f5 100644 (file)
@@ -848,7 +848,7 @@ host_recv_enter_request (void *cls,
 
     struct GNUNET_SOCIAL_Nym *nym = nym_get_or_create (&req->slave_pub_key);
     hst->answer_door_cb (hst->cb_cls, nym, method_name, env,
-                         data_size, data);
+                         data, data_size);
   } while (0);
 
   if (NULL != env)
index 2606e7fe8bfca76bd9047a8415f6f86ad5e9dd96..78c58db1424c8fe8a97cdbefed57c0a6ed710f0b 100644 (file)
@@ -156,8 +156,8 @@ host_answer_door (void *cls,
                   struct GNUNET_SOCIAL_Nym *nym,
                   const char *method_name,
                   struct GNUNET_PSYC_Environment *env,
-                  size_t data_size,
-                  const void *data);
+                  const void *data,
+                  size_t data_size);
 
 static void
 host_enter ();
@@ -1063,8 +1063,8 @@ host_answer_door (void *cls,
                   struct GNUNET_SOCIAL_Nym *nym,
                   const char *method_name,
                   struct GNUNET_PSYC_Environment *env,
-                  size_t data_size,
-                  const void *data)
+                  const void *data,
+                  size_t data_size)
 {
   join_req_count++;