aboutsummaryrefslogtreecommitdiff
path: root/src/service/rest/copying_plugin.h
blob: 4ba1a2e36f00e36c37eb9667268a654c89330d51 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "gnunet_rest_plugin.h"
/**
 * Function processing the REST call
 *
 * @param method HTTP method
 * @param url URL of the HTTP request
 * @param data body of the HTTP request (optional)
 * @param data_size length of the body
 * @param proc callback function for the result
 * @param proc_cls closure for @a proc
 * @return #GNUNET_OK if request accepted
 */
enum GNUNET_GenericReturnValue
REST_copying_process_request (void *plugin,
                              struct GNUNET_REST_RequestHandle *conndata_handle,
                              GNUNET_REST_ResultProcessor proc,
                              void *proc_cls);

/**
 * Entry point for the plugin.
 *
 * @param cls the "struct GNUNET_NAMESTORE_PluginEnvironment*"
 * @return NULL on error, otherwise the plugin context
 */
void*
REST_copying_init (const struct GNUNET_CONFIGURATION_Handle *c);


/**
 * Exit point from the plugin.
 *
 * @param cls the plugin context (as returned by "init")
 * @return always NULL
 */
void
REST_copying_done (struct GNUNET_REST_Plugin *api);