2019-02-25 20:35:38 +00:00
|
|
|
#ifndef WSFS_PROVIDER_REQUEST_H
|
|
|
|
#define WSFS_PROVIDER_REQUEST_H
|
2019-02-24 17:03:22 +00:00
|
|
|
|
|
|
|
#include <jansson.h>
|
2019-02-25 19:17:13 +00:00
|
|
|
#include "wsfs/provider/provider.h"
|
2019-02-24 17:03:22 +00:00
|
|
|
|
|
|
|
typedef void wsfsp_request_respond_fn(
|
|
|
|
json_t * response,
|
|
|
|
void * user_data);
|
|
|
|
|
|
|
|
struct wsfsp_request
|
|
|
|
{
|
|
|
|
wsfsp_request_respond_fn * respond;
|
|
|
|
void * user_data;
|
2019-02-24 19:06:16 +00:00
|
|
|
int id;
|
2019-02-24 17:03:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-02-24 19:06:16 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern struct wsfsp_request * wsfsp_request_create(
|
|
|
|
struct wsfsp_request * prototype,
|
|
|
|
int id);
|
|
|
|
|
|
|
|
extern void wsfsp_request_dispose(
|
|
|
|
struct wsfsp_request * request);
|
|
|
|
|
2019-03-03 11:48:58 +00:00
|
|
|
extern void wsfsp_respond(
|
|
|
|
struct wsfsp_request * request,
|
|
|
|
json_t * result);
|
|
|
|
|
2019-02-24 19:06:16 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2019-02-24 17:03:22 +00:00
|
|
|
#endif
|