diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_buffer_lib.h | 6 | ||||
-rw-r--r-- | src/include/gnunet_rest_plugin.h | 8 | ||||
-rw-r--r-- | src/include/gnunet_strings_lib.h | 24 |
3 files changed, 32 insertions, 6 deletions
diff --git a/src/include/gnunet_buffer_lib.h b/src/include/gnunet_buffer_lib.h index 046aee72b..0c566df75 100644 --- a/src/include/gnunet_buffer_lib.h +++ b/src/include/gnunet_buffer_lib.h | |||
@@ -116,12 +116,12 @@ GNUNET_buffer_write_str (struct GNUNET_Buffer *buf, const char *str); | |||
116 | * | 116 | * |
117 | * @param buf buffer to write to | 117 | * @param buf buffer to write to |
118 | * @param data data to read from | 118 | * @param data data to read from |
119 | * @param len number of bytes to copy from @a data to @a buf | 119 | * @param data_len number of bytes to copy from @a data to @a buf |
120 | */ | 120 | */ |
121 | void | 121 | void |
122 | GNUNET_buffer_write_data_encoded (struct GNUNET_Buffer *buf, | 122 | GNUNET_buffer_write_data_encoded (struct GNUNET_Buffer *buf, |
123 | const char *data, | 123 | const void *data, |
124 | size_t len); | 124 | size_t data_len); |
125 | 125 | ||
126 | 126 | ||
127 | /** | 127 | /** |
diff --git a/src/include/gnunet_rest_plugin.h b/src/include/gnunet_rest_plugin.h index 770ba66f2..96454f66b 100644 --- a/src/include/gnunet_rest_plugin.h +++ b/src/include/gnunet_rest_plugin.h | |||
@@ -69,10 +69,12 @@ struct GNUNET_REST_Plugin | |||
69 | * @param data_size the length of the data | 69 | * @param data_size the length of the data |
70 | * @param proc the callback for result | 70 | * @param proc the callback for result |
71 | * @param proc_cls closure for callback | 71 | * @param proc_cls closure for callback |
72 | * @return GNUNET_YES if the request was processed | ||
72 | */ | 73 | */ |
73 | void (*process_request) (struct GNUNET_REST_RequestHandle *handle, | 74 | enum GNUNET_GenericReturnValue (*process_request)( |
74 | GNUNET_REST_ResultProcessor proc, | 75 | struct GNUNET_REST_RequestHandle *handle, |
75 | void *proc_cls); | 76 | GNUNET_REST_ResultProcessor proc, |
77 | void *proc_cls); | ||
76 | }; | 78 | }; |
77 | 79 | ||
78 | 80 | ||
diff --git a/src/include/gnunet_strings_lib.h b/src/include/gnunet_strings_lib.h index 663b44194..8d829d42e 100644 --- a/src/include/gnunet_strings_lib.h +++ b/src/include/gnunet_strings_lib.h | |||
@@ -350,6 +350,18 @@ GNUNET_STRINGS_base64_encode (const void *in, | |||
350 | 350 | ||
351 | 351 | ||
352 | /** | 352 | /** |
353 | * url/percent encode (RFC3986). | ||
354 | * | ||
355 | * @param data the data to decode | ||
356 | * @param len the length of the input | ||
357 | * @param output where to write the output (*output should be NULL, | ||
358 | * is allocated) | ||
359 | * @return the size of the output | ||
360 | */ | ||
361 | size_t | ||
362 | GNUNET_STRINGS_urlencode (const char *data, size_t len, char **out); | ||
363 | |||
364 | /** | ||
353 | * Encode into Base64url. RFC7515 | 365 | * Encode into Base64url. RFC7515 |
354 | * | 366 | * |
355 | * @param in the data to encode | 367 | * @param in the data to encode |
@@ -389,6 +401,18 @@ GNUNET_STRINGS_base64_decode (const char *data, | |||
389 | size_t | 401 | size_t |
390 | GNUNET_STRINGS_base64url_decode (const char *data, size_t len, void **out); | 402 | GNUNET_STRINGS_base64url_decode (const char *data, size_t len, void **out); |
391 | 403 | ||
404 | /** | ||
405 | * url/percent encode (RFC3986). | ||
406 | * | ||
407 | * @param data the data to encode | ||
408 | * @param len the length of the input | ||
409 | * @param output where to write the output (*output should be NULL, | ||
410 | * is allocated) | ||
411 | * @return the size of the output | ||
412 | */ | ||
413 | size_t | ||
414 | GNUNET_STRINGS_urldecode (const char *data, size_t len, char **out); | ||
415 | |||
392 | 416 | ||
393 | /** | 417 | /** |
394 | * Convert a peer path to a human-readable string. | 418 | * Convert a peer path to a human-readable string. |