32#define GNUNET_REST_API_NS_COPYING "/copying"
34#define GNUNET_REST_COPYING_TEXT \
35 "GNU Affero General Public License version 3 or later. See also: <http://www.gnu.org/licenses/>"
115 struct MHD_Response *resp;
136 struct MHD_Response *resp;
141 "Access-Control-Allow-Methods",
142 MHD_HTTP_METHOD_GET));
175 handle->proc_cls = proc_cls;
177 handle->rest_handle = conndata_handle;
209 _ (
"COPYING REST API initialized\n"));
230 "COPYING REST plugin is finished\n");
struct GNUNET_MQ_MessageHandlers handlers[]
#define GNUNET_REST_COPYING_TEXT
static struct RequestHandle * requests_head
DLL.
static void options_cont(struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls)
Handle rest request.
enum GNUNET_GenericReturnValue REST_copying_process_request(void *plugin, struct GNUNET_REST_RequestHandle *conndata_handle, GNUNET_REST_ResultProcessor proc, void *proc_cls)
Function processing the REST call.
static void cleanup_handle(struct RequestHandle *handle)
Cleanup request handle.
void REST_copying_done(struct GNUNET_REST_Plugin *api)
Exit point from the plugin.
#define GNUNET_REST_API_NS_COPYING
static struct RequestHandle * requests_tail
DLL.
void * REST_copying_init(const struct GNUNET_CONFIGURATION_Handle *c)
Entry point for the plugin.
static void get_cont(struct GNUNET_REST_RequestHandle *con_handle, const char *url, void *cls)
Handle rest request.
static struct GNUNET_TESTING_PluginFunctions * plugin
Plugin to dynamically load a test case.
static struct GNUNET_VPN_Handle * handle
Handle to vpn service.
API for helper library to parse/create REST.
GNUnet service REST plugin header.
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
#define GNUNET_log(kind,...)
GNUNET_GenericReturnValue
Named constants for return values.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
@ GNUNET_ERROR_TYPE_DEBUG
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
int GNUNET_REST_handle_request(struct GNUNET_REST_RequestHandle *conn, const struct GNUNET_REST_RequestHandler *handlers, struct GNUNET_REST_RequestHandlerError *err, void *cls)
void(* GNUNET_REST_ResultProcessor)(void *cls, struct MHD_Response *resp, int status)
Iterator called on obtained result for a REST result.
#define GNUNET_REST_HANDLER_END
struct MHD_Response * GNUNET_REST_create_response(const char *data)
Create REST MHD response.
void * cls
Closure for all of the callbacks.
struct returned by the initialization function of the plugin
void * cls
The closure of the plugin.
const char * name
Plugin name.
struct GNUNET_BLOCK_PluginFunctions * api
Plugin API.
const struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
struct RequestHandle * prev
DLL.
int response_code
HTTP response code.
void * proc_cls
The closure of the result processor.
GNUNET_REST_ResultProcessor proc
The plugin result processor.
struct RequestHandle * next
DLL.
struct GNUNET_REST_RequestHandle * rest_handle
Handle to rest request.