1 | // SPDX-License-Identifier: GPL-3.0-or-later |
2 | // !! AUTOGENERATED FILE !! |
3 | // This file is generated by protoc-gen-mosrpc, do not edit. |
4 | // Any changes made to this file will be lost. |
5 | |
6 | #pragma once |
7 | |
8 | #if !defined(__MOS_KERNEL__) && defined(__cplusplus) && defined(__MOS_RPC_SERVER__) |
9 | #define __rpc_have_cpp_server__ |
10 | #endif |
11 | |
12 | #if !defined(__MOS_KERNEL__) && defined(__cplusplus) && defined(__MOS_RPC_CLIENT__) |
13 | #define __rpc_have_cpp_client__ |
14 | #endif |
15 | |
16 | // don't expose this to the kernel |
17 | #ifdef __rpc_have_cpp_server__ |
18 | #include <librpc/rpc_server++.hpp> |
19 | #endif |
20 | |
21 | #ifdef __rpc_have_cpp_client__ |
22 | #include <librpc/rpc_client.h> |
23 | #include <string> // HACK |
24 | #endif |
25 | |
26 | #include "proto/filesystem.pb.h" |
27 | |
28 | // UserFS service |
29 | #define USERFS_SERVICE_X(ARGS, PB, xarg) \ |
30 | PB(xarg, 1, mount, MOUNT, mosrpc_fs_mount_request, mosrpc_fs_mount_response) \ |
31 | PB(xarg, 2, readdir, READDIR, mosrpc_fs_readdir_request, mosrpc_fs_readdir_response) \ |
32 | PB(xarg, 3, lookup, LOOKUP, mosrpc_fs_lookup_request, mosrpc_fs_lookup_response) \ |
33 | PB(xarg, 4, readlink, READLINK, mosrpc_fs_readlink_request, mosrpc_fs_readlink_response) \ |
34 | PB(xarg, 5, get_page, GET_PAGE, mosrpc_fs_getpage_request, mosrpc_fs_getpage_response) \ |
35 | PB(xarg, 6, put_page, PUT_PAGE, mosrpc_fs_putpage_request, mosrpc_fs_putpage_response) \ |
36 | PB(xarg, 7, create_file, CREATE_FILE, mosrpc_fs_create_file_request, mosrpc_fs_create_file_response) \ |
37 | PB(xarg, 8, sync_inode, SYNC_INODE, mosrpc_fs_sync_inode_request, mosrpc_fs_sync_inode_response) \ |
38 | PB(xarg, 9, unlink, UNLINK, mosrpc_fs_unlink_request, mosrpc_fs_unlink_response) \ |
39 | PB(xarg, 10, make_dir, MAKE_DIR, mosrpc_fs_make_dir_request, mosrpc_fs_make_dir_response) \ |
40 | /**/ |
41 | |
42 | // Service stubs and interfaces for C++ clients and servers |
43 | #ifdef __rpc_have_cpp_client__ |
44 | RPC_CLIENT_DEFINE_STUB_CLASS(UserFSStub, USERFS_SERVICE_X); |
45 | #endif |
46 | |
47 | #ifdef __rpc_have_cpp_server__ |
48 | RPC_DECL_SERVER_INTERFACE_CLASS(IUserFSService, USERFS_SERVICE_X); |
49 | #endif |
50 | |
51 | #ifdef __MOS_RPC_SERVER__ |
52 | #define MOS_RPC_USERFS_SERVER(name) RPC_DECLARE_SERVER(name, USERFS_SERVICE_X) |
53 | #endif |
54 | |
55 | #ifdef __MOS_RPC_CLIENT__ |
56 | #define MOS_RPC_USERFS_CLIENT(name) RPC_DECLARE_CLIENT(name, USERFS_SERVICE_X) |
57 | #endif |
58 | |
59 | #undef __rpc_have_cpp_server__ |
60 | #undef __rpc_have_cpp_client__ |
61 | |