|
| 1 | +/* |
| 2 | + * FastRPC operating system interface - method definitions |
| 3 | + * |
| 4 | + * Copyright (C) 2025 HexagonRPC Contributors |
| 5 | + * |
| 6 | + * This file is part of HexagonRPC. |
| 7 | + * |
| 8 | + * HexagonRPC is free software: you can redistribute it and/or modify |
| 9 | + * it under the terms of the GNU General Public License as published by |
| 10 | + * the Free Software Foundation, either version 3 of the License, or |
| 11 | + * (at your option) any later version. |
| 12 | + * |
| 13 | + * This program is distributed in the hope that it will be useful, |
| 14 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | + * GNU General Public License for more details. |
| 17 | + * |
| 18 | + * You should have received a copy of the GNU General Public License |
| 19 | + * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 20 | + */ |
| 21 | + |
| 22 | +#include <stdint.h> |
| 23 | +#include <libhexagonrpc/hexagonrpc.h> |
| 24 | + |
| 25 | +static struct hrpc_arg_def_interp4 apps_std_freopen_args[] = { |
| 26 | + { HRPC_ARG_WORD, sizeof(uint32_t) }, |
| 27 | + { HRPC_ARG_OUT_BLOB, sizeof(uint32_t) }, |
| 28 | + { HRPC_ARG_OUT_BLOB_SEQ, sizeof(char) }, |
| 29 | +}; |
| 30 | + |
| 31 | +struct hrpc_method_def_interp4 apps_std_freopen_def = { |
| 32 | + .msg_id = 1, |
| 33 | + .n_args = HRPC_ARRAY_SIZE(apps_std_freopen_args), |
| 34 | + .args = apps_std_freopen_args, |
| 35 | + .n_inner_types = 0, |
| 36 | + .inner_types = NULL, |
| 37 | +}; |
| 38 | + |
| 39 | +static struct hrpc_arg_def_interp4 apps_std_fflush_args[] = { |
| 40 | + { HRPC_ARG_WORD, sizeof(uint32_t) }, |
| 41 | +}; |
| 42 | + |
| 43 | +struct hrpc_method_def_interp4 apps_std_fflush_def = { |
| 44 | + .msg_id = 2, |
| 45 | + .n_args = HRPC_ARRAY_SIZE(apps_std_fflush_args), |
| 46 | + .args = apps_std_fflush_args, |
| 47 | + .n_inner_types = 0, |
| 48 | + .inner_types = NULL, |
| 49 | +}; |
| 50 | + |
| 51 | +static struct hrpc_arg_def_interp4 apps_std_fclose_args[] = { |
| 52 | + { HRPC_ARG_WORD, sizeof(uint32_t) }, |
| 53 | +}; |
| 54 | + |
| 55 | +struct hrpc_method_def_interp4 apps_std_fclose_def = { |
| 56 | + .msg_id = 3, |
| 57 | + .n_args = HRPC_ARRAY_SIZE(apps_std_fclose_args), |
| 58 | + .args = apps_std_fclose_args, |
| 59 | + .n_inner_types = 0, |
| 60 | + .inner_types = NULL, |
| 61 | +}; |
| 62 | + |
| 63 | +static struct hrpc_arg_def_interp4 apps_std_fread_args[] = { |
| 64 | + { HRPC_ARG_WORD, sizeof(uint32_t) }, |
| 65 | + { HRPC_ARG_OUT_BLOB, sizeof(uint32_t) }, |
| 66 | + { HRPC_ARG_OUT_BLOB, sizeof(uint32_t) }, |
| 67 | + { HRPC_ARG_OUT_BLOB_SEQ, sizeof(char) }, |
| 68 | +}; |
| 69 | + |
| 70 | +struct hrpc_method_def_interp4 apps_std_fread_def = { |
| 71 | + .msg_id = 4, |
| 72 | + .n_args = HRPC_ARRAY_SIZE(apps_std_fread_args), |
| 73 | + .args = apps_std_fread_args, |
| 74 | + .n_inner_types = 0, |
| 75 | + .inner_types = NULL, |
| 76 | +}; |
| 77 | + |
| 78 | +static struct hrpc_arg_def_interp4 apps_std_fseek_args[] = { |
| 79 | + { HRPC_ARG_WORD, sizeof(uint32_t) }, |
| 80 | + { HRPC_ARG_WORD, sizeof(uint32_t) }, |
| 81 | + { HRPC_ARG_WORD, sizeof(uint32_t) }, |
| 82 | +}; |
| 83 | + |
| 84 | +struct hrpc_method_def_interp4 apps_std_fseek_def = { |
| 85 | + .msg_id = 9, |
| 86 | + .n_args = HRPC_ARRAY_SIZE(apps_std_fseek_args), |
| 87 | + .args = apps_std_fseek_args, |
| 88 | + .n_inner_types = 0, |
| 89 | + .inner_types = NULL, |
| 90 | +}; |
| 91 | + |
| 92 | +static struct hrpc_arg_def_interp4 apps_std_fopen_with_env_args[] = { |
| 93 | + { HRPC_ARG_BLOB_SEQ, sizeof(char) }, |
| 94 | + { HRPC_ARG_BLOB_SEQ, sizeof(char) }, |
| 95 | + { HRPC_ARG_BLOB_SEQ, sizeof(char) }, |
| 96 | + { HRPC_ARG_BLOB_SEQ, sizeof(char) }, |
| 97 | + { HRPC_ARG_OUT_BLOB, sizeof(uint32_t) }, |
| 98 | +}; |
| 99 | + |
| 100 | +struct hrpc_method_def_interp4 apps_std_fopen_with_env_def = { |
| 101 | + .msg_id = 19, |
| 102 | + .n_args = HRPC_ARRAY_SIZE(apps_std_fopen_with_env_args), |
| 103 | + .args = apps_std_fopen_with_env_args, |
| 104 | + .n_inner_types = 0, |
| 105 | + .inner_types = NULL, |
| 106 | +}; |
| 107 | + |
| 108 | +static struct hrpc_arg_def_interp4 apps_std_opendir_args[] = { |
| 109 | + { HRPC_ARG_BLOB_SEQ, sizeof(char) }, |
| 110 | + { HRPC_ARG_OUT_BLOB, sizeof(uint64_t) }, |
| 111 | +}; |
| 112 | + |
| 113 | +struct hrpc_method_def_interp4 apps_std_opendir_def = { |
| 114 | + .msg_id = 26, |
| 115 | + .n_args = HRPC_ARRAY_SIZE(apps_std_opendir_args), |
| 116 | + .args = apps_std_opendir_args, |
| 117 | + .n_inner_types = 0, |
| 118 | + .inner_types = NULL, |
| 119 | +}; |
| 120 | + |
| 121 | +static struct hrpc_arg_def_interp4 apps_std_closedir_args[] = { |
| 122 | + { HRPC_ARG_WORD, sizeof(uint64_t) }, |
| 123 | +}; |
| 124 | + |
| 125 | +struct hrpc_method_def_interp4 apps_std_closedir_def = { |
| 126 | + .msg_id = 27, |
| 127 | + .n_args = HRPC_ARRAY_SIZE(apps_std_closedir_args), |
| 128 | + .args = apps_std_closedir_args, |
| 129 | + .n_inner_types = 0, |
| 130 | + .inner_types = NULL, |
| 131 | +}; |
| 132 | + |
| 133 | +static struct hrpc_arg_def_interp4 apps_std_readdir_args[] = { |
| 134 | + { HRPC_ARG_WORD, sizeof(uint64_t) }, |
| 135 | + { HRPC_ARG_OUT_BLOB, sizeof(uint32_t) }, |
| 136 | + { HRPC_ARG_OUT_BLOB, sizeof(char) * 256 }, |
| 137 | + { HRPC_ARG_OUT_BLOB, sizeof(uint32_t) }, |
| 138 | +}; |
| 139 | + |
| 140 | +struct hrpc_method_def_interp4 apps_std_readdir_def = { |
| 141 | + .msg_id = 28, |
| 142 | + .n_args = HRPC_ARRAY_SIZE(apps_std_readdir_args), |
| 143 | + .args = apps_std_readdir_args, |
| 144 | + .n_inner_types = 0, |
| 145 | + .inner_types = NULL, |
| 146 | +}; |
| 147 | + |
| 148 | +static struct hrpc_arg_def_interp4 apps_std_mkdir_args[] = { |
| 149 | + { HRPC_ARG_BLOB, sizeof(char) }, |
| 150 | + { HRPC_ARG_WORD, sizeof(uint32_t) }, |
| 151 | +}; |
| 152 | + |
| 153 | +struct hrpc_method_def_interp4 apps_std_mkdir_def = { |
| 154 | + .msg_id = 29, |
| 155 | + .n_args = HRPC_ARRAY_SIZE(apps_std_mkdir_args), |
| 156 | + .args = apps_std_mkdir_args, |
| 157 | + .n_inner_types = 0, |
| 158 | + .inner_types = NULL, |
| 159 | +}; |
| 160 | + |
| 161 | +static struct hrpc_arg_def_interp4 apps_std_stat_args[] = { |
| 162 | + { HRPC_ARG_BLOB_SEQ, sizeof(char) }, |
| 163 | + { HRPC_ARG_OUT_BLOB, sizeof(uint64_t) }, |
| 164 | + { HRPC_ARG_OUT_BLOB, sizeof(uint64_t) }, |
| 165 | + { HRPC_ARG_OUT_BLOB, sizeof(uint64_t) }, |
| 166 | + { HRPC_ARG_OUT_BLOB, sizeof(uint32_t) }, |
| 167 | + { HRPC_ARG_OUT_BLOB, sizeof(uint32_t) }, |
| 168 | + { HRPC_ARG_OUT_BLOB, sizeof(uint64_t) }, |
| 169 | + { HRPC_ARG_OUT_BLOB, sizeof(uint64_t) }, |
| 170 | + { HRPC_ARG_OUT_BLOB, sizeof(uint64_t) }, |
| 171 | + { HRPC_ARG_OUT_BLOB, sizeof(uint64_t) }, |
| 172 | + { HRPC_ARG_OUT_BLOB, sizeof(uint64_t) }, |
| 173 | + { HRPC_ARG_OUT_BLOB, sizeof(uint64_t) }, |
| 174 | + { HRPC_ARG_OUT_BLOB, sizeof(uint64_t) }, |
| 175 | + { HRPC_ARG_OUT_BLOB, sizeof(uint64_t) }, |
| 176 | +}; |
| 177 | + |
| 178 | +struct hrpc_method_def_interp4 apps_std_stat_def = { |
| 179 | + .msg_id = 31, |
| 180 | + .n_args = HRPC_ARRAY_SIZE(apps_std_stat_args), |
| 181 | + .args = apps_std_stat_args, |
| 182 | + .n_inner_types = 0, |
| 183 | + .inner_types = NULL, |
| 184 | +}; |
0 commit comments