forked from gozfree/gear-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibrpc_stub.h
50 lines (37 loc) · 1.36 KB
/
librpc_stub.h
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
48
49
50
/******************************************************************************
* Copyright (C) 2014-2015
* file: librpc_stub.h
* author: gozfree <[email protected]>
* created: 2015-10-31 19:09
* updated: 2015-10-31 19:09
******************************************************************************/
#ifndef _LIBRPC_STUB_H_
#define _LIBRPC_STUB_H_
#include "librpc.h"
enum rpc_cmd {
_RPC_TEST = _RPC_USER_BASE,
_RPC_GET_CONNECT_LIST,
_RPC_PEER_POST_MSG,
_RPC_SHELL_HELP,
_RPC_HELLO,
_RPC_CALC,
_RPC_USER_MAX = 255
};
enum rpc_group {
_RPC_GROUP_0 = 0,
_RPC_GROUP_1,
_RPC_GROUP_2,
};
#define RPC_TEST \
BUILD_RPC_MSG_ID(_RPC_GROUP_0, _RPC_NO_RETURN, _RPC_DIR_UP, _RPC_PARSE_JSON, _RPC_TEST)
#define RPC_GET_CONNECT_LIST \
BUILD_RPC_MSG_ID(_RPC_GROUP_0, _RPC_NEED_RETURN, _RPC_DIR_UP, _RPC_PARSE_JSON, _RPC_GET_CONNECT_LIST)
#define RPC_SHELL_HELP \
BUILD_RPC_MSG_ID(_RPC_GROUP_0, _RPC_NEED_RETURN, _RPC_DIR_UP, _RPC_PARSE_JSON, _RPC_SHELL_HELP)
#define RPC_PEER_POST_MSG \
BUILD_RPC_MSG_ID(_RPC_GROUP_0, _RPC_NO_RETURN, _RPC_DIR_UP, _RPC_PARSE_JSON, _RPC_PEER_POST_MSG)
#define RPC_HELLO \
BUILD_RPC_MSG_ID(_RPC_GROUP_0, _RPC_NEED_RETURN, _RPC_DIR_UP, _RPC_PARSE_PROTOBUF, _RPC_HELLO)
#define RPC_CALC \
BUILD_RPC_MSG_ID(_RPC_GROUP_0, _RPC_NEED_RETURN, _RPC_DIR_UP, _RPC_PARSE_JSON, _RPC_CALC)
#endif