1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00

reorganized project: prepared to extract common functionality

This commit is contained in:
Falk Werner 2019-02-25 20:17:13 +01:00
parent c7c28416db
commit 1976841334
88 changed files with 217 additions and 218 deletions

View File

@ -42,43 +42,43 @@ set(EXTRA_CFLAGS
) )
# libwsfs # libwsfs-adapter
set(WSFS_SOURCES set(WSFS_ADAPTER_SOURCES
lib/wsfs/status.c lib/wsfs/adapter/status.c
lib/wsfs/filesystem.c lib/wsfs/adapter/filesystem.c
lib/wsfs/server.c lib/wsfs/adapter/server.c
lib/wsfs/message.c lib/wsfs/adapter/message.c
lib/wsfs/message_queue.c lib/wsfs/adapter/message_queue.c
lib/wsfs/time/timepoint.c lib/wsfs/adapter/time/timepoint.c
lib/wsfs/time/timer.c lib/wsfs/adapter/time/timer.c
lib/wsfs/time/timeout_manager.c lib/wsfs/adapter/time/timeout_manager.c
lib/wsfs/operation/lookup.c lib/wsfs/adapter/operation/lookup.c
lib/wsfs/operation/getattr.c lib/wsfs/adapter/operation/getattr.c
lib/wsfs/operation/readdir.c lib/wsfs/adapter/operation/readdir.c
lib/wsfs/operation/open.c lib/wsfs/adapter/operation/open.c
lib/wsfs/operation/close.c lib/wsfs/adapter/operation/close.c
lib/wsfs/operation/read.c lib/wsfs/adapter/operation/read.c
lib/wsfs/server_config.c lib/wsfs/adapter/server_config.c
lib/wsfs/server_protocol.c lib/wsfs/adapter/server_protocol.c
lib/wsfs/jsonrpc/server.c lib/wsfs/adapter/jsonrpc/server.c
lib/wsfs/jsonrpc/method.c lib/wsfs/adapter/jsonrpc/method.c
lib/wsfs/jsonrpc/request.c lib/wsfs/adapter/jsonrpc/request.c
lib/wsfs/jsonrpc/response.c lib/wsfs/adapter/jsonrpc/response.c
lib/wsfs/jsonrpc/util.c lib/wsfs/adapter/jsonrpc/util.c
) )
add_library(wsfs SHARED ${WSFS_SOURCES}) add_library(wsfs-adapter SHARED ${WSFS_ADAPTER_SOURCES})
set_target_properties(wsfs PROPERTIES VERSION ${PROJECT_VERSION}) set_target_properties(wsfs-adapter PROPERTIES VERSION ${PROJECT_VERSION})
set_target_properties(wsfs PROPERTIES SOVERSION 0) set_target_properties(wsfs-adapter PROPERTIES SOVERSION 0)
set_target_properties(wsfs PROPERTIES C_VISIBILITY_PRESET hidden) set_target_properties(wsfs-adapter PROPERTIES C_VISIBILITY_PRESET hidden)
set_target_properties(wsfs PROPERTIES COMPILE_DEFINITIONS "WSFS_API=WSFS_EXPORT") set_target_properties(wsfs-adapter PROPERTIES COMPILE_DEFINITIONS "WSFS_API=WSFS_EXPORT")
target_include_directories(wsfs PUBLIC lib ${EXTRA_INCLUDE_DIRS}) target_include_directories(wsfs-adapter PUBLIC lib ${EXTRA_INCLUDE_DIRS})
target_compile_options(wsfs PUBLIC ${EXTRA_CFLAGS}) target_compile_options(wsfs-adapter PUBLIC ${EXTRA_CFLAGS})
file(WRITE "${PROJECT_BINARY_DIR}/libwsfs.pc" file(WRITE "${PROJECT_BINARY_DIR}/libwsfs-adapter.pc"
"prefix=\"${CMAKE_INSTALL_PREFIX}\" "prefix=\"${CMAKE_INSTALL_PREFIX}\"
exec_prefix=\${prefix} exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib${LIB_SUFFIX} libdir=\${exec_prefix}/lib${LIB_SUFFIX}
@ -87,30 +87,30 @@ Name: libwsfs
Description: Websockets filesystem server library Description: Websockets filesystem server library
Version: ${PROJECT_VERSION} Version: ${PROJECT_VERSION}
Libs: -L\${libdir} -lwsfs -l${FUSE3_LIBRARIES} -l${LWS_LIBRARIES} -l${JANSSON_LIBRARIES} Libs: -L\${libdir} -lwsfs-adapter -l${FUSE3_LIBRARIES} -l${LWS_LIBRARIES} -l${JANSSON_LIBRARIES}
Cflags: -I\${includedir}" Cflags: -I\${includedir}"
) )
install(TARGETS wsfs DESTINATION lib${LIB_SUFFIX}) install(TARGETS wsfs-adapter DESTINATION lib${LIB_SUFFIX})
install(FILES include/wsfs.h DESTINATION include) install(FILES include/wsfs_adapter.h DESTINATION include)
install(DIRECTORY include/wsfs DESTINATION include) install(DIRECTORY include/wsfs/adapter DESTINATION include/wsfs)
install(FILES "${PROJECT_BINARY_DIR}/libwsfs.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig) install(FILES "${PROJECT_BINARY_DIR}/libwsfs-adapter.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig)
#libwsfs-provider #libwsfs-provider
set(WSFS_PROVIDER_SOURCES set(WSFS_PROVIDER_SOURCES
lib/wsfsp/url.c lib/wsfs/provider/url.c
lib/wsfsp/client.c lib/wsfs/provider/client.c
lib/wsfsp/client_protocol.c lib/wsfs/provider/client_protocol.c
lib/wsfsp/provider.c lib/wsfs/provider/provider.c
lib/wsfsp/request.c lib/wsfs/provider/request.c
lib/wsfsp/operation/error.c lib/wsfs/provider/operation/error.c
lib/wsfsp/operation/lookup.c lib/wsfs/provider/operation/lookup.c
lib/wsfsp/operation/getattr.c lib/wsfs/provider/operation/getattr.c
lib/wsfsp/operation/readdir.c lib/wsfs/provider/operation/readdir.c
lib/wsfsp/operation/open.c lib/wsfs/provider/operation/open.c
lib/wsfsp/operation/close.c lib/wsfs/provider/operation/close.c
lib/wsfsp/operation/read.c lib/wsfs/provider/operation/read.c
) )
add_library(wsfs-provider SHARED ${WSFS_PROVIDER_SOURCES}) add_library(wsfs-provider SHARED ${WSFS_PROVIDER_SOURCES})
@ -138,7 +138,7 @@ Cflags: -I\${includedir}"
install(TARGETS wsfs-provider DESTINATION lib${LIB_SUFFIX}) install(TARGETS wsfs-provider DESTINATION lib${LIB_SUFFIX})
install(FILES include/wsfs_provider.h DESTINATION include) install(FILES include/wsfs_provider.h DESTINATION include)
install(DIRECTORY include/wsfsp DESTINATION include) install(DIRECTORY include/wsfs/provider DESTINATION include/wsfs)
install(FILES "${PROJECT_BINARY_DIR}/libwsfs-provider.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig) install(FILES "${PROJECT_BINARY_DIR}/libwsfs-provider.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig)
@ -152,7 +152,7 @@ add_executable(wsfsd
example/daemon/main.c example/daemon/main.c
) )
target_link_libraries(wsfsd PUBLIC wsfs ${EXTRA_LIBS}) target_link_libraries(wsfsd PUBLIC wsfs-adapter ${EXTRA_LIBS})
target_include_directories(wsfsd PUBLIC ${EXTRA_INCLUDE_DIRS}) target_include_directories(wsfsd PUBLIC ${EXTRA_INCLUDE_DIRS})
target_compile_options(wsfsd PUBLIC ${EXTRA_CFLAGS}) target_compile_options(wsfsd PUBLIC ${EXTRA_CFLAGS})
@ -176,10 +176,10 @@ if(NOT WITHOUT_TESTS)
pkg_check_modules(GTEST gtest_main) pkg_check_modules(GTEST gtest_main)
add_library(wsfs-static STATIC ${WSFS_SOURCES}) add_library(wsfs-adapter-static STATIC ${WSFS_ADAPTER_SOURCES})
set_target_properties(wsfs-static PROPERTIES OUTPUT_NAME wsfs) set_target_properties(wsfs-adapter-static PROPERTIES OUTPUT_NAME wsfs-adapter)
target_include_directories(wsfs-static PUBLIC lib ${EXTRA_INCLUDE_DIRS}) target_include_directories(wsfs-adapter-static PUBLIC lib ${EXTRA_INCLUDE_DIRS})
target_compile_options(wsfs-static PUBLIC ${EXTRA_CFLAGS}) target_compile_options(wsfs-adapter-static PUBLIC ${EXTRA_CFLAGS})
add_library(wsfs-provider-static STATIC ${WSFS_PROVIDER_SOURCES}) add_library(wsfs-provider-static STATIC ${WSFS_PROVIDER_SOURCES})
set_target_properties(wsfs-provider-static PROPERTIES OUTPUT_NAME wsfs-provider) set_target_properties(wsfs-provider-static PROPERTIES OUTPUT_NAME wsfs-provider)
@ -196,7 +196,7 @@ add_executable(alltests
test/test_url.cc test/test_url.cc
) )
target_link_libraries(alltests PUBLIC wsfs-static wsfs-provider-static ${EXTRA_LIBS} ${GTEST_LIBRARIES}) target_link_libraries(alltests PUBLIC wsfs-adapter-static wsfs-provider-static ${EXTRA_LIBS} ${GTEST_LIBRARIES})
target_include_directories(alltests PUBLIC lib ${EXTRA_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS}) target_include_directories(alltests PUBLIC lib ${EXTRA_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS})
target_compile_options(alltests PUBLIC ${EXTRA_CFLAGS} ${GTEST_CFLAGS}) target_compile_options(alltests PUBLIC ${EXTRA_CFLAGS} ${GTEST_CFLAGS})

View File

@ -8,8 +8,7 @@
#include <unistd.h> #include <unistd.h>
#include <getopt.h> #include <getopt.h>
#include "wsfs/server.h" #include <wsfs_adapter.h>
#include "wsfs/server_config.h"
struct args struct args
{ {

View File

@ -1,9 +0,0 @@
#ifndef WSFS_H
#define WSFS_H
#include <wsfs/api.h>
#include <wsfs/server.h>
#include <wsfs/server_config.h>
#include <wsfs/server_protocol.h>
#endif

View File

@ -1,7 +1,7 @@
#ifndef WSFS_SERVER_H #ifndef WSFS_SERVER_H
#define WSFS_SERVER_H #define WSFS_SERVER_H
#include "wsfs/api.h" #include "wsfs/adapter/api.h"
struct wsfs_server; struct wsfs_server;
struct wsfs_server_config; struct wsfs_server_config;

View File

@ -1,7 +1,7 @@
#ifndef WSFS_SERVER_CONFIG_H #ifndef WSFS_SERVER_CONFIG_H
#define WSFS_SERVER_CONFIG_H #define WSFS_SERVER_CONFIG_H
#include "wsfs/api.h" #include "wsfs/adapter/api.h"
struct wsfs_server_config struct wsfs_server_config
{ {

View File

@ -1,7 +1,7 @@
#ifndef WSFS_SERVER_PROTOCOL_H #ifndef WSFS_SERVER_PROTOCOL_H
#define WSFS_SERVER_PROTOCOL_H #define WSFS_SERVER_PROTOCOL_H
#include "wsfs/api.h" #include "wsfs/adapter/api.h"
struct wsfs_server_protocol; struct wsfs_server_protocol;
struct lws_protocols; struct lws_protocols;

View File

@ -1,7 +1,7 @@
#ifndef WSFSP_CLIENT_H #ifndef WSFSP_CLIENT_H
#define WSFSP_CLIENT_H #define WSFSP_CLIENT_H
#include "wsfsp/api.h" #include "wsfs/provider/api.h"
struct wsfsp_provider; struct wsfsp_provider;
struct wsfsp_client; struct wsfsp_client;

View File

@ -1,7 +1,7 @@
#ifndef WSFSP_CLIENT_PROTOCOL_H #ifndef WSFSP_CLIENT_PROTOCOL_H
#define WSFSP_CLIENT_PROTOCOL_H #define WSFSP_CLIENT_PROTOCOL_H
#include "wsfsp/api.h" #include "wsfs/provider/api.h"
struct wsfsp_client_protocol; struct wsfsp_client_protocol;
struct wsfsp_provider; struct wsfsp_provider;

View File

@ -5,7 +5,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include "wsfsp/api.h" #include "wsfs/provider/api.h"
struct wsfsp_dirbuffer; struct wsfsp_dirbuffer;

View File

@ -11,7 +11,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include "wsfsp/api.h" #include "wsfs/provider/api.h"
typedef void wsfsp_close_fn( typedef void wsfsp_close_fn(
ino_t inode, ino_t inode,

View File

@ -1,7 +1,7 @@
#ifndef WSFSP_OPERATION_ERROR_H #ifndef WSFSP_OPERATION_ERROR_H
#define WSFSP_OPERATION_ERROR_H #define WSFSP_OPERATION_ERROR_H
#include "wsfsp/api.h" #include "wsfs/provider/api.h"
struct wsfsp_request; struct wsfsp_request;

View File

@ -5,7 +5,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include "wsfsp/api.h" #include "wsfs/provider/api.h"
struct wsfsp_request; struct wsfsp_request;

View File

@ -5,7 +5,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include "wsfsp/api.h" #include "wsfs/provider/api.h"
struct wsfsp_request; struct wsfsp_request;

View File

@ -11,7 +11,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include "wsfsp/api.h" #include "wsfs/provider/api.h"
struct wsfsp_request; struct wsfsp_request;

View File

@ -14,7 +14,7 @@ using std::size_t;
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include "wsfsp/api.h" #include "wsfs/provider/api.h"
struct wsfsp_request; struct wsfsp_request;

View File

@ -5,7 +5,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include "wsfsp/api.h" #include "wsfs/provider/api.h"
struct wsfsp_dirbuffer; struct wsfsp_dirbuffer;
struct wsfsp_request; struct wsfsp_request;

View File

@ -1,12 +1,12 @@
#ifndef WSFSP_PROVIDER_H #ifndef WSFSP_PROVIDER_H
#define WSFSP_PROVIDER_H #define WSFSP_PROVIDER_H
#include <wsfsp/operation/lookup.h> #include <wsfs/provider/operation/lookup.h>
#include <wsfsp/operation/getattr.h> #include <wsfs/provider/operation/getattr.h>
#include <wsfsp/operation/readdir.h> #include <wsfs/provider/operation/readdir.h>
#include <wsfsp/operation/open.h> #include <wsfs/provider/operation/open.h>
#include <wsfsp/operation/close.h> #include <wsfs/provider/operation/close.h>
#include <wsfsp/operation/read.h> #include <wsfs/provider/operation/read.h>
typedef void wsfsp_connected_fn( typedef void wsfsp_connected_fn(
void * user_data); void * user_data);

9
include/wsfs_adapter.h Normal file
View File

@ -0,0 +1,9 @@
#ifndef WSFS_H
#define WSFS_H
#include <wsfs/adapter/api.h>
#include <wsfs/adapter/server.h>
#include <wsfs/adapter/server_config.h>
#include <wsfs/adapter/server_protocol.h>
#endif

View File

@ -1,18 +1,18 @@
#ifndef WSFSP_H #ifndef WSFSP_H
#define WSFSP_H #define WSFSP_H
#include <wsfsp/api.h> #include <wsfs/provider/api.h>
#include <wsfsp/client.h> #include <wsfs/provider/client.h>
#include <wsfsp/client_protocol.h> #include <wsfs/provider/client_protocol.h>
#include <wsfsp/provider.h> #include <wsfs/provider/provider.h>
#include <wsfsp/dirbuffer.h> #include <wsfs/provider/dirbuffer.h>
#include <wsfsp/operation/error.h> #include <wsfs/provider/operation/error.h>
#include <wsfsp/operation/lookup.h> #include <wsfs/provider/operation/lookup.h>
#include <wsfsp/operation/getattr.h> #include <wsfs/provider/operation/getattr.h>
#include <wsfsp/operation/readdir.h> #include <wsfs/provider/operation/readdir.h>
#include <wsfsp/operation/open.h> #include <wsfs/provider/operation/open.h>
#include <wsfsp/operation/close.h> #include <wsfs/provider/operation/close.h>
#include <wsfsp/operation/read.h> #include <wsfs/provider/operation/read.h>
#endif #endif

View File

@ -1,6 +1,6 @@
#include "wsfs/filesystem.h" #include "wsfs/adapter/filesystem.h"
#include "wsfs/operations.h" #include "wsfs/adapter/operations.h"
#include "wsfs/jsonrpc/server.h" #include "wsfs/adapter/jsonrpc/server.h"
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>

View File

@ -5,8 +5,8 @@
#include <stdbool.h> #include <stdbool.h>
#endif #endif
#include "wsfs/fuse_wrapper.h" #include "wsfs/adapter/fuse_wrapper.h"
#include "wsfs/operations.h" #include "wsfs/adapter/operations.h"
struct wsfs_jsonrpc_server; struct wsfs_jsonrpc_server;

View File

@ -1,4 +1,4 @@
#include "wsfs/jsonrpc/method_intern.h" #include "wsfs/adapter/jsonrpc/method_intern.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -6,7 +6,7 @@
#endif #endif
#include <jansson.h> #include <jansson.h>
#include "wsfs/status.h" #include "wsfs/adapter/status.h"
typedef bool wsfs_jsonrpc_method_invoke_fn( typedef bool wsfs_jsonrpc_method_invoke_fn(

View File

@ -1,7 +1,7 @@
#ifndef WSFS_JSONRPC_METHOD_INTERN_H #ifndef WSFS_JSONRPC_METHOD_INTERN_H
#define WSFS_JSONRPC_METHOD_INTERN_H #define WSFS_JSONRPC_METHOD_INTERN_H
#include "wsfs/jsonrpc/method.h" #include "wsfs/adapter/jsonrpc/method.h"
struct wsfs_jsonrpc_method struct wsfs_jsonrpc_method
{ {

View File

@ -1,4 +1,4 @@
#include "wsfs/jsonrpc/request.h" #include "wsfs/adapter/jsonrpc/request.h"
json_t * wsfs_jsonrpc_request_create( json_t * wsfs_jsonrpc_request_create(
char const * method, char const * method,

View File

@ -1,4 +1,4 @@
#include "wsfs/jsonrpc/response.h" #include "wsfs/adapter/jsonrpc/response.h"
void wsfs_jsonrpc_response_init( void wsfs_jsonrpc_response_init(
struct wsfs_jsonrpc_response * result, struct wsfs_jsonrpc_response * result,

View File

@ -9,7 +9,7 @@ using std::size_t;
#endif #endif
#include <jansson.h> #include <jansson.h>
#include "wsfs/status.h" #include "wsfs/adapter/status.h"
struct wsfs_jsonrpc_response struct wsfs_jsonrpc_response
{ {

View File

@ -1,9 +1,9 @@
#include "wsfs/jsonrpc/server.h" #include "wsfs/adapter/jsonrpc/server.h"
#include <string.h> #include <string.h>
#include "wsfs/jsonrpc/method_intern.h" #include "wsfs/adapter/jsonrpc/method_intern.h"
#include "wsfs/jsonrpc/request.h" #include "wsfs/adapter/jsonrpc/request.h"
#include "wsfs/jsonrpc/response.h" #include "wsfs/adapter/jsonrpc/response.h"
#define WSFS_DEFAULT_TIMEOUT (10 * 1000) #define WSFS_DEFAULT_TIMEOUT (10 * 1000)

View File

@ -12,9 +12,9 @@ using std::size_t;
#endif #endif
#include <jansson.h> #include <jansson.h>
#include "wsfs/jsonrpc/method.h" #include "wsfs/adapter/jsonrpc/method.h"
#include "wsfs/time/timeout_manager.h" #include "wsfs/adapter/time/timeout_manager.h"
#include "wsfs/time/timer.h" #include "wsfs/adapter/time/timer.h"
struct wsfs_jsonrpc_request struct wsfs_jsonrpc_request

View File

@ -1,4 +1,4 @@
#include "wsfs/jsonrpc/util.h" #include "wsfs/adapter/jsonrpc/util.h"
int wsfs_json_get_int(json_t const * object, char const * key, int default_value) int wsfs_json_get_int(json_t const * object, char const * key, int default_value)
{ {

View File

@ -1,4 +1,4 @@
#include "wsfs/message.h" #include "wsfs/adapter/message.h"
#include <stdlib.h> #include <stdlib.h>
#include <libwebsockets.h> #include <libwebsockets.h>

View File

@ -1,5 +1,5 @@
#include "wsfs/message_queue.h" #include "wsfs/adapter/message_queue.h"
#include "wsfs/message.h" #include "wsfs/adapter/message.h"
void wsfs_message_queue_init( void wsfs_message_queue_init(
struct wsfs_message_queue * queue) struct wsfs_message_queue * queue)

View File

@ -1,10 +1,10 @@
#include "wsfs/operations.h" #include "wsfs/adapter/operations.h"
#include <limits.h> #include <limits.h>
#include <errno.h> #include <errno.h>
#include <jansson.h> #include <jansson.h>
#include "wsfs/jsonrpc/server.h" #include "wsfs/adapter/jsonrpc/server.h"
#include "wsfs/util.h" #include "wsfs/util.h"
void wsfs_operation_close( void wsfs_operation_close(

View File

@ -1,4 +1,4 @@
#include "wsfs/operations.h" #include "wsfs/adapter/operations.h"
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
@ -7,8 +7,8 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include "wsfs/jsonrpc/server.h" #include "wsfs/adapter/jsonrpc/server.h"
#include "wsfs/jsonrpc/util.h" #include "wsfs/adapter/jsonrpc/util.h"
#include "wsfs/util.h" #include "wsfs/util.h"
struct wsfs_operation_getattr_context struct wsfs_operation_getattr_context

View File

@ -1,4 +1,4 @@
#include "wsfs/operations.h" #include "wsfs/adapter/operations.h"
#include <limits.h> #include <limits.h>
#include <errno.h> #include <errno.h>
@ -10,8 +10,8 @@
#include <stdlib.h> #include <stdlib.h>
#include "wsfs/jsonrpc/server.h" #include "wsfs/adapter/jsonrpc/server.h"
#include "wsfs/jsonrpc/util.h" #include "wsfs/adapter/jsonrpc/util.h"
#include "wsfs/util.h" #include "wsfs/util.h"
struct wsfs_operation_lookup_context struct wsfs_operation_lookup_context

View File

@ -1,12 +1,12 @@
#include "wsfs/operations.h" #include "wsfs/adapter/operations.h"
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <jansson.h> #include <jansson.h>
#include "wsfs/jsonrpc/server.h" #include "wsfs/adapter/jsonrpc/server.h"
#include "wsfs/util.h" #include "wsfs/util.h"
#include "wsfs/status.h" #include "wsfs/adapter/status.h"
static void wsfs_operation_open_finished( static void wsfs_operation_open_finished(
void * user_data, void * user_data,

View File

@ -1,4 +1,4 @@
#include "wsfs/operations.h" #include "wsfs/adapter/operations.h"
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
@ -6,7 +6,7 @@
#include <jansson.h> #include <jansson.h>
#include <libwebsockets.h> #include <libwebsockets.h>
#include "wsfs/jsonrpc/server.h" #include "wsfs/adapter/jsonrpc/server.h"
#define WSFS_MAX_READ_LENGTH 4096 #define WSFS_MAX_READ_LENGTH 4096

View File

@ -1,4 +1,4 @@
#include "wsfs/operations.h" #include "wsfs/adapter/operations.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -8,7 +8,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include "wsfs/jsonrpc/server.h" #include "wsfs/adapter/jsonrpc/server.h"
#include "wsfs/util.h" #include "wsfs/util.h"

View File

@ -1,7 +1,7 @@
#ifndef WSFS_OPERATIONS #ifndef WSFS_OPERATIONS
#define WSFS_OPERATIONS #define WSFS_OPERATIONS
#include "wsfs/fuse_wrapper.h" #include "wsfs/adapter/fuse_wrapper.h"
struct wsfs_jsonrpc_server; struct wsfs_jsonrpc_server;

View File

@ -1,11 +1,11 @@
#include "wsfs/server.h" #include "wsfs/adapter/server.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdbool.h> #include <stdbool.h>
#include <libwebsockets.h> #include <libwebsockets.h>
#include "wsfs/server_config.h" #include "wsfs/adapter/server_config.h"
#include "wsfs/server_protocol_intern.h" #include "wsfs/adapter/server_protocol_intern.h"
#define WSFS_DISABLE_LWS_LOG 0 #define WSFS_DISABLE_LWS_LOG 0
#define WSFS_SERVER_PROTOCOL_COUNT 3 #define WSFS_SERVER_PROTOCOL_COUNT 3

View File

@ -1,4 +1,4 @@
#include "wsfs/server_config.h" #include "wsfs/adapter/server_config.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -1,10 +1,10 @@
#include "wsfs/server_protocol_intern.h" #include "wsfs/adapter/server_protocol_intern.h"
#include <stdlib.h> #include <stdlib.h>
#include <libwebsockets.h> #include <libwebsockets.h>
#include "wsfs/message.h" #include "wsfs/adapter/message.h"
#include "wsfs/filesystem.h" #include "wsfs/adapter/filesystem.h"
#include "wsfs/util.h" #include "wsfs/util.h"
static int wsfs_server_protocol_callback( static int wsfs_server_protocol_callback(

View File

@ -1,11 +1,11 @@
#ifndef WSFS_SERVER_PROTOCOL_INTERN_H #ifndef WSFS_SERVER_PROTOCOL_INTERN_H
#define WSFS_SERVER_PROTOCOL_INTERN_H #define WSFS_SERVER_PROTOCOL_INTERN_H
#include "wsfs/server_protocol.h" #include "wsfs/adapter/server_protocol.h"
#include "wsfs/filesystem.h" #include "wsfs/adapter/filesystem.h"
#include "wsfs/message_queue.h" #include "wsfs/adapter/message_queue.h"
#include "wsfs/jsonrpc/server.h" #include "wsfs/adapter/jsonrpc/server.h"
#include "wsfs/time/timeout_manager.h" #include "wsfs/adapter/time/timeout_manager.h"
struct wsfs_server_protocol struct wsfs_server_protocol
{ {

View File

@ -1,4 +1,4 @@
#include "wsfs/status.h" #include "wsfs/adapter/status.h"
#include <errno.h> #include <errno.h>

View File

@ -1,8 +1,8 @@
#include "wsfs/time/timeout_manager_intern.h" #include "wsfs/adapter/time/timeout_manager_intern.h"
#include <stddef.h> #include <stddef.h>
#include "wsfs/time/timer_intern.h" #include "wsfs/adapter/time/timer_intern.h"
#include "wsfs/time/timepoint.h" #include "wsfs/adapter/time/timepoint.h"
void wsfs_timeout_manager_init( void wsfs_timeout_manager_init(
struct wsfs_timeout_manager * manager) struct wsfs_timeout_manager * manager)

View File

@ -1,7 +1,7 @@
#ifndef WSFS_TIME_TIMEOUT_MANAGER_INTERN_H #ifndef WSFS_TIME_TIMEOUT_MANAGER_INTERN_H
#define WSFS_TIME_TIMEOUT_MANAGER_INTERN_H #define WSFS_TIME_TIMEOUT_MANAGER_INTERN_H
#include "wsfs/time/timeout_manager.h" #include "wsfs/adapter/time/timeout_manager.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"

View File

@ -1,4 +1,4 @@
#include "wsfs/time/timepoint.h" #include "wsfs/adapter/time/timepoint.h"
#include <time.h> #include <time.h>

View File

@ -1,5 +1,5 @@
#include "wsfs/time/timer_intern.h" #include "wsfs/adapter/time/timer_intern.h"
#include "wsfs/time/timeout_manager_intern.h" #include "wsfs/adapter/time/timeout_manager_intern.h"
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>

View File

@ -1,7 +1,7 @@
#ifndef WSFS_TIMER_H #ifndef WSFS_TIMER_H
#define WSFS_TIMER_H #define WSFS_TIMER_H
#include "wsfs/time/timepoint.h" #include "wsfs/adapter/time/timepoint.h"
struct wsfs_timer; struct wsfs_timer;
struct wsfs_timeout_manager; struct wsfs_timeout_manager;

View File

@ -5,7 +5,7 @@
#include <stdbool.h> #include <stdbool.h>
#endif #endif
#include "wsfs/time/timer.h" #include "wsfs/adapter/time/timer.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"

View File

@ -1,4 +1,4 @@
#include "wsfsp/client.h" #include "wsfs/provider/client.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -6,9 +6,9 @@
#include <libwebsockets.h> #include <libwebsockets.h>
#include "wsfsp/provider.h" #include "wsfs/provider/provider.h"
#include "wsfsp/client_protocol_intern.h" #include "wsfs/provider/client_protocol_intern.h"
#include "wsfsp/url.h" #include "wsfs/provider/url.h"
#define WSFSP_PROTOCOL ("fs") #define WSFSP_PROTOCOL ("fs")
#define WSFSP_DISABLE_LWS_LOG 0 #define WSFSP_DISABLE_LWS_LOG 0

View File

@ -1,4 +1,4 @@
#include "wsfsp/client_protocol_intern.h" #include "wsfs/provider/client_protocol_intern.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -7,13 +7,13 @@
#include <jansson.h> #include <jansson.h>
#include "wsfsp/provider_intern.h" #include "wsfs/provider/provider_intern.h"
#include "wsfsp/operation/lookup_intern.h" #include "wsfs/provider/operation/lookup_intern.h"
#include "wsfsp/operation/getattr_intern.h" #include "wsfs/provider/operation/getattr_intern.h"
#include "wsfsp/operation/readdir_intern.h" #include "wsfs/provider/operation/readdir_intern.h"
#include "wsfsp/operation/open_intern.h" #include "wsfs/provider/operation/open_intern.h"
#include "wsfsp/operation/close_intern.h" #include "wsfs/provider/operation/close_intern.h"
#include "wsfsp/operation/read_intern.h" #include "wsfs/provider/operation/read_intern.h"
#include "wsfs/util.h" #include "wsfs/util.h"

View File

@ -1,9 +1,9 @@
#ifndef WSFSP_CLIENT_PROTOCOL_INTERN_H #ifndef WSFSP_CLIENT_PROTOCOL_INTERN_H
#define WSFSP_CLIENT_PROTOCOL_INTERN_H #define WSFSP_CLIENT_PROTOCOL_INTERN_H
#include "wsfsp/client_protocol.h" #include "wsfs/provider/client_protocol.h"
#include "wsfsp/provider.h" #include "wsfs/provider/provider.h"
#include "wsfsp/request.h" #include "wsfs/provider/request.h"
struct wsfsp_client_protocol struct wsfsp_client_protocol
{ {

View File

@ -1,4 +1,4 @@
#include "wsfsp/operation/close_intern.h" #include "wsfs/provider/operation/close_intern.h"
#include <limits.h> #include <limits.h>
#include "wsfs/util.h" #include "wsfs/util.h"

View File

@ -1,8 +1,8 @@
#ifndef WSFSP_OPERATION_CLOSE_INTERN_H #ifndef WSFSP_OPERATION_CLOSE_INTERN_H
#define WSFSP_OPERATION_CLOSE_INTERN_H #define WSFSP_OPERATION_CLOSE_INTERN_H
#include "wsfsp/operation/close.h" #include "wsfs/provider/operation/close.h"
#include "wsfsp/provider_intern.h" #include "wsfs/provider/provider_intern.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"

View File

@ -1,6 +1,6 @@
#include "wsfsp/operation/error.h" #include "wsfs/provider/operation/error.h"
#include <jansson.h> #include <jansson.h>
#include "wsfsp/request.h" #include "wsfs/provider/request.h"
void wsfsp_respond_error( void wsfsp_respond_error(
struct wsfsp_request * request, struct wsfsp_request * request,

View File

@ -1,7 +1,7 @@
#include "wsfsp/operation/getattr_intern.h" #include "wsfs/provider/operation/getattr_intern.h"
#include <stdio.h> #include <stdio.h>
#include "wsfsp/operation/error.h" #include "wsfs/provider/operation/error.h"
void wsfsp_getattr( void wsfsp_getattr(

View File

@ -1,8 +1,8 @@
#ifndef WSFSP_OPERATION_GETATTR_INTERN_H #ifndef WSFSP_OPERATION_GETATTR_INTERN_H
#define WSFSP_OPERATION_GETATTR_INTERN_H #define WSFSP_OPERATION_GETATTR_INTERN_H
#include "wsfsp/operation/getattr.h" #include "wsfs/provider/operation/getattr.h"
#include "wsfsp/provider_intern.h" #include "wsfs/provider/provider_intern.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"

View File

@ -1,6 +1,6 @@
#include "wsfsp/operation/lookup_intern.h" #include "wsfs/provider/operation/lookup_intern.h"
#include <stdio.h> #include <stdio.h>
#include "wsfsp/operation/error.h" #include "wsfs/provider/operation/error.h"
void wsfsp_lookup( void wsfsp_lookup(
struct wsfsp_invokation_context * context, struct wsfsp_invokation_context * context,

View File

@ -1,8 +1,8 @@
#ifndef WSFSP_OPERATION_LOOKUP_INTERN_H #ifndef WSFSP_OPERATION_LOOKUP_INTERN_H
#define WSFSP_OPERATION_LOOKUP_INTERN_H #define WSFSP_OPERATION_LOOKUP_INTERN_H
#include "wsfsp/operation/lookup.h" #include "wsfs/provider/operation/lookup.h"
#include "wsfsp/provider_intern.h" #include "wsfs/provider/provider_intern.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"

View File

@ -1,6 +1,6 @@
#include "wsfsp/operation/open_intern.h" #include "wsfs/provider/operation/open_intern.h"
#include <stdio.h> #include <stdio.h>
#include "wsfsp/operation/error.h" #include "wsfs/provider/operation/error.h"
void wsfsp_open( void wsfsp_open(
struct wsfsp_invokation_context * context, struct wsfsp_invokation_context * context,

View File

@ -1,8 +1,8 @@
#ifndef WSFSP_OPERATION_OPEN_INTERN_H #ifndef WSFSP_OPERATION_OPEN_INTERN_H
#define WSFSP_OPERATION_OPEN_INTERN_H #define WSFSP_OPERATION_OPEN_INTERN_H
#include "wsfsp/operation/open.h" #include "wsfs/provider/operation/open.h"
#include "wsfsp/provider_intern.h" #include "wsfs/provider/provider_intern.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"

View File

@ -1,6 +1,6 @@
#include "wsfsp/operation/read_intern.h" #include "wsfs/provider/operation/read_intern.h"
#include <stdio.h> #include <stdio.h>
#include "wsfsp/operation/error.h" #include "wsfs/provider/operation/error.h"
void wsfsp_read( void wsfsp_read(
struct wsfsp_invokation_context * context, struct wsfsp_invokation_context * context,

View File

@ -1,8 +1,8 @@
#ifndef WSFSP_OPERATION_READ_INTERN_H #ifndef WSFSP_OPERATION_READ_INTERN_H
#define WSFSP_OPERATION_READ_INTERN_H #define WSFSP_OPERATION_READ_INTERN_H
#include "wsfsp/operation/read.h" #include "wsfs/provider/operation/read.h"
#include "wsfsp/provider_intern.h" #include "wsfs/provider/provider_intern.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"

View File

@ -1,6 +1,6 @@
#include "wsfsp/operation/readdir_intern.h" #include "wsfs/provider/operation/readdir_intern.h"
#include <stdio.h> #include <stdio.h>
#include "wsfsp/operation/error.h" #include "wsfs/provider/operation/error.h"
void wsfsp_readdir( void wsfsp_readdir(
struct wsfsp_invokation_context * context, struct wsfsp_invokation_context * context,

View File

@ -1,8 +1,8 @@
#ifndef WSFSP_OPERATION_READDIR_INTERN_H #ifndef WSFSP_OPERATION_READDIR_INTERN_H
#define WSFSP_OPERATION_READDIR_INTERN_H #define WSFSP_OPERATION_READDIR_INTERN_H
#include "wsfsp/operation/readdir.h" #include "wsfs/provider/operation/readdir.h"
#include "wsfsp/provider_intern.h" #include "wsfs/provider/provider_intern.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"

View File

@ -1,15 +1,15 @@
#include "wsfsp/provider_intern.h" #include "wsfs/provider/provider_intern.h"
#include <stdbool.h> #include <stdbool.h>
#include <string.h> #include <string.h>
#include "wsfsp/request.h" #include "wsfs/provider/request.h"
#include "wsfsp/operation/lookup_intern.h" #include "wsfs/provider/operation/lookup_intern.h"
#include "wsfsp/operation/getattr_intern.h" #include "wsfs/provider/operation/getattr_intern.h"
#include "wsfsp/operation/readdir_intern.h" #include "wsfs/provider/operation/readdir_intern.h"
#include "wsfsp/operation/open_intern.h" #include "wsfs/provider/operation/open_intern.h"
#include "wsfsp/operation/close_intern.h" #include "wsfs/provider/operation/close_intern.h"
#include "wsfsp/operation/read_intern.h" #include "wsfs/provider/operation/read_intern.h"
typedef void wsfsp_invoke_fn( typedef void wsfsp_invoke_fn(
struct wsfsp_invokation_context * context, struct wsfsp_invokation_context * context,

View File

@ -1,8 +1,8 @@
#ifndef WSFSP_PROVIDER_INTERN_H #ifndef WSFSP_PROVIDER_INTERN_H
#define WSFSP_PROVIDER_INTERN_H #define WSFSP_PROVIDER_INTERN_H
#include "wsfsp/provider.h" #include "wsfs/provider/provider.h"
#include "wsfsp/request.h" #include "wsfs/provider/request.h"
#include <jansson.h> #include <jansson.h>

View File

@ -1,4 +1,4 @@
#include "wsfsp/request.h" #include "wsfs/provider/request.h"
#include <stdlib.h> #include <stdlib.h>

View File

@ -2,7 +2,7 @@
#define WSFSP_REQUEST_H #define WSFSP_REQUEST_H
#include <jansson.h> #include <jansson.h>
#include "wsfsp/provider.h" #include "wsfs/provider/provider.h"
typedef void wsfsp_request_respond_fn( typedef void wsfsp_request_respond_fn(
json_t * response, json_t * response,

View File

@ -1,4 +1,4 @@
#include "wsfsp/url.h" #include "wsfs/provider/url.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -1,5 +1,5 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "wsfs/fuse_wrapper.h" #include "wsfs/adapter/fuse_wrapper.h"
TEST(libfuse, fuse_req_t_size) TEST(libfuse, fuse_req_t_size)
{ {

View File

@ -1,7 +1,7 @@
#include <string> #include <string>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "wsfs/jsonrpc/response.h" #include "wsfs/adapter/jsonrpc/response.h"
static void wsfs_response_parse_str( static void wsfs_response_parse_str(

View File

@ -5,8 +5,8 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include "wsfs/server.h" #include "wsfs/adapter/server.h"
#include "wsfs/server_config.h" #include "wsfs/adapter/server_config.h"
TEST(server, create_dispose) TEST(server, create_dispose)

View File

@ -1,7 +1,7 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "msleep.hpp" #include "msleep.hpp"
#include "wsfs/time/timepoint.h" #include "wsfs/adapter/time/timepoint.h"
using wsfs_test::msleep; using wsfs_test::msleep;

View File

@ -3,8 +3,8 @@
#include <cstddef> #include <cstddef>
#include "msleep.hpp" #include "msleep.hpp"
#include "wsfs/time/timer.h" #include "wsfs/adapter/time/timer.h"
#include "wsfs/time/timeout_manager.h" #include "wsfs/adapter/time/timeout_manager.h"
using std::size_t; using std::size_t;
using wsfs_test::msleep; using wsfs_test::msleep;

View File

@ -1,6 +1,6 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "wsfsp/url.h" #include "wsfs/provider/url.h"
TEST(url, ParseWs) TEST(url, ParseWs)
{ {