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/wsfs/provider/impl/provider.h
Falk Werner 1c9d1c8420
feat(API wrapper): separates implementation from public API
* moves implementation to impl subdirectory
* adds prefix _impl to implementation symbols
* removes double compilation for shared and static libraries
* fixes include guards
* fixes usage of extern "C"
2019-03-26 15:35:33 +01:00

57 lines
1.2 KiB
C

#ifndef WSFS_PROVIDER_IMPL_PROVIDER_H
#define WSFS_PROVIDER_IMPL_PROVIDER_H
#include <jansson.h>
#include "wsfs/provider/client_config.h"
#ifdef __cplusplus
extern "C"
{
#endif
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
{
struct wsfsp_provider * provider;
void * user_data;
struct wsfsp_request * request;
};
extern void wsfsp_impl_provider_init(
struct wsfsp_provider * provider);
extern void wsfsp_impl_provider_init_from_prototype(
struct wsfsp_provider * provider,
struct wsfsp_provider const * prototype);
extern void wsfsp_impl_provider_invoke(
struct wsfsp_impl_invokation_context * context,
json_t * request);
extern void wsfsp_impl_connected_default(
void * user_data);
extern void wsfsp_impl_disconnected_default(
void * user_data);
extern void wsfsp_impl_ontimer_default(
void * user_data);
#ifdef __cplusplus
}
#endif
#endif