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

fixes some invalid uses of extern "C"

This commit is contained in:
Falk Werner 2019-03-24 02:10:03 +01:00
parent d94729c185
commit 6ed438e028
14 changed files with 63 additions and 60 deletions

View File

@ -7,6 +7,11 @@
#include "wsfs/adapter/authenticate.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wsfs_authenticator
{
char * type;
@ -15,11 +20,6 @@ struct wsfs_authenticator
struct wsfs_authenticator * next;
};
#ifdef __cplusplus
extern "C"
{
#endif
extern struct wsfs_authenticator * wsfs_authenticator_create(
char const * type,
wsfs_authenticate_fn * authenticate,

View File

@ -7,6 +7,11 @@
#include "wsfs/adapter/authenticate.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wsfs_authenticator;
struct wsfs_credentials;
@ -15,11 +20,6 @@ struct wsfs_authenticators
struct wsfs_authenticator * first;
};
#ifdef __cplusplus
extern "C"
{
#endif
extern void wsfs_authenticators_init(
struct wsfs_authenticators * authenticators);

View File

@ -3,17 +3,17 @@
#include <jansson.h>
#ifdef __cplusplus
extern "C"
{
#endif
struct wsfs_credentials
{
char * type;
json_t * data;
};
#ifdef __cplusplus
extern "C"
{
#endif
extern void wsfs_impl_credentials_init(
struct wsfs_credentials * credentials,
char const * type,

View File

@ -8,6 +8,11 @@
#include "wsfs/adapter/impl/fuse_wrapper.h"
#include "wsfs/adapter/impl/operations.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wsfs_jsonrpc_server;
struct wsfs_filesystem
@ -18,11 +23,6 @@ struct wsfs_filesystem
struct wsfs_operations_context user_data;
};
#ifdef __cplusplus
extern "C"
{
#endif
extern bool wsfs_filesystem_init(
struct wsfs_filesystem * filesystem,
struct wsfs_jsonrpc_server * rpc,

View File

@ -8,6 +8,10 @@
#include <jansson.h>
#include "wsfs/status.h"
#ifdef __cplusplus
extern "C"
{
#endif
typedef bool wsfs_jsonrpc_method_invoke_fn(
void * user_data,
@ -18,6 +22,9 @@ typedef void wsfs_jsonrpc_method_finished_fn(
wsfs_status status,
struct json_t const * result);
#ifdef __cplusplus
}
#endif

View File

@ -3,6 +3,11 @@
#include "wsfs/adapter/impl/jsonrpc/method.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wsfs_jsonrpc_method
{
struct wsfs_jsonrpc_method * next;
@ -11,11 +16,6 @@ struct wsfs_jsonrpc_method
void * user_data;
};
#ifdef __cplusplus
extern "C"
{
#endif
extern struct wsfs_jsonrpc_method * wsfs_jsonrpc_method_create(
char const * name,
wsfs_jsonrpc_method_invoke_fn * invoke,

View File

@ -11,6 +11,10 @@ using std::size_t;
#include <jansson.h>
#include "wsfs/status.h"
#ifdef __cplusplus
extern "C" {
#endif
struct wsfs_jsonrpc_response
{
wsfs_status status;
@ -18,10 +22,6 @@ struct wsfs_jsonrpc_response
json_t * result;
};
#ifdef __cplusplus
extern "C" {
#endif
extern void wsfs_jsonrpc_response_init(
struct wsfs_jsonrpc_response * response,
char const * buffer,

View File

@ -16,6 +16,9 @@ using std::size_t;
#include "wsfs/adapter/impl/time/timeout_manager.h"
#include "wsfs/adapter/impl/time/timer.h"
#ifdef __cplusplus
extern "C" {
#endif
struct wsfs_jsonrpc_request
{
@ -32,12 +35,6 @@ struct wsfs_jsonrpc_server
struct wsfs_jsonrpc_request request;
};
#ifdef __cplusplus
extern "C"
{
#endif
extern void wsfs_jsonrpc_server_init(
struct wsfs_jsonrpc_server * server,
struct wsfs_timeout_manager * manager);

View File

@ -3,6 +3,10 @@
#include "wsfs/adapter/impl/fuse_wrapper.h"
#ifdef __cplusplus
extern "C" {
#endif
struct wsfs_jsonrpc_server;
struct wsfs_operations_context
@ -11,10 +15,6 @@ struct wsfs_operations_context
double timeout;
};
#ifdef __cplusplus
extern "C" {
#endif
extern void wsfs_operation_lookup (
fuse_req_t req,
fuse_ino_t parent,

View File

@ -1,14 +1,14 @@
#ifndef WSFS_ADAPTER_IMPL_SERVER_H
#define WSFS_ADAPTER_IMPL_SERVER_H
struct wsfs_server;
struct wsfs_server_config;
#ifdef __cplusplus
extern "C"
{
#endif
struct wsfs_server;
struct wsfs_server_config;
extern struct wsfs_server * wsfs_impl_server_create(
struct wsfs_server_config * config);

View File

@ -3,6 +3,10 @@
#include "wsfs/adapter/impl/authenticators.h"
#ifdef __cplusplus
extern "C" {
#endif
struct wsfs_server_config
{
char * mount_point;
@ -14,11 +18,6 @@ struct wsfs_server_config
struct wsfs_authenticators authenticators;
};
#ifdef __cplusplus
extern "C"
{
#endif
extern struct wsfs_server_config * wsfs_impl_server_config_create(void);
extern void wsfs_impl_server_config_dispose(

View File

@ -1,17 +1,17 @@
#ifndef WSFS_ADAPTER_IMPL_TIME_TIMEOUT_MANAGER_H
#define WSFS_ADAPTER_IMPL_TIME_TIMEOUT_MANAGER_H
#ifdef __cplusplus
extern "C"
{
#endif
struct wsfs_timer;
struct wsfs_timeout_manager
{
struct wsfs_timer * timers;
};
#ifdef __cplusplus
extern "C"
{
#endif
extern void wsfs_timeout_manager_init(
struct wsfs_timeout_manager * manager);

View File

@ -8,14 +8,14 @@
#include <cinttypes>
#endif
typedef uint64_t wsfs_timepoint;
typedef int64_t wsfs_timediff;
#ifdef __cplusplus
extern "C"
{
#endif
typedef uint64_t wsfs_timepoint;
typedef int64_t wsfs_timediff;
extern wsfs_timepoint wsfs_timepoint_now(void);
extern wsfs_timepoint wsfs_timepoint_in_msec(

View File

@ -3,6 +3,11 @@
#include "wsfs/adapter/impl/time/timepoint.h"
#ifdef __cplusplus
extern "C"
{
#endif
struct wsfs_timer;
struct wsfs_timeout_manager;
@ -18,11 +23,6 @@ struct wsfs_timer
struct wsfs_timer * prev;
};
#ifdef __cplusplus
extern "C"
{
#endif
extern void wsfs_timer_init(
struct wsfs_timer * timer,
struct wsfs_timeout_manager * manager);