summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2016-02-01 14:59:22 +0000
committerGabor X Toth <*@tg-x.net>2016-02-01 14:59:22 +0000
commit522bd40f4cee9e5546d15128f76d18799017220c (patch)
tree4935b3752d559ba4e28c32320c0115e2f3fa2dc6
parent5af3181a70b7ec8ac792507ffa9eab581cc03470 (diff)
social: api, doc
-rw-r--r--src/include/gnunet_psyc_message.h18
-rw-r--r--src/include/gnunet_social_service.h47
-rw-r--r--src/social/gnunet-service-social.c2
-rw-r--r--src/social/social_api.c2
-rw-r--r--src/social/test_social.c8
5 files changed, 39 insertions, 38 deletions
diff --git a/src/include/gnunet_psyc_message.h b/src/include/gnunet_psyc_message.h
index e85f40052..42ff0ea86 100644
--- a/src/include/gnunet_psyc_message.h
+++ b/src/include/gnunet_psyc_message.h
@@ -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.
diff --git a/src/include/gnunet_social_service.h b/src/include/gnunet_social_service.h
index b8b452dfa..1392587ad 100644
--- a/src/include/gnunet_social_service.h
+++ b/src/include/gnunet_social_service.h
@@ -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.
*/
diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c
index df9f2a395..a15f8bdc1 100644
--- a/src/social/gnunet-service-social.c
+++ b/src/social/gnunet-service-social.c
@@ -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
}
diff --git a/src/social/social_api.c b/src/social/social_api.c
index 0eafc852a..9c501344b 100644
--- a/src/social/social_api.c
+++ b/src/social/social_api.c
@@ -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)
diff --git a/src/social/test_social.c b/src/social/test_social.c
index 2606e7fe8..78c58db14 100644
--- a/src/social/test_social.c
+++ b/src/social/test_social.c
@@ -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++;