mirror of
https://github.com/haiwen/libsearpc.git
synced 2025-09-18 16:07:05 +00:00
export to generate lib
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
#ifndef SEARPC_NAMED_PIPE_TRANSPORT_H
|
||||
#define SEARPC_NAMED_PIPE_TRANSPORT_H
|
||||
|
||||
#ifdef LIBSEARPC_EXPORTS
|
||||
#define LIBSEARPC_API __declspec(dllexport)
|
||||
#else
|
||||
#define LIBSEARPC_API
|
||||
#endif
|
||||
|
||||
#include <pthread.h>
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
@@ -34,12 +40,15 @@ struct _SearpcNamedPipeServer {
|
||||
GThreadPool *named_pipe_server_thread_pool;
|
||||
};
|
||||
|
||||
typedef struct _SearpcNamedPipeServer SearpcNamedPipeServer;
|
||||
typedef struct _SearpcNamedPipeServer LIBSEARPC_API SearpcNamedPipeServer;
|
||||
|
||||
LIBSEARPC_API
|
||||
SearpcNamedPipeServer* searpc_create_named_pipe_server(const char *path);
|
||||
|
||||
LIBSEARPC_API
|
||||
SearpcNamedPipeServer* searpc_create_named_pipe_server_with_threadpool(const char *path, int named_pipe_server_thread_pool_size);
|
||||
|
||||
LIBSEARPC_API
|
||||
int searpc_named_pipe_server_start(SearpcNamedPipeServer *server);
|
||||
|
||||
// Client side interface.
|
||||
@@ -49,14 +58,18 @@ struct _SearpcNamedPipeClient {
|
||||
SearpcNamedPipe pipe_fd;
|
||||
};
|
||||
|
||||
typedef struct _SearpcNamedPipeClient SearpcNamedPipeClient;
|
||||
typedef struct _SearpcNamedPipeClient LIBSEARPC_API SearpcNamedPipeClient;
|
||||
|
||||
LIBSEARPC_API
|
||||
SearpcNamedPipeClient* searpc_create_named_pipe_client(const char *path);
|
||||
|
||||
LIBSEARPC_API
|
||||
SearpcClient * searpc_client_with_named_pipe_transport(SearpcNamedPipeClient *client, const char *service);
|
||||
|
||||
LIBSEARPC_API
|
||||
int searpc_named_pipe_client_connect(SearpcNamedPipeClient *client);
|
||||
|
||||
LIBSEARPC_API
|
||||
void searpc_free_client_with_pipe_transport (SearpcClient *client);
|
||||
|
||||
#endif // SEARPC_NAMED_PIPE_TRANSPORT_H
|
||||
|
Reference in New Issue
Block a user