1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00
falk-werner_webfuse-provider/lib/webfuse_provider/impl/request.h

50 lines
958 B
C
Raw Permalink Normal View History

2020-06-17 14:51:08 +00:00
#ifndef WFP_IMPL_REQUEST_H
#define WFP_IMPL_REQUEST_H
2019-03-26 22:04:53 +00:00
2020-06-16 21:39:45 +00:00
#include "webfuse_provider/impl/provider.h"
#include "webfuse_provider/status.h"
2019-03-26 22:04:53 +00:00
#ifdef __cplusplus
extern "C"
{
#endif
2020-07-08 19:29:18 +00:00
struct wfp_message;
struct wfp_message_writer;
2019-03-26 22:04:53 +00:00
typedef void wfp_impl_request_respond_fn(
2020-07-08 19:29:18 +00:00
struct wfp_message * response,
2019-03-26 22:04:53 +00:00
void * user_data);
struct wfp_request
{
wfp_impl_request_respond_fn * respond;
void * user_data;
int id;
2020-07-08 19:29:18 +00:00
struct wfp_message_writer * writer;
2019-03-26 22:04:53 +00:00
};
2020-07-08 19:29:18 +00:00
extern struct wfp_message_writer *
wfp_impl_request_get_writer(
struct wfp_request * request);
2019-03-26 22:04:53 +00:00
extern void wfp_impl_respond_error(
struct wfp_request * request,
wfp_status status);
2019-03-26 22:04:53 +00:00
extern struct wfp_request * wfp_impl_request_create(
struct wfp_request * prototype,
int id);
extern void wfp_impl_request_dispose(
struct wfp_request * request);
extern void wfp_impl_respond(
2020-07-08 19:29:18 +00:00
struct wfp_request * request);
2019-03-26 22:04:53 +00:00
#ifdef __cplusplus
}
#endif
#endif