mirror of
https://github.com/haiwen/libsearpc.git
synced 2025-08-31 12:27:10 +00:00
1. Rearraged the source tree
2. modified the autotools scripts, "make distcheck" is ok now
This commit is contained in:
59
lib/searpc-server.h
Normal file
59
lib/searpc-server.h
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef SEARPC_SERVER_H
|
||||
#define SEARPC_SERVER_H
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
|
||||
struct _JsonArray;
|
||||
typedef gchar* (*SearpcMarshalFunc) (void *func, struct _JsonArray *param_array,
|
||||
gsize *ret_len);
|
||||
|
||||
/**
|
||||
* searpc_server_init:
|
||||
*
|
||||
* Inititalize searpc server.
|
||||
*/
|
||||
void searpc_server_init ();
|
||||
|
||||
/**
|
||||
* searpc_server_register_marshal:
|
||||
*
|
||||
* For user to extend marshal functions.
|
||||
*/
|
||||
gboolean searpc_server_register_marshal (const gchar *signature,
|
||||
SearpcMarshalFunc marshal);
|
||||
|
||||
/**
|
||||
* searpc_server_register_function:
|
||||
*
|
||||
* Register a rpc function with given signature.
|
||||
*/
|
||||
gboolean searpc_server_register_function (void* func,
|
||||
const gchar *fname,
|
||||
const gchar *signature);
|
||||
|
||||
/**
|
||||
* searpc_server_call_function:
|
||||
* @func: the serialized representation of the function to call.
|
||||
* @len: length of @func.
|
||||
* @ret_len: the length of the returned string.
|
||||
*
|
||||
* Call a registered function @func.
|
||||
*
|
||||
* Returns the serialized representatio of the returned value.
|
||||
*/
|
||||
gchar *searpc_server_call_function (gchar *func, gsize len, gsize *ret_len);
|
||||
|
||||
/**
|
||||
* searpc_compute_signature:
|
||||
* @ret_type: the return type of the function.
|
||||
* @pnum: number of parameters of the function.
|
||||
*
|
||||
* Compute function signature.
|
||||
*/
|
||||
char* searpc_compute_signature (gchar *ret_type, int pnum, ...);
|
||||
|
||||
/* Signatures */
|
||||
#include "searpc-signature.h"
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user