8#if !defined(__MOS_KERNEL__) && defined(__cplusplus) && defined(__MOS_RPC_SERVER__)
9#define __rpc_have_cpp_server__
12#if !defined(__MOS_KERNEL__) && defined(__cplusplus) && defined(__MOS_RPC_CLIENT__)
13#define __rpc_have_cpp_client__
17#ifdef __rpc_have_cpp_server__
21#ifdef __rpc_have_cpp_client__
29#define BLOCKDEVMANAGER_SERVICE_X(ARGS, PB, xarg) \
30 PB(xarg, 1, register_device, REGISTER_DEVICE, mosrpc_blockdev_register_device_request, mosrpc_blockdev_register_device_response) \
31 PB(xarg, 2, register_layer_server, REGISTER_LAYER_SERVER, mosrpc_blockdev_register_layer_server_request, mosrpc_blockdev_register_layer_server_response) \
32 PB(xarg, 3, open_device, OPEN_DEVICE, mosrpc_blockdev_open_device_request, mosrpc_blockdev_open_device_response) \
33 PB(xarg, 4, read_block, READ_BLOCK, mosrpc_blockdev_read_block_request, mosrpc_blockdev_read_block_response) \
34 PB(xarg, 5, write_block, WRITE_BLOCK, mosrpc_blockdev_write_block_request, mosrpc_blockdev_write_block_response) \
38#ifdef __rpc_have_cpp_client__
42#ifdef __rpc_have_cpp_server__
46#ifdef __MOS_RPC_SERVER__
47#define MOS_RPC_BLOCKDEVMANAGER_SERVER(name) RPC_DECLARE_SERVER(name, BLOCKDEVMANAGER_SERVICE_X)
50#ifdef __MOS_RPC_CLIENT__
51#define MOS_RPC_BLOCKDEVMANAGER_CLIENT(name) RPC_DECLARE_CLIENT(name, BLOCKDEVMANAGER_SERVICE_X)
55#define BLOCKDEVDEVICE_SERVICE_X(ARGS, PB, xarg) \
56 PB(xarg, 1, read_block, READ_BLOCK, mosrpc_blockdev_read_block_request, mosrpc_blockdev_read_block_response) \
57 PB(xarg, 2, write_block, WRITE_BLOCK, mosrpc_blockdev_write_block_request, mosrpc_blockdev_write_block_response) \
61#ifdef __rpc_have_cpp_client__
65#ifdef __rpc_have_cpp_server__
69#ifdef __MOS_RPC_SERVER__
70#define MOS_RPC_BLOCKDEVDEVICE_SERVER(name) RPC_DECLARE_SERVER(name, BLOCKDEVDEVICE_SERVICE_X)
73#ifdef __MOS_RPC_CLIENT__
74#define MOS_RPC_BLOCKDEVDEVICE_CLIENT(name) RPC_DECLARE_CLIENT(name, BLOCKDEVDEVICE_SERVICE_X)
78#define BLOCKDEVLAYER_SERVICE_X(ARGS, PB, xarg) \
79 PB(xarg, 1, read_partition_block, READ_PARTITION_BLOCK, mosrpc_blockdev_read_partition_block_request, mosrpc_blockdev_read_block_response) \
80 PB(xarg, 2, write_partition_block, WRITE_PARTITION_BLOCK, mosrpc_blockdev_write_partition_block_request, mosrpc_blockdev_write_block_response) \
84#ifdef __rpc_have_cpp_client__
88#ifdef __rpc_have_cpp_server__
92#ifdef __MOS_RPC_SERVER__
93#define MOS_RPC_BLOCKDEVLAYER_SERVER(name) RPC_DECLARE_SERVER(name, BLOCKDEVLAYER_SERVICE_X)
96#ifdef __MOS_RPC_CLIENT__
97#define MOS_RPC_BLOCKDEVLAYER_CLIENT(name) RPC_DECLARE_CLIENT(name, BLOCKDEVLAYER_SERVICE_X)
100#undef __rpc_have_cpp_server__
101#undef __rpc_have_cpp_client__
#define BLOCKDEVLAYER_SERVICE_X(ARGS, PB, xarg)
#define BLOCKDEVDEVICE_SERVICE_X(ARGS, PB, xarg)
#define BLOCKDEVMANAGER_SERVICE_X(ARGS, PB, xarg)
#define RPC_DECL_SERVER_INTERFACE_CLASS(classname, X_MACRO)
#define RPC_CLIENT_DEFINE_STUB_CLASS(_class_name, X_MACRO)