blob: 3d7ea9ab730326a77da516e57dde8930c62a6c02 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#ifndef __AGNI_NBRPC_CALL_H
#define __AGNI_NBRPC_CALL_H
#include <netbytes.h>
#include <mq_ntf.h>
#include "mmm.h"
typedef struct rpc_call_request
{
//rpc
char *method;
char *params;
int id;
//extra params
char *user;
char *mask;
char *server;
} rpc_call_request;
typedef struct rpc_call_response
{
//rpc
char *result;
char *error;
int id;
//extra params
char *user;
char *mask;
char *server;
} rpc_call_response;
rpc_call_request* rpc_call_req_new(char *method, char *params, int id);
rpc_call_response* rpc_call_resp_new(char *result, char *error, int id);
int rpc_call_req_free(rpc_call_request *req);
int rpc_call_resp_free(rpc_call_response *resp);
int rpc_call_req_marsh( rpc_call_request *req, netbyte_store **nb_req);
int rpc_call_resp_marsh( rpc_call_response *resp, netbyte_store **nb_resp);
int rpc_call_req_unmarsh( netbyte_store *nb_req, rpc_call_request **req);
int rpc_call_resp_unmarsh(netbyte_store *nb_resp, rpc_call_response **resp);
#endif
|