aboutsummaryrefslogtreecommitdiff
path: root/src/credential/plugin_rest_credential.c
diff options
context:
space:
mode:
authorSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2018-01-04 15:28:02 +0100
committerSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2018-01-04 15:29:45 +0100
commit78705d5a49d7066a01b832546d2507456a3c5d2c (patch)
treeb0e5f72bdde4574f20c0b89ee56295f83b954800 /src/credential/plugin_rest_credential.c
parent272921672ec094644a1ddbbfacb96581e72ed443 (diff)
downloadgnunet-78705d5a49d7066a01b832546d2507456a3c5d2c.tar.gz
gnunet-78705d5a49d7066a01b832546d2507456a3c5d2c.zip
-cleanup doc; fixes
Diffstat (limited to 'src/credential/plugin_rest_credential.c')
-rw-r--r--src/credential/plugin_rest_credential.c43
1 files changed, 5 insertions, 38 deletions
diff --git a/src/credential/plugin_rest_credential.c b/src/credential/plugin_rest_credential.c
index 48d48fba0..480658822 100644
--- a/src/credential/plugin_rest_credential.c
+++ b/src/credential/plugin_rest_credential.c
@@ -19,7 +19,7 @@
19 */ 19 */
20/** 20/**
21 * @author Martin Schanzenbach 21 * @author Martin Schanzenbach
22 * @file gns/plugin_rest_credential.c 22 * @file credential/plugin_rest_credential.c
23 * @brief GNUnet CREDENTIAL REST plugin 23 * @brief GNUnet CREDENTIAL REST plugin
24 * 24 *
25 */ 25 */
@@ -194,12 +194,6 @@ cleanup_handle (struct RequestHandle *handle)
194} 194}
195 195
196 196
197/**
198 * Task run on shutdown. Cleans up everything.
199 *
200 * @param cls unused
201 * @param tc scheduler context
202 */
203static void 197static void
204do_error (void *cls) 198do_error (void *cls)
205{ 199{
@@ -213,7 +207,8 @@ do_error (void *cls)
213 207
214/** 208/**
215 * Attribute delegation to JSON 209 * Attribute delegation to JSON
216 * @param attr the attribute 210 *
211 * @param delegation_chain_entry the DSE
217 * @return JSON, NULL if failed 212 * @return JSON, NULL if failed
218 */ 213 */
219static json_t* 214static json_t*
@@ -257,6 +252,7 @@ attribute_delegation_to_json (struct GNUNET_CREDENTIAL_Delegation *delegation_ch
257 252
258/** 253/**
259 * JSONAPI resource to Credential 254 * JSONAPI resource to Credential
255 *
260 * @param res the JSONAPI resource 256 * @param res the JSONAPI resource
261 * @return the resulting credential, NULL if failed 257 * @return the resulting credential, NULL if failed
262 */ 258 */
@@ -327,6 +323,7 @@ json_to_credential (json_t *res)
327 323
328/** 324/**
329 * Credential to JSON 325 * Credential to JSON
326 *
330 * @param cred the credential 327 * @param cred the credential
331 * @return the resulting json, NULL if failed 328 * @return the resulting json, NULL if failed
332 */ 329 */
@@ -373,13 +370,6 @@ credential_to_json (struct GNUNET_CREDENTIAL_Credential *cred)
373 return cred_obj; 370 return cred_obj;
374} 371}
375 372
376/**
377 * Function called with the result of a Credential lookup.
378 *
379 * @param cls the 'const char *' name that was resolved
380 * @param cd_count number of records returned
381 * @param cd array of @a cd_count records with the results
382 */
383static void 373static void
384handle_collect_response (void *cls, 374handle_collect_response (void *cls,
385 unsigned int d_count, 375 unsigned int d_count,
@@ -470,13 +460,6 @@ subject_ego_lookup (void *cls,
470 460
471 461
472 462
473/**
474 * Function called with the result of a Credential lookup.
475 *
476 * @param cls the 'const char *' name that was resolved
477 * @param cd_count number of records returned
478 * @param cd array of @a cd_count records with the results
479 */
480static void 463static void
481handle_verify_response (void *cls, 464handle_verify_response (void *cls,
482 unsigned int d_count, 465 unsigned int d_count,
@@ -1062,11 +1045,6 @@ issue_cred_cont (struct GNUNET_REST_RequestHandle *conndata_handle,
1062 handle); 1045 handle);
1063} 1046}
1064 1047
1065/**
1066 * Handle rest request
1067 *
1068 * @param handle the lookup handle
1069 */
1070static void 1048static void
1071options_cont (struct GNUNET_REST_RequestHandle *con_handle, 1049options_cont (struct GNUNET_REST_RequestHandle *con_handle,
1072 const char* url, 1050 const char* url,
@@ -1087,17 +1065,6 @@ options_cont (struct GNUNET_REST_RequestHandle *con_handle,
1087} 1065}
1088 1066
1089 1067
1090/**
1091 * Function processing the REST call
1092 *
1093 * @param method HTTP method
1094 * @param url URL of the HTTP request
1095 * @param data body of the HTTP request (optional)
1096 * @param data_size length of the body
1097 * @param proc callback function for the result
1098 * @param proc_cls closure for callback function
1099 * @return GNUNET_OK if request accepted
1100 */
1101static void 1068static void
1102rest_credential_process_request(struct GNUNET_REST_RequestHandle *conndata_handle, 1069rest_credential_process_request(struct GNUNET_REST_RequestHandle *conndata_handle,
1103 GNUNET_REST_ResultProcessor proc, 1070 GNUNET_REST_ResultProcessor proc,