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

57 lines
1.2 KiB
C
Raw Normal View History

#ifndef WSFS_PROVIDER_IMPL_PROVIDER_H
#define WSFS_PROVIDER_IMPL_PROVIDER_H
2019-03-04 20:18:16 +00:00
#include <jansson.h>
2019-03-04 20:18:16 +00:00
#include "wsfs/provider/client_config.h"
#ifdef __cplusplus
extern "C"
{
#endif
2019-03-04 20:18:16 +00:00
struct wsfsp_provider
{
wsfsp_connected_fn * connected;
wsfsp_disconnected_fn * disconnected;
wsfsp_ontimer_fn * ontimer;
wsfsp_lookup_fn * lookup;
wsfsp_getattr_fn * getattr;
wsfsp_readdir_fn * readdir;
wsfsp_open_fn * open;
wsfsp_close_fn * close;
wsfsp_read_fn * read;
};
struct wsfsp_impl_invokation_context
2019-03-04 20:18:16 +00:00
{
struct wsfsp_provider * provider;
void * user_data;
struct wsfsp_request * request;
};
extern void wsfsp_impl_provider_init(
2019-03-04 20:18:16 +00:00
struct wsfsp_provider * provider);
extern void wsfsp_impl_provider_init_from_prototype(
2019-03-04 20:18:16 +00:00
struct wsfsp_provider * provider,
struct wsfsp_provider const * prototype);
extern void wsfsp_impl_provider_invoke(
struct wsfsp_impl_invokation_context * context,
2019-03-04 20:18:16 +00:00
json_t * request);
extern void wsfsp_impl_connected_default(
2019-03-04 20:18:16 +00:00
void * user_data);
extern void wsfsp_impl_disconnected_default(
2019-03-04 20:18:16 +00:00
void * user_data);
extern void wsfsp_impl_ontimer_default(
2019-03-04 20:18:16 +00:00
void * user_data);
#ifdef __cplusplus
}
#endif
#endif