diff options
author | Gabor X Toth <*@tg-x.net> | 2013-08-12 21:04:24 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2013-08-12 21:04:24 +0000 |
commit | a94ef1396711df72377dea56bd07f01c9de35eb1 (patch) | |
tree | e5f6e6c26e34233ee91ba2a5be20c30727a9487d | |
parent | 0e2f8eb4285e086281700b53893b1905a52ebc2e (diff) | |
download | gnunet-a94ef1396711df72377dea56bd07f01c9de35eb1.tar.gz gnunet-a94ef1396711df72377dea56bd07f01c9de35eb1.zip |
psyc/social: slave transmit & guest talk flags
-rw-r--r-- | src/include/gnunet_psyc_service.h | 9 | ||||
-rw-r--r-- | src/include/gnunet_social_service.h | 34 |
2 files changed, 29 insertions, 14 deletions
diff --git a/src/include/gnunet_psyc_service.h b/src/include/gnunet_psyc_service.h index ceb8290c2..5f48f7f34 100644 --- a/src/include/gnunet_psyc_service.h +++ b/src/include/gnunet_psyc_service.h | |||
@@ -437,6 +437,11 @@ typedef int | |||
437 | char *data); | 437 | char *data); |
438 | 438 | ||
439 | 439 | ||
440 | /** | ||
441 | * Flags for transmitting messages to the channel master by a slave. | ||
442 | */ | ||
443 | enum GNUNET_PSYC_SlaveTransmitFlags; | ||
444 | |||
440 | /** | 445 | /** |
441 | * Handle for a pending PSYC transmission operation. | 446 | * Handle for a pending PSYC transmission operation. |
442 | */ | 447 | */ |
@@ -451,6 +456,7 @@ struct GNUNET_PSYC_SlaveTransmitHandle; | |||
451 | * @param env Environment containing transient variables for the message, or NULL. | 456 | * @param env Environment containing transient variables for the message, or NULL. |
452 | * @param notify Function to call when we are allowed to transmit (to get data). | 457 | * @param notify Function to call when we are allowed to transmit (to get data). |
453 | * @param notify_cls Closure for @a notify. | 458 | * @param notify_cls Closure for @a notify. |
459 | * @param flags Flags for the message being transmitted. | ||
454 | * @return Transmission handle, NULL on error (i.e. more than one request queued). | 460 | * @return Transmission handle, NULL on error (i.e. more than one request queued). |
455 | */ | 461 | */ |
456 | struct GNUNET_PSYC_SlaveTransmitHandle * | 462 | struct GNUNET_PSYC_SlaveTransmitHandle * |
@@ -458,7 +464,8 @@ GNUNET_PSYC_slave_transmit (struct GNUNET_PSYC_Slave *slave, | |||
458 | const char *method_name, | 464 | const char *method_name, |
459 | const struct GNUNET_ENV_Environment *env, | 465 | const struct GNUNET_ENV_Environment *env, |
460 | GNUNET_PSYC_SlaveReadyNotify notify, | 466 | GNUNET_PSYC_SlaveReadyNotify notify, |
461 | void *notify_cls); | 467 | void *notify_cls, |
468 | enum GNUNET_PSYC_SlaveTransmitFlags flags); | ||
462 | 469 | ||
463 | 470 | ||
464 | /** | 471 | /** |
diff --git a/src/include/gnunet_social_service.h b/src/include/gnunet_social_service.h index 8a7e1362d..4ac1965d6 100644 --- a/src/include/gnunet_social_service.h +++ b/src/include/gnunet_social_service.h | |||
@@ -84,8 +84,8 @@ struct GNUNET_SOCIAL_Slicer; | |||
84 | * @param message_id Unique message counter for this message | 84 | * @param message_id Unique message counter for this message |
85 | * (unique only in combination with the given sender for | 85 | * (unique only in combination with the given sender for |
86 | * this channel). | 86 | * this channel). |
87 | * @param header_length Number of modifiers in header. | 87 | * @param modifier_count Number of elements in the @a modifiers array. |
88 | * @param header Modifiers present in the message. FIXME: use environment instead? | 88 | * @param modifiers Modifiers present in the message. FIXME: use environment instead? |
89 | * @param data_offset Byte offset of @a data in the overall data of the method. | 89 | * @param data_offset Byte offset of @a data in the overall data of the method. |
90 | * @param data_size Number of bytes in @a data. | 90 | * @param data_size Number of bytes in @a data. |
91 | * @param data Data stream given to the method (might not be zero-terminated | 91 | * @param data Data stream given to the method (might not be zero-terminated |
@@ -95,8 +95,8 @@ struct GNUNET_SOCIAL_Slicer; | |||
95 | typedef int (*GNUNET_SOCIAL_Method)(void *cls, | 95 | typedef int (*GNUNET_SOCIAL_Method)(void *cls, |
96 | const char *full_method_name, | 96 | const char *full_method_name, |
97 | uint64_t message_id, | 97 | uint64_t message_id, |
98 | size_t header_length, | 98 | size_t modifier_count, |
99 | GNUNET_PSYC_Modifier *header, | 99 | GNUNET_PSYC_Modifier *modifiers, |
100 | uint64_t data_offset, | 100 | uint64_t data_offset, |
101 | size_t data_size, | 101 | size_t data_size, |
102 | const void *data, | 102 | const void *data, |
@@ -187,15 +187,15 @@ GNUNET_SOCIAL_ego_destroy (struct GNUNET_SOCIAL_Ego *ego); | |||
187 | * | 187 | * |
188 | * @param cls Closure. | 188 | * @param cls Closure. |
189 | * @param nym Handle for the user who wants to enter. | 189 | * @param nym Handle for the user who wants to enter. |
190 | * @param header_length Number of modifiers in header. | 190 | * @param variable_count Number of elements in the @a variables array. |
191 | * @param header Modifiers present in the message. | 191 | * @param variables Variables present in the message. |
192 | * @param data_size Number of bytes in @a data. | 192 | * @param data_size Number of bytes in @a data. |
193 | * @param data Payload given on enter (e.g. a password). | 193 | * @param data Payload given on enter (e.g. a password). |
194 | */ | 194 | */ |
195 | typedef void (*GNUNET_SOCIAL_AnswerDoorCallback)(void *cls, | 195 | typedef void (*GNUNET_SOCIAL_AnswerDoorCallback)(void *cls, |
196 | struct GNUNET_SOCIAL_Nym *nym, | 196 | struct GNUNET_SOCIAL_Nym *nym, |
197 | size_t header_length, | 197 | size_t variable_count, |
198 | GNUNET_PSYC_Modifier *header, | 198 | GNUNET_PSYC_Modifier *variables, |
199 | size_t data_size, | 199 | size_t data_size, |
200 | const void *data); | 200 | const void *data); |
201 | 201 | ||
@@ -208,13 +208,13 @@ typedef void (*GNUNET_SOCIAL_AnswerDoorCallback)(void *cls, | |||
208 | * | 208 | * |
209 | * @param cls Closure. | 209 | * @param cls Closure. |
210 | * @param nym Handle for the user who left. | 210 | * @param nym Handle for the user who left. |
211 | * @param header_length Number of modifiers in header. | 211 | * @param variable_count Number of elements in the @a variables array. |
212 | * @param header Modifiers present in the message. | 212 | * @param variables Variables present in the message. |
213 | */ | 213 | */ |
214 | typedef void (*GNUNET_SOCIAL_FarewellCallback)(void *cls, | 214 | typedef void (*GNUNET_SOCIAL_FarewellCallback)(void *cls, |
215 | struct GNUNET_SOCIAL_Nym *nym, | 215 | struct GNUNET_SOCIAL_Nym *nym, |
216 | size_t header_length, | 216 | size_t variable_count, |
217 | GNUNET_PSYC_Modifier *header); | 217 | GNUNET_PSYC_Modifier *variables); |
218 | 218 | ||
219 | 219 | ||
220 | /** | 220 | /** |
@@ -554,6 +554,12 @@ GNUNET_SOCIAL_place_look_at (struct GNUNET_SOCIAL_Place *place, | |||
554 | size_t *value_size); | 554 | size_t *value_size); |
555 | 555 | ||
556 | 556 | ||
557 | /** | ||
558 | * Flags for talking to the host of a place. | ||
559 | */ | ||
560 | enum GNUNET_SOCIAL_TalkFlags; | ||
561 | |||
562 | |||
557 | /** | 563 | /** |
558 | * A talk request. | 564 | * A talk request. |
559 | */ | 565 | */ |
@@ -567,6 +573,7 @@ struct GNUNET_SOCIAL_TalkRequest; | |||
567 | * @param env Environment containing variables for the message, or NULL. | 573 | * @param env Environment containing variables for the message, or NULL. |
568 | * @param notify Function to use to get the payload for the method. | 574 | * @param notify Function to use to get the payload for the method. |
569 | * @param notify_cls Closure for @a notify. | 575 | * @param notify_cls Closure for @a notify. |
576 | * @param flags Flags for the message being sent. | ||
570 | * @return NULL if we are already trying to talk to the host, | 577 | * @return NULL if we are already trying to talk to the host, |
571 | * otherwise handle to cancel the request. | 578 | * otherwise handle to cancel the request. |
572 | */ | 579 | */ |
@@ -575,7 +582,8 @@ GNUNET_SOCIAL_place_talk (struct GNUNET_SOCIAL_Place *place, | |||
575 | const char *method_name, | 582 | const char *method_name, |
576 | const struct GNUNET_ENV_Environment *env, | 583 | const struct GNUNET_ENV_Environment *env, |
577 | GNUNET_CONNECTION_TransmitReadyNotify notify, | 584 | GNUNET_CONNECTION_TransmitReadyNotify notify, |
578 | void *notify_cls); | 585 | void *notify_cls, |
586 | GNUNET_SOCIAL_TalkFlags flags); | ||
579 | 587 | ||
580 | 588 | ||
581 | /** | 589 | /** |