diff options
author | ng0 <ng0@n0.is> | 2019-09-08 12:33:09 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-09-08 12:33:09 +0000 |
commit | d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb (patch) | |
tree | 9efd18ea7d425652085ed0bd5e8e45604bc5f6b9 /src/include/gnunet_rest_lib.h | |
parent | a0fce305c565c0937d917a92712f15e9c5736260 (diff) | |
download | gnunet-d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb.tar.gz gnunet-d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb.zip |
uncrustify as demanded.
Diffstat (limited to 'src/include/gnunet_rest_lib.h')
-rw-r--r-- | src/include/gnunet_rest_lib.h | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/src/include/gnunet_rest_lib.h b/src/include/gnunet_rest_lib.h index 83741ab95..e70759590 100644 --- a/src/include/gnunet_rest_lib.h +++ b/src/include/gnunet_rest_lib.h | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -34,10 +34,9 @@ | |||
34 | #include "gnunet_util_lib.h" | 34 | #include "gnunet_util_lib.h" |
35 | #include <microhttpd.h> | 35 | #include <microhttpd.h> |
36 | 36 | ||
37 | #define GNUNET_REST_HANDLER_END {NULL, NULL, NULL} | 37 | #define GNUNET_REST_HANDLER_END { NULL, NULL, NULL } |
38 | 38 | ||
39 | struct GNUNET_REST_RequestHandle | 39 | struct GNUNET_REST_RequestHandle { |
40 | { | ||
41 | /** | 40 | /** |
42 | * Map of url parameters | 41 | * Map of url parameters |
43 | */ | 42 | */ |
@@ -69,14 +68,12 @@ struct GNUNET_REST_RequestHandle | |||
69 | size_t data_size; | 68 | size_t data_size; |
70 | }; | 69 | }; |
71 | 70 | ||
72 | struct GNUNET_REST_RequestHandlerError | 71 | struct GNUNET_REST_RequestHandlerError { |
73 | { | ||
74 | int error_code; | 72 | int error_code; |
75 | char* error_text; | 73 | char* error_text; |
76 | }; | 74 | }; |
77 | 75 | ||
78 | struct GNUNET_REST_RequestHandler | 76 | struct GNUNET_REST_RequestHandler { |
79 | { | ||
80 | /** | 77 | /** |
81 | * Http method to handle | 78 | * Http method to handle |
82 | */ | 79 | */ |
@@ -93,7 +90,6 @@ struct GNUNET_REST_RequestHandler | |||
93 | void (*proc) (struct GNUNET_REST_RequestHandle *handle, | 90 | void (*proc) (struct GNUNET_REST_RequestHandle *handle, |
94 | const char *url, | 91 | const char *url, |
95 | void *cls); | 92 | void *cls); |
96 | |||
97 | }; | 93 | }; |
98 | 94 | ||
99 | 95 | ||
@@ -116,7 +112,7 @@ typedef void (*GNUNET_REST_ResultProcessor) (void *cls, | |||
116 | * @return GNUNET_YES if namespace matches | 112 | * @return GNUNET_YES if namespace matches |
117 | */ | 113 | */ |
118 | int | 114 | int |
119 | GNUNET_REST_namespace_match (const char *url, const char *namespace); | 115 | GNUNET_REST_namespace_match(const char *url, const char *namespace); |
120 | 116 | ||
121 | /** | 117 | /** |
122 | * Create REST MHD response | 118 | * Create REST MHD response |
@@ -124,15 +120,15 @@ GNUNET_REST_namespace_match (const char *url, const char *namespace); | |||
124 | * @param data result | 120 | * @param data result |
125 | * @return MHD response | 121 | * @return MHD response |
126 | */ | 122 | */ |
127 | struct MHD_Response* | 123 | struct MHD_Response* |
128 | GNUNET_REST_create_response (const char *data); | 124 | GNUNET_REST_create_response(const char *data); |
129 | 125 | ||
130 | 126 | ||
131 | int | 127 | int |
132 | GNUNET_REST_handle_request (struct GNUNET_REST_RequestHandle *conn, | 128 | GNUNET_REST_handle_request(struct GNUNET_REST_RequestHandle *conn, |
133 | const struct GNUNET_REST_RequestHandler *handlers, | 129 | const struct GNUNET_REST_RequestHandler *handlers, |
134 | struct GNUNET_REST_RequestHandlerError *err, | 130 | struct GNUNET_REST_RequestHandlerError *err, |
135 | void *cls); | 131 | void *cls); |
136 | 132 | ||
137 | 133 | ||
138 | #endif | 134 | #endif |