aboutsummaryrefslogtreecommitdiff
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)
downloadgnunet-522bd40f4cee9e5546d15128f76d18799017220c.tar.gz
gnunet-522bd40f4cee9e5546d15128f76d18799017220c.zip
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);
208/** 208/**
209 * Handle incoming PSYC message. 209 * Handle incoming PSYC message.
210 * 210 *
211 * @param recv Receive handle. 211 * @param recv
212 * @param msg The message. 212 * Receive handle.
213 * @param msg
214 * The message.
213 * 215 *
214 * @return #GNUNET_OK on success, 216 * @return #GNUNET_OK on success,
215 * #GNUNET_SYSERR on receive error. 217 * #GNUNET_SYSERR on receive error.
@@ -222,10 +224,14 @@ GNUNET_PSYC_receive_message (struct GNUNET_PSYC_ReceiveHandle *recv,
222/** 224/**
223 * Check if @a data contains a series of valid message parts. 225 * Check if @a data contains a series of valid message parts.
224 * 226 *
225 * @param data_size Size of @a data. 227 * @param data_size
226 * @param data Data. 228 * Size of @a data.
227 * @param[out] first_ptype Type of first message part. 229 * @param data
228 * @param[out] last_ptype Type of last message part. 230 * Data.
231 * @param[out] first_ptype
232 * Type of first message part.
233 * @param[out] last_ptype
234 * Type of last message part.
229 * 235 *
230 * @return Number of message parts found in @a data. 236 * @return Number of message parts found in @a data.
231 * or GNUNET_SYSERR if the message contains invalid parts. 237 * 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);
457 * reference remains valid until the #GNUNET_SOCIAL_FarewellCallback is invoked 457 * reference remains valid until the #GNUNET_SOCIAL_FarewellCallback is invoked
458 * for it. 458 * for it.
459 * 459 *
460 * @param cls Closure. 460 * @param cls
461 * @param nym Handle for the user who wants to enter. 461 * Closure.
462 * @param method_name Method name in the entry request. 462 * @param nym
463 * @param variable_count Number of elements in the @a variables array. 463 * Handle for the user who wants to enter.
464 * @param variables Variables present in the message. 464 * @param method_name
465 * @param data_size Number of bytes in @a data. 465 * Method name in the entry request.
466 * @param data Payload given on enter (e.g. a password). 466 * @param variable_count
467 * Number of elements in the @a variables array.
468 * @param variables
469 * Variables present in the message.
470 * @param data
471 * Payload given on enter (e.g. a password).
472 * @param data_size
473 * Number of bytes in @a data.
467 */ 474 */
468typedef void 475typedef void
469(*GNUNET_SOCIAL_AnswerDoorCallback) (void *cls, 476(*GNUNET_SOCIAL_AnswerDoorCallback) (void *cls,
470 struct GNUNET_SOCIAL_Nym *nym, 477 struct GNUNET_SOCIAL_Nym *nym,
471 const char *method_name, 478 const char *method_name,
472 struct GNUNET_PSYC_Environment *env, 479 struct GNUNET_PSYC_Environment *env,
473 size_t data_size, 480 const void *data,
474 const void *data); 481 size_t data_size);
475 482
476 483
477/** 484/**
@@ -589,14 +596,8 @@ GNUNET_SOCIAL_host_enter_reconnect (struct GNUNET_SOCIAL_HostConnection *hconn,
589 * #GNUNET_YES if @a nym is admitted, 596 * #GNUNET_YES if @a nym is admitted,
590 * #GNUNET_NO if @a nym is refused entry, 597 * #GNUNET_NO if @a nym is refused entry,
591 * #GNUNET_SYSERR if we cannot answer the request. 598 * #GNUNET_SYSERR if we cannot answer the request.
592 * @param method_name 599 * @param entry_resp
593 * Method name for the rejection message. 600 * Entry response message, or NULL.
594 * @param env
595 * Environment containing variables for the message, or NULL.
596 * @param data
597 * Data for the rejection message to send back.
598 * @param data_size
599 * Number of bytes in @a data for method.
600 * @return #GNUNET_OK on success, 601 * @return #GNUNET_OK on success,
601 * #GNUNET_SYSERR if the message is too large. 602 * #GNUNET_SYSERR if the message is too large.
602 */ 603 */
@@ -860,14 +861,8 @@ typedef void
860 * Number of elements in the @a relays array. 861 * Number of elements in the @a relays array.
861 * @param relays 862 * @param relays
862 * Relays for the underlying multicast group. 863 * Relays for the underlying multicast group.
863 * @param method_name 864 * @param entry_msg
864 * Method name for the message. 865 * Entry message.
865 * @param env
866 * Environment containing variables for the message, or NULL.
867 * @param data
868 * Payload for the message to give to the enter callback.
869 * @param data_size
870 * Number of bytes in @a data.
871 * @param slicer 866 * @param slicer
872 * Slicer to use for processing incoming requests from guests. 867 * Slicer to use for processing incoming requests from guests.
873 * 868 *
@@ -1190,8 +1185,6 @@ struct GNUNET_SOCIAL_LookHandle;
1190 * The place to look the object at. 1185 * The place to look the object at.
1191 * @param full_name 1186 * @param full_name
1192 * Full name of the object. 1187 * Full name of the object.
1193 * @param value_size
1194 * Set to the size of the returned value.
1195 * 1188 *
1196 * @return NULL if there is no such object at this place. 1189 * @return NULL if there is no such object at this place.
1197 */ 1190 */
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,
3375 GNUNET_CONTAINER_multihashmap_put (egos, &ego_pub_hash, ego, 3375 GNUNET_CONTAINER_multihashmap_put (egos, &ego_pub_hash, ego,
3376 GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE); 3376 GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE);
3377 } 3377 }
3378
3379 // FIXME: notify clients about changed ego
3378} 3380}
3379 3381
3380 3382
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,
848 848
849 struct GNUNET_SOCIAL_Nym *nym = nym_get_or_create (&req->slave_pub_key); 849 struct GNUNET_SOCIAL_Nym *nym = nym_get_or_create (&req->slave_pub_key);
850 hst->answer_door_cb (hst->cb_cls, nym, method_name, env, 850 hst->answer_door_cb (hst->cb_cls, nym, method_name, env,
851 data_size, data); 851 data, data_size);
852 } while (0); 852 } while (0);
853 853
854 if (NULL != env) 854 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,
156 struct GNUNET_SOCIAL_Nym *nym, 156 struct GNUNET_SOCIAL_Nym *nym,
157 const char *method_name, 157 const char *method_name,
158 struct GNUNET_PSYC_Environment *env, 158 struct GNUNET_PSYC_Environment *env,
159 size_t data_size, 159 const void *data,
160 const void *data); 160 size_t data_size);
161 161
162static void 162static void
163host_enter (); 163host_enter ();
@@ -1063,8 +1063,8 @@ host_answer_door (void *cls,
1063 struct GNUNET_SOCIAL_Nym *nym, 1063 struct GNUNET_SOCIAL_Nym *nym,
1064 const char *method_name, 1064 const char *method_name,
1065 struct GNUNET_PSYC_Environment *env, 1065 struct GNUNET_PSYC_Environment *env,
1066 size_t data_size, 1066 const void *data,
1067 const void *data) 1067 size_t data_size)
1068{ 1068{
1069 join_req_count++; 1069 join_req_count++;
1070 1070