mirror of
https://github.com/falk-werner/webfuse-provider
synced 2024-10-27 20:44:10 +00:00
1c9d1c8420
* 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"
29 lines
682 B
C
29 lines
682 B
C
#include "wsfs/adapter/impl/jsonrpc/method_intern.h"
|
|
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
struct wsfs_impl_jsonrpc_method * wsfs_impl_jsonrpc_method_create(
|
|
char const * name,
|
|
wsfs_impl_jsonrpc_method_invoke_fn * invoke,
|
|
void * user_data)
|
|
{
|
|
struct wsfs_impl_jsonrpc_method * method = malloc(sizeof(struct wsfs_impl_jsonrpc_method));
|
|
if (NULL != method)
|
|
{
|
|
method->next = NULL;
|
|
method->name = strdup(name);
|
|
method->invoke = invoke;
|
|
method->user_data = user_data;
|
|
}
|
|
|
|
return method;
|
|
}
|
|
|
|
void wsfs_impl_jsonrpc_method_dispose(
|
|
struct wsfs_impl_jsonrpc_method * method)
|
|
{
|
|
free(method->name);
|
|
free(method);
|
|
}
|