mirror of
https://github.com/haiwen/libsearpc.git
synced 2025-04-27 10:20:49 +00:00
Add support c++ compile (#60)
This commit is contained in:
parent
e72c1158c8
commit
54145b03f4
@ -1,16 +1,20 @@
|
||||
#ifndef SEARPC_CLIENT_H
|
||||
#define SEARPC_CLIENT_H
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <jansson.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef LIBSEARPC_EXPORTS
|
||||
#define LIBSEARPC_API __declspec(dllexport)
|
||||
#else
|
||||
#define LIBSEARPC_API
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <jansson.h>
|
||||
|
||||
#ifndef DFT_DOMAIN
|
||||
#define DFT_DOMAIN g_quark_from_string(G_LOG_DOMAIN)
|
||||
#endif
|
||||
@ -137,5 +141,9 @@ searpc_client_generic_callback (char *retstr, size_t len,
|
||||
#define TRANSPORT_ERROR "Transport Error"
|
||||
#define TRANSPORT_ERROR_CODE 500
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1,12 +1,6 @@
|
||||
#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>
|
||||
@ -16,6 +10,16 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef LIBSEARPC_EXPORTS
|
||||
#define LIBSEARPC_API __declspec(dllexport)
|
||||
#else
|
||||
#define LIBSEARPC_API
|
||||
#endif
|
||||
|
||||
// Implementatin of a searpc transport based on named pipe. It uses unix domain
|
||||
// sockets on linux/osx, and named pipes on windows.
|
||||
//
|
||||
@ -72,4 +76,8 @@ int searpc_named_pipe_client_connect(SearpcNamedPipeClient *client);
|
||||
LIBSEARPC_API
|
||||
void searpc_free_client_with_pipe_transport (SearpcClient *client);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // SEARPC_NAMED_PIPE_TRANSPORT_H
|
||||
|
@ -1,16 +1,20 @@
|
||||
#ifndef SEARPC_SERVER_H
|
||||
#define SEARPC_SERVER_H
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <jansson.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef LIBSEARPC_EXPORTS
|
||||
#define LIBSEARPC_API __declspec(dllexport)
|
||||
#else
|
||||
#define LIBSEARPC_API
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <jansson.h>
|
||||
|
||||
#ifndef DFT_DOMAIN
|
||||
#define DFT_DOMAIN g_quark_from_string(G_LOG_DOMAIN)
|
||||
#endif
|
||||
@ -134,4 +138,8 @@ gchar *searpc_server_call_function (const char *service,
|
||||
LIBSEARPC_API
|
||||
char* searpc_compute_signature (const gchar *ret_type, int pnum, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user