diff options
author | Gabor X Toth <*@tg-x.net> | 2013-09-03 22:33:21 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2013-09-03 22:33:21 +0000 |
commit | eb9556bf2983ca19a5cbcf7cf460a0b2509b290a (patch) | |
tree | 285d31e951f7ecf9308b22257adcadd5b07d80ea /src/include/gnunet_social_service.h | |
parent | 37bafa60a6f0e447cb5b61547404f0902fa7ad41 (diff) | |
download | gnunet-eb9556bf2983ca19a5cbcf7cf460a0b2509b290a.tar.gz gnunet-eb9556bf2983ca19a5cbcf7cf460a0b2509b290a.zip |
PSYCstore SQLite backend; API fixes/enhancements
Diffstat (limited to 'src/include/gnunet_social_service.h')
-rw-r--r-- | src/include/gnunet_social_service.h | 63 |
1 files changed, 33 insertions, 30 deletions
diff --git a/src/include/gnunet_social_service.h b/src/include/gnunet_social_service.h index abb749b9b..62a221de2 100644 --- a/src/include/gnunet_social_service.h +++ b/src/include/gnunet_social_service.h | |||
@@ -83,21 +83,22 @@ struct GNUNET_SOCIAL_Slicer; | |||
83 | * @param modifier_count Number of elements in the @a modifiers array. | 83 | * @param modifier_count Number of elements in the @a modifiers array. |
84 | * @param modifiers Modifiers present in the message. FIXME: use environment instead? | 84 | * @param modifiers Modifiers present in the message. FIXME: use environment instead? |
85 | * @param data_offset Byte offset of @a data in the overall data of the method. | 85 | * @param data_offset Byte offset of @a data in the overall data of the method. |
86 | * @param data_size Number of bytes in @a data. | ||
87 | * @param data Data stream given to the method (might not be zero-terminated | 86 | * @param data Data stream given to the method (might not be zero-terminated |
88 | * if data is binary). | 87 | * if data is binary). |
88 | * @param data_size Number of bytes in @a data. | ||
89 | * @param flags Message flags indicating fragmentation status. | 89 | * @param flags Message flags indicating fragmentation status. |
90 | */ | 90 | */ |
91 | typedef int (*GNUNET_SOCIAL_Method)(void *cls, | 91 | typedef int |
92 | struct GNUNET_SOCIAL_Nym *nym, | 92 | (*GNUNET_SOCIAL_Method) (void *cls, |
93 | const char *full_method_name, | 93 | struct GNUNET_SOCIAL_Nym *nym, |
94 | uint64_t message_id, | 94 | const char *full_method_name, |
95 | size_t modifier_count, | 95 | uint64_t message_id, |
96 | GNUNET_PSYC_Modifier *modifiers, | 96 | size_t modifier_count, |
97 | uint64_t data_offset, | 97 | GNUNET_PSYC_Modifier *modifiers, |
98 | size_t data_size, | 98 | uint64_t data_offset, |
99 | const void *data, | 99 | const void *data, |
100 | enum GNUNET_PSYC_MessageFlags flags); | 100 | size_t data_size, |
101 | enum GNUNET_PSYC_MessageFlags flags); | ||
101 | 102 | ||
102 | 103 | ||
103 | /** | 104 | /** |
@@ -164,16 +165,17 @@ GNUNET_SOCIAL_slicer_destroy (struct GNUNET_SOCIAL_Slicer *slicer); | |||
164 | * @param method_name Method name in the entry request. | 165 | * @param method_name Method name in the entry request. |
165 | * @param variable_count Number of elements in the @a variables array. | 166 | * @param variable_count Number of elements in the @a variables array. |
166 | * @param variables Variables present in the message. | 167 | * @param variables Variables present in the message. |
167 | * @param data_size Number of bytes in @a data. | ||
168 | * @param data Payload given on enter (e.g. a password). | 168 | * @param data Payload given on enter (e.g. a password). |
169 | * @param data_size Number of bytes in @a data. | ||
169 | */ | 170 | */ |
170 | typedef void (*GNUNET_SOCIAL_AnswerDoorCallback)(void *cls, | 171 | typedef void |
171 | struct GNUNET_SOCIAL_Nym *nym, | 172 | (*GNUNET_SOCIAL_AnswerDoorCallback) (void *cls, |
172 | size_t variable_count, | 173 | struct GNUNET_SOCIAL_Nym *nym, |
173 | const char *method_name, | 174 | size_t variable_count, |
174 | GNUNET_PSYC_Modifier *variables, | 175 | const char *method_name, |
175 | size_t data_size, | 176 | GNUNET_PSYC_Modifier *variables, |
176 | const void *data); | 177 | const void *data, |
178 | size_t data_size); | ||
177 | 179 | ||
178 | 180 | ||
179 | /** | 181 | /** |
@@ -187,10 +189,11 @@ typedef void (*GNUNET_SOCIAL_AnswerDoorCallback)(void *cls, | |||
187 | * @param variable_count Number of elements in the @a variables array. | 189 | * @param variable_count Number of elements in the @a variables array. |
188 | * @param variables Variables present in the message. | 190 | * @param variables Variables present in the message. |
189 | */ | 191 | */ |
190 | typedef void (*GNUNET_SOCIAL_FarewellCallback)(void *cls, | 192 | typedef void |
191 | struct GNUNET_SOCIAL_Nym *nym, | 193 | (*GNUNET_SOCIAL_FarewellCallback) (void *cls, |
192 | size_t variable_count, | 194 | struct GNUNET_SOCIAL_Nym *nym, |
193 | GNUNET_PSYC_Modifier *variables); | 195 | size_t variable_count, |
196 | GNUNET_PSYC_Modifier *variables); | ||
194 | 197 | ||
195 | 198 | ||
196 | /** | 199 | /** |
@@ -258,16 +261,16 @@ GNUNET_SOCIAL_home_eject (struct GNUNET_SOCIAL_Home *home, | |||
258 | * @param nym Handle for the entity that wanted to enter. | 261 | * @param nym Handle for the entity that wanted to enter. |
259 | * @param method_name Method name for the rejection message. | 262 | * @param method_name Method name for the rejection message. |
260 | * @param env Environment containing variables for the message, or NULL. | 263 | * @param env Environment containing variables for the message, or NULL. |
261 | * @param data_size Number of bytes in @a data for method. | ||
262 | * @param data Data for the rejection message to send back. | 264 | * @param data Data for the rejection message to send back. |
265 | * @param data_size Number of bytes in @a data for method. | ||
263 | */ | 266 | */ |
264 | void | 267 | void |
265 | GNUNET_SOCIAL_home_reject_entry (struct GNUNET_SOCIAL_Home *home, | 268 | GNUNET_SOCIAL_home_reject_entry (struct GNUNET_SOCIAL_Home *home, |
266 | struct GNUNET_SOCIAL_Nym *nym, | 269 | struct GNUNET_SOCIAL_Nym *nym, |
267 | const char *method_name, | 270 | const char *method_name, |
268 | const struct GNUNET_ENV_Environment *env, | 271 | const struct GNUNET_ENV_Environment *env, |
269 | size_t data_size, | 272 | const void *data, |
270 | const void *data); | 273 | size_t data_size); |
271 | 274 | ||
272 | 275 | ||
273 | /** | 276 | /** |
@@ -403,8 +406,8 @@ GNUNET_SOCIAL_home_leave (struct GNUNET_SOCIAL_Home *home); | |||
403 | * pseudonym's place directly. | 406 | * pseudonym's place directly. |
404 | * @param method_name Method name for the message. | 407 | * @param method_name Method name for the message. |
405 | * @param env Environment containing variables for the message, or NULL. | 408 | * @param env Environment containing variables for the message, or NULL. |
406 | * @param data_size Number of bytes in @a data. | ||
407 | * @param data Payload for the message to give to the enter callback. | 409 | * @param data Payload for the message to give to the enter callback. |
410 | * @param data_size Number of bytes in @a data. | ||
408 | * @param slicer Slicer to use for processing incoming requests from guests. | 411 | * @param slicer Slicer to use for processing incoming requests from guests. |
409 | * @return NULL on errors, otherwise handle to the place. | 412 | * @return NULL on errors, otherwise handle to the place. |
410 | */ | 413 | */ |
@@ -414,8 +417,8 @@ GNUNET_SOCIAL_place_enter (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
414 | char *address, | 417 | char *address, |
415 | const char *method_name, | 418 | const char *method_name, |
416 | const struct GNUNET_ENV_Environment *env, | 419 | const struct GNUNET_ENV_Environment *env, |
417 | size_t data_size, | ||
418 | const void *data, | 420 | const void *data, |
421 | size_t data_size, | ||
419 | struct GNUNET_SOCIAL_Slicer *slicer); | 422 | struct GNUNET_SOCIAL_Slicer *slicer); |
420 | 423 | ||
421 | /** | 424 | /** |
@@ -429,8 +432,8 @@ GNUNET_SOCIAL_place_enter (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
429 | * @param relays Relays for the underlying multicast group. | 432 | * @param relays Relays for the underlying multicast group. |
430 | * @param method_name Method name for the message. | 433 | * @param method_name Method name for the message. |
431 | * @param env Environment containing variables for the message, or NULL. | 434 | * @param env Environment containing variables for the message, or NULL. |
432 | * @param data_size Number of bytes in @a data. | ||
433 | * @param data Payload for the message to give to the enter callback. | 435 | * @param data Payload for the message to give to the enter callback. |
436 | * @param data_size Number of bytes in @a data. | ||
434 | * @param slicer Slicer to use for processing incoming requests from guests. | 437 | * @param slicer Slicer to use for processing incoming requests from guests. |
435 | * @return NULL on errors, otherwise handle to the place. | 438 | * @return NULL on errors, otherwise handle to the place. |
436 | */ | 439 | */ |
@@ -443,8 +446,8 @@ GNUNET_SOCIAL_place_enter2 (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
443 | struct GNUNET_PeerIdentity *relays, | 446 | struct GNUNET_PeerIdentity *relays, |
444 | const char *method_name, | 447 | const char *method_name, |
445 | const struct GNUNET_ENV_Environment *env, | 448 | const struct GNUNET_ENV_Environment *env, |
446 | size_t data_size, | ||
447 | const void *data, | 449 | const void *data, |
450 | size_t data_size, | ||
448 | struct GNUNET_SOCIAL_Slicer *slicer); | 451 | struct GNUNET_SOCIAL_Slicer *slicer); |
449 | 452 | ||
450 | 453 | ||