diff options
Diffstat (limited to 'src/include/gnunet_rest_plugin.h')
-rw-r--r-- | src/include/gnunet_rest_plugin.h | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/include/gnunet_rest_plugin.h b/src/include/gnunet_rest_plugin.h index 96454f66b..3a8af5389 100644 --- a/src/include/gnunet_rest_plugin.h +++ b/src/include/gnunet_rest_plugin.h | |||
@@ -18,6 +18,9 @@ | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | 18 | SPDX-License-Identifier: AGPL3.0-or-later |
19 | */ | 19 | */ |
20 | /** | 20 | /** |
21 | * @addtogroup rest_l2 REST service and libraries | ||
22 | * @{ | ||
23 | * | ||
21 | * @author Martin Schanzenbach | 24 | * @author Martin Schanzenbach |
22 | * | 25 | * |
23 | * @file | 26 | * @file |
@@ -29,6 +32,7 @@ | |||
29 | #ifndef GNUNET_REST_PLUGIN_H | 32 | #ifndef GNUNET_REST_PLUGIN_H |
30 | #define GNUNET_REST_PLUGIN_H | 33 | #define GNUNET_REST_PLUGIN_H |
31 | 34 | ||
35 | |||
32 | #include "gnunet_util_lib.h" | 36 | #include "gnunet_util_lib.h" |
33 | #include "gnunet_rest_lib.h" | 37 | #include "gnunet_rest_lib.h" |
34 | #include "microhttpd.h" | 38 | #include "microhttpd.h" |
@@ -59,24 +63,13 @@ struct GNUNET_REST_Plugin | |||
59 | * e.g. http://hostname:port/name | 63 | * e.g. http://hostname:port/name |
60 | */ | 64 | */ |
61 | char *name; | 65 | char *name; |
62 | |||
63 | /** | ||
64 | * Function to process a REST call | ||
65 | * | ||
66 | * @param method the HTTP method called | ||
67 | * @param url the relative url accessed | ||
68 | * @param data the REST data (can be NULL) | ||
69 | * @param data_size the length of the data | ||
70 | * @param proc the callback for result | ||
71 | * @param proc_cls closure for callback | ||
72 | * @return GNUNET_YES if the request was processed | ||
73 | */ | ||
74 | enum GNUNET_GenericReturnValue (*process_request)( | ||
75 | struct GNUNET_REST_RequestHandle *handle, | ||
76 | GNUNET_REST_ResultProcessor proc, | ||
77 | void *proc_cls); | ||
78 | }; | 66 | }; |
79 | 67 | ||
68 | typedef enum GNUNET_GenericReturnValue (*GNUNET_REST_ProcessingFunction)( | ||
69 | void *plugin, | ||
70 | struct GNUNET_REST_RequestHandle *handle, | ||
71 | GNUNET_REST_ResultProcessor proc, | ||
72 | void *proc_cls); | ||
80 | 73 | ||
81 | #if 0 /* keep Emacsens' auto-indent happy */ | 74 | #if 0 /* keep Emacsens' auto-indent happy */ |
82 | { | 75 | { |
@@ -88,3 +81,5 @@ struct GNUNET_REST_Plugin | |||
88 | #endif | 81 | #endif |
89 | 82 | ||
90 | /** @} */ /* end of group */ | 83 | /** @} */ /* end of group */ |
84 | |||
85 | /** @} */ /* end of group addition */ | ||