mirror of
https://github.com/falk-werner/webfuse-provider
synced 2024-10-27 20:44:10 +00:00
refactor: changed directory structure
This commit is contained in:
parent
528a8ef501
commit
73f15b3790
@ -13,7 +13,7 @@
|
||||
#include "webfuse_provider/impl/dirbuffer.h"
|
||||
#include "webfuse_provider/impl/credentials.h"
|
||||
|
||||
#include "webfuse_provider/impl/util.h"
|
||||
#include "webfuse_provider/impl/util/util.h"
|
||||
|
||||
// respond
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "webfuse_provider/impl/provider.h"
|
||||
#include "webfuse_provider/impl/client_protocol.h"
|
||||
#include "webfuse_provider/impl/client_config.h"
|
||||
#include "webfuse_provider/impl/lws_log.h"
|
||||
#include "webfuse_provider/impl/util/lws_log.h"
|
||||
|
||||
#define WFP_CLIENT_PROTOCOL_COUNT 2
|
||||
|
||||
|
@ -9,11 +9,11 @@
|
||||
#include "webfuse_provider/impl/client_config.h"
|
||||
#include "webfuse_provider/impl/provider.h"
|
||||
#include "webfuse_provider/impl/credentials.h"
|
||||
#include "webfuse_provider/impl/util.h"
|
||||
#include "webfuse_provider/impl/util/util.h"
|
||||
#include "webfuse_provider/impl/message.h"
|
||||
#include "webfuse_provider/impl/message_queue.h"
|
||||
#include "webfuse_provider/impl/container_of.h"
|
||||
#include "webfuse_provider/impl/url.h"
|
||||
#include "webfuse_provider/impl/util/container_of.h"
|
||||
#include "webfuse_provider/impl/util/url.h"
|
||||
#include "webfuse_provider/protocol_names.h"
|
||||
|
||||
#include "webfuse_provider/impl/timer/manager.h"
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "webfuse_provider/impl/provider.h"
|
||||
#include "webfuse_provider/impl/request.h"
|
||||
|
||||
#include "webfuse_provider/impl/slist.h"
|
||||
#include "webfuse_provider/impl/util/slist.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
@ -9,7 +9,7 @@ using std::size_t;
|
||||
#endif
|
||||
|
||||
#include <jansson.h>
|
||||
#include "webfuse_provider/impl/slist.h"
|
||||
#include "webfuse_provider/impl/util/slist.h"
|
||||
|
||||
struct wfp_message
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "webfuse_provider/impl/message_queue.h"
|
||||
#include "webfuse_provider/impl/message.h"
|
||||
#include "webfuse_provider/impl/container_of.h"
|
||||
#include "webfuse_provider/impl/util/container_of.h"
|
||||
|
||||
void wfp_message_queue_cleanup(
|
||||
struct wfp_slist * queue)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "webfuse_provider/impl/operation/close.h"
|
||||
#include <limits.h>
|
||||
#include "webfuse_provider/impl/util.h"
|
||||
#include "webfuse_provider/impl/util/util.h"
|
||||
|
||||
void wfp_impl_close(
|
||||
struct wfp_impl_invokation_context * context,
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "webfuse_provider/impl/operation/error.h"
|
||||
#include "webfuse_provider/impl/request.h"
|
||||
#include "webfuse_provider/impl/util.h"
|
||||
#include "webfuse_provider/impl/util/util.h"
|
||||
|
||||
|
||||
void wfp_impl_getattr(
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "webfuse_provider/impl/operation/error.h"
|
||||
#include "webfuse_provider/impl/request.h"
|
||||
#include "webfuse_provider/impl/util.h"
|
||||
#include "webfuse_provider/impl/util/util.h"
|
||||
|
||||
void wfp_impl_lookup(
|
||||
struct wfp_impl_invokation_context * context,
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "webfuse_provider/impl/operation/open.h"
|
||||
#include "webfuse_provider/impl/operation/error.h"
|
||||
#include "webfuse_provider/impl/request.h"
|
||||
#include "webfuse_provider/impl/util.h"
|
||||
#include "webfuse_provider/impl/util/util.h"
|
||||
|
||||
void wfp_impl_open(
|
||||
struct wfp_impl_invokation_context * context,
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
#include "webfuse_provider/impl/operation/error.h"
|
||||
#include "webfuse_provider/impl/request.h"
|
||||
#include "webfuse_provider/impl/util.h"
|
||||
#include "webfuse_provider/impl/base64.h"
|
||||
#include "webfuse_provider/impl/util/util.h"
|
||||
#include "webfuse_provider/impl/util/base64.h"
|
||||
|
||||
void wfp_impl_read(
|
||||
struct wfp_impl_invokation_context * context,
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "webfuse_provider/impl/operation/error.h"
|
||||
#include "webfuse_provider/impl/dirbuffer.h"
|
||||
#include "webfuse_provider/impl/request.h"
|
||||
#include "webfuse_provider/impl/util.h"
|
||||
#include "webfuse_provider/impl/util/util.h"
|
||||
|
||||
void wfp_impl_readdir(
|
||||
struct wfp_impl_invokation_context * context,
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "webfuse_provider/impl/base64.h"
|
||||
#include "webfuse_provider/impl/util/base64.h"
|
||||
|
||||
static const uint8_t wfp_impl_base64_decode_table[256] = {
|
||||
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
|
@ -1,5 +1,5 @@
|
||||
#ifndef WFP_BASE64_H
|
||||
#define WFP_BASE64_H
|
||||
#ifndef WFP_UTIL_BASE64_H
|
||||
#define WFP_UTILBASE64_H
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <inttypes.h>
|
@ -1,5 +1,5 @@
|
||||
#ifndef WFP_CONTAINER_OF_H
|
||||
#define WFP_CONTAINER_OF_H
|
||||
#ifndef WFP_UTIL_CONTAINER_OF_H
|
||||
#define WFP_UTIL_CONTAINER_OF_H
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <stddef.h>
|
@ -1,4 +1,4 @@
|
||||
#include "webfuse_provider/impl/json_util.h"
|
||||
#include "webfuse_provider/impl/util/json_util.h"
|
||||
|
||||
int wfp_impl_json_get_int(json_t const * object, char const * key, int default_value)
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
#include "webfuse_provider/impl/lws_log.h"
|
||||
#include "webfuse_provider/impl/util/lws_log.h"
|
||||
#include <stdbool.h>
|
||||
#include <libwebsockets.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "webfuse_provider/impl/slist.h"
|
||||
#include "webfuse_provider/impl/util/slist.h"
|
||||
#include <stddef.h>
|
||||
|
||||
void wfp_slist_init(
|
@ -1,5 +1,5 @@
|
||||
#ifndef WFP_SLIST_H
|
||||
#define WFP_SLIST_H
|
||||
#ifndef WFP_UTIL_SLIST_H
|
||||
#define WFP_UTIL_SLIST_H
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <stdbool.h>
|
@ -1,4 +1,4 @@
|
||||
#include "webfuse_provider/impl/url.h"
|
||||
#include "webfuse_provider/impl/util/url.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
@ -1,5 +1,5 @@
|
||||
#ifndef WFP_URL_H
|
||||
#define WFP_URL_H
|
||||
#ifndef WFP_UTIL_URL_H
|
||||
#define WFP_UTIL_URL_H
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <stdbool.h>
|
42
meson.build
42
meson.build
@ -17,14 +17,14 @@ pkg_config = import('pkgconfig')
|
||||
# Webfuse provider
|
||||
|
||||
webfuse_provider_static = static_library('webfuse_provider',
|
||||
'lib/webfuse_provider/impl/slist.c',
|
||||
'lib/webfuse_provider/impl/message.c',
|
||||
'lib/webfuse_provider/impl/message_queue.c',
|
||||
'lib/webfuse_provider/impl/status.c',
|
||||
'lib/webfuse_provider/impl/base64.c',
|
||||
'lib/webfuse_provider/impl/lws_log.c',
|
||||
'lib/webfuse_provider/impl/json_util.c',
|
||||
'lib/webfuse_provider/impl/url.c',
|
||||
'lib/webfuse_provider/impl/util/slist.c',
|
||||
'lib/webfuse_provider/impl/util/base64.c',
|
||||
'lib/webfuse_provider/impl/util/lws_log.c',
|
||||
'lib/webfuse_provider/impl/util/json_util.c',
|
||||
'lib/webfuse_provider/impl/util/url.c',
|
||||
'lib/webfuse_provider/impl/timer/manager.c',
|
||||
'lib/webfuse_provider/impl/timer/timepoint.c',
|
||||
'lib/webfuse_provider/impl/timer/timer.c',
|
||||
@ -100,6 +100,14 @@ test_certs_dep = declare_dependency(
|
||||
sources: [test_server_certs, test_client_certs])
|
||||
|
||||
alltests = executable('alltests',
|
||||
'test/webfuse_provider/test_util/timeout_watcher.cc',
|
||||
'test/webfuse_provider/test_util/ws_server.cc',
|
||||
'test/webfuse_provider/test_util/jansson_test_environment.cc',
|
||||
'test/webfuse_provider/mocks/fake_invokation_context.cc',
|
||||
'test/webfuse_provider/mocks/mock_request.cc',
|
||||
'test/webfuse_provider/mocks/mock_provider_client.cc',
|
||||
'test/webfuse_provider/mocks/mock_provider.cc',
|
||||
'test/webfuse_provider/mocks/mock_jsonrpc_proxy.cc',
|
||||
'test/webfuse_provider/jsonrpc/mock_timer_callback.cc',
|
||||
'test/webfuse_provider/jsonrpc/mock_timer.cc',
|
||||
'test/webfuse_provider/jsonrpc/test_is_request.cc',
|
||||
@ -110,22 +118,14 @@ alltests = executable('alltests',
|
||||
'test/webfuse_provider/jsonrpc/test_response_parser.cc',
|
||||
'test/webfuse_provider/timer/test_timepoint.cc',
|
||||
'test/webfuse_provider/timer/test_timer.cc',
|
||||
'test/webfuse_provider/utils/timeout_watcher.cc',
|
||||
'test/webfuse_provider/utils/ws_server.cc',
|
||||
'test/webfuse_provider/utils/jansson_test_environment.cc',
|
||||
'test/webfuse_provider/mocks/fake_invokation_context.cc',
|
||||
'test/webfuse_provider/mocks/mock_request.cc',
|
||||
'test/webfuse_provider/mocks/mock_provider_client.cc',
|
||||
'test/webfuse_provider/mocks/mock_provider.cc',
|
||||
'test/webfuse_provider/mocks/mock_jsonrpc_proxy.cc',
|
||||
'test/webfuse_provider/core/test_util.cc',
|
||||
'test/webfuse_provider/core/test_container_of.cc',
|
||||
'test/webfuse_provider/core/test_slist.cc',
|
||||
'test/webfuse_provider/core/test_base64.cc',
|
||||
'test/webfuse_provider/core/test_status.cc',
|
||||
'test/webfuse_provider/core/test_message.cc',
|
||||
'test/webfuse_provider/core/test_message_queue.cc',
|
||||
'test/webfuse_provider/core/test_url.cc',
|
||||
'test/webfuse_provider/util/test_util.cc',
|
||||
'test/webfuse_provider/util/test_container_of.cc',
|
||||
'test/webfuse_provider/util/test_slist.cc',
|
||||
'test/webfuse_provider/util/test_base64.cc',
|
||||
'test/webfuse_provider/util/test_status.cc',
|
||||
'test/webfuse_provider/util/test_message.cc',
|
||||
'test/webfuse_provider/util/test_message_queue.cc',
|
||||
'test/webfuse_provider/util/test_url.cc',
|
||||
'test/webfuse_provider/provider/test_client_protocol.cc',
|
||||
'test/webfuse_provider/provider/test_dirbuffer.cc',
|
||||
'test/webfuse_provider/provider/operation/test_close.cc',
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "webfuse_provider/jsonrpc/mock_timer.hpp"
|
||||
#include "webfuse_provider/utils/wrap.hpp"
|
||||
#include "webfuse_provider/test_util/wrap.hpp"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "webfuse_provider/mocks/mock_jsonrpc_proxy.hpp"
|
||||
#include "webfuse_provider/utils/wrap.hpp"
|
||||
#include "webfuse_provider/test_util/wrap.hpp"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "webfuse_provider/mocks/mock_operation_context.hpp"
|
||||
#include "webfuse/utils/wrap.hpp"
|
||||
#include "webfuse/test_util/wrap.hpp"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
@ -3,10 +3,10 @@
|
||||
|
||||
#include <webfuse_provider/client_protocol.h>
|
||||
#include <webfuse_provider/client_config.h>
|
||||
#include "webfuse_provider/utils/ws_server.h"
|
||||
#include "webfuse_provider/test_util/ws_server.h"
|
||||
#include "webfuse_provider/mocks/mock_provider_client.hpp"
|
||||
#include "webfuse_provider/protocol_names.h"
|
||||
#include "webfuse_provider/utils/timeout_watcher.hpp"
|
||||
#include "webfuse_provider/test_util/timeout_watcher.hpp"
|
||||
|
||||
#include <libwebsockets.h>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "webfuse_provider/utils/timeout_watcher.hpp"
|
||||
#include "webfuse_provider/test_util/timeout_watcher.hpp"
|
||||
#include <stdexcept>
|
||||
#include <thread>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "webfuse_provider/utils/ws_server.h"
|
||||
#include "webfuse_provider/impl/lws_log.h"
|
||||
#include "webfuse_provider/test_util/ws_server.h"
|
||||
#include "webfuse_provider/impl/util/lws_log.h"
|
||||
|
||||
#include <libwebsockets.h>
|
||||
#include <thread>
|
@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse_provider/impl/base64.h"
|
||||
#include "webfuse_provider/impl/util/base64.h"
|
||||
|
||||
TEST(Base64, EncodedSize)
|
||||
{
|
@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse_provider/impl/container_of.h"
|
||||
#include "webfuse_provider/impl/util/container_of.h"
|
||||
|
||||
namespace
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse_provider/impl/message_queue.h"
|
||||
#include "webfuse_provider/impl/message.h"
|
||||
#include "webfuse_provider/impl/slist.h"
|
||||
#include "webfuse_provider/impl/util/slist.h"
|
||||
|
||||
namespace
|
||||
{
|
@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse_provider/impl/slist.h"
|
||||
#include "webfuse_provider/impl/util/slist.h"
|
||||
|
||||
TEST(wfp_slist, init)
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "webfuse_provider/impl/url.h"
|
||||
#include "webfuse_provider/impl/util/url.h"
|
||||
|
||||
TEST(url, ParseWs)
|
||||
{
|
@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse_provider/impl/json_util.h"
|
||||
#include "webfuse_provider/impl/util/json_util.h"
|
||||
|
||||
TEST(jsonrpc_util, get_int)
|
||||
{
|
Loading…
Reference in New Issue
Block a user