version 1.1.1.1.2.12, 2010/06/28 15:18:43
|
version 1.1.1.1.2.16, 2010/07/07 12:29:50
|
Line 109 typedef struct {
|
Line 109 typedef struct {
|
if (val->val.string) { \ |
if (val->val.string) { \ |
val->val_type = string; val->val_len = strlen(v) + 1; \ |
val->val_type = string; val->val_len = strlen(v) + 1; \ |
} } while (0) |
} } while (0) |
#define RPC_SET_BLOB(vl, v, l) do { rpc_val_t *val = (vl); assert(val); val->val_type = blob; \ | #define RPC_SET_BLOB(vl, l) do { rpc_val_t *val = (vl); assert(val); val->val_type = blob; \ |
val->val.blob = (void*) v; val->val_len = l; } while (0) | val->val.blob = NULL; val->val_len = l; } while (0) |
#define RPC_SET_SIZE(vl, v) do { rpc_val_t *val = (vl); assert(val); val->val_type = size; val->val.size = v; \ |
#define RPC_SET_SIZE(vl, v) do { rpc_val_t *val = (vl); assert(val); val->val_type = size; val->val.size = v; \ |
val->val_len = sizeof(size_t); } while (0) |
val->val_len = sizeof(size_t); } while (0) |
#define RPC_SET_OFF(vl, v) do { rpc_val_t *val = (vl); assert(val); val->val_type = offset; val->val.offset = v; \ |
#define RPC_SET_OFF(vl, v) do { rpc_val_t *val = (vl); assert(val); val->val_type = offset; val->val.offset = v; \ |
Line 464 inline int rpc_srv_blobFree(rpc_srv_t * __restrict srv
|
Line 464 inline int rpc_srv_blobFree(rpc_srv_t * __restrict srv
|
* rpc_srv_registerBLOB() Register new BLOB to server |
* rpc_srv_registerBLOB() Register new BLOB to server |
* @srv = RPC Server instance |
* @srv = RPC Server instance |
* @len = BLOB length |
* @len = BLOB length |
* return: -1 error or 0 register ok | * return: NULL error or new registered BLOB |
*/ |
*/ |
rpc_blob_t *rpc_srv_registerBLOB(rpc_srv_t * __restrict srv, size_t len); |
rpc_blob_t *rpc_srv_registerBLOB(rpc_srv_t * __restrict srv, size_t len); |
/* |
/* |
Line 490 int rpc_srv_sendBLOB(rpc_cli_t * __restrict cli, rpc_b
|
Line 490 int rpc_srv_sendBLOB(rpc_cli_t * __restrict cli, rpc_b
|
*/ |
*/ |
int rpc_srv_recvBLOB(rpc_cli_t * __restrict cli, rpc_blob_t * __restrict blob); |
int rpc_srv_recvBLOB(rpc_cli_t * __restrict cli, rpc_blob_t * __restrict blob); |
|
|
|
/* |
|
* rpc_cli_sendBLOB() Send BLOB to server |
|
* @cli = Client instance |
|
* @var = BLOB variable |
|
* @data = BLOB data |
|
* return: -1 error, 0 ok, 1 remote error |
|
*/ |
|
int rpc_cli_sendBLOB(rpc_cli_t * __restrict cli, rpc_val_t * __restrict var, void * __restrict data); |
|
/* |
|
* rpc_cli_recvBLOB() Receive BLOB from server |
|
* @cli = Client instance |
|
* @var = BLOB variable |
|
* @data = BLOB data, must be free after use! |
|
* return: -1 error, 0 ok, >0 unreceived data from server, may be error? |
|
*/ |
|
int rpc_cli_recvBLOB(rpc_cli_t * __restrict cli, rpc_val_t * __restrict var, void ** data); |
|
|
|
|
/* RPC Client side functions */ |
/* RPC Client side functions */ |
|
|
/* |
/* |
Line 530 int rpc_cli_execCall(rpc_cli_t *cli, const char *csMod
|
Line 547 int rpc_cli_execCall(rpc_cli_t *cli, const char *csMod
|
* return: none |
* return: none |
*/ |
*/ |
inline void rpc_cli_freeVals(int args, rpc_val_t *vals); |
inline void rpc_cli_freeVals(int args, rpc_val_t *vals); |
|
|
|
|
|
/* |
|
* rpc_cli_openBLOBClient() Connect to BLOB Server |
|
* @rpccli = RPC Client session |
|
* @Port = Port for bind server, if Port == 0 default port is selected |
|
* return: NULL == error or !=NULL connection to BLOB server established |
|
*/ |
|
rpc_cli_t *rpc_cli_openBLOBClient(rpc_cli_t * __restrict rpccli, u_short Port); |
|
/* |
|
* rpc_cli_closeBLOBClient() Close connection to BLOB server and free resources |
|
* @cli = BLOB Client session |
|
* return: none |
|
*/ |
|
void rpc_cli_closeBLOBClient(rpc_cli_t * __restrict cli); |
|
|
|
|
#endif |
#endif |