1 /* 2 * Copyright (C) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_WIFI_HAL_CRPC_CHIP_H 17 #define OHOS_WIFI_HAL_CRPC_CHIP_H 18 19 #include "server.h" 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 /** 26 * @Description Parse the context to obtain data. Call the corresponding function 27 * GetWifiChip and assemble the function to obtain data. 28 * 29 * @param server - Pointer to the global structure of the communication server. 30 * @param context - Pointer to the global communication context structure of the server. 31 * @return int - 0 Success, -1 Failed. 32 */ 33 int RpcGetWifiChip(RpcServer *server, Context *context); 34 35 /** 36 * @Description Parse the context to obtain data. Call the corresponding function 37 * GetWifiChipIds and assemble the function to obtain data. 38 * 39 * @param server - Pointer to the global structure of the communication server. 40 * @param context - Pointer to the global communication context structure of the server. 41 * @return int - 0 Success, -1 Failed. 42 */ 43 int RpcGetWifiChipIds(RpcServer *server, Context *context); 44 45 /** 46 * @Description Parse the context to obtain data. Call the corresponding function 47 * GetChipId and assemble the function to obtain data. 48 * 49 * @param server - Pointer to the global structure of the communication server. 50 * @param context - Pointer to the global communication context structure of the server. 51 * @return int - 0 Success, -1 Failed. 52 */ 53 int RpcGetChipId(RpcServer *server, Context *context); 54 55 /** 56 * @Description Parse the context to obtain data. Call the corresponding function 57 * CreateIface and assemble the function to obtain data. 58 * 59 * @param server - Pointer to the global structure of the communication server. 60 * @param context - Pointer to the global communication context structure of the server. 61 * @return int - 0 Success, -1 Failed. 62 */ 63 int RpcCreateIface(RpcServer *server, Context *context); 64 65 /** 66 * @Description Parse the context to obtain data. Call the corresponding function 67 * GetIface and assemble the function to obtain data. 68 * 69 * @param server - Pointer to the global structure of the communication server. 70 * @param context - Pointer to the global communication context structure of the server. 71 * @return int - 0 Success, -1 Failed. 72 */ 73 int RpcGetIface(RpcServer *server, Context *context); 74 75 /** 76 * @Description Parse the context to obtain data. Call the corresponding function 77 * GetIfaceNames and assemble the function to obtain data. 78 * 79 * @param server - Pointer to the global structure of the communication server. 80 * @param context - Pointer to the global communication context structure of the server. 81 * @return int - 0 Success, -1 Failed. 82 */ 83 int RpcGetIfaceNames(RpcServer *server, Context *context); 84 85 /** 86 * @Description Parse the context to obtain data. Call the corresponding function 87 * RemoveIface and assemble the function to obtain data. 88 * 89 * @param server - Pointer to the global structure of the communication server. 90 * @param context - Pointer to the global communication context structure of the server. 91 * @return int - 0 Success, -1 Failed. 92 */ 93 int RpcRemoveIface(RpcServer *server, Context *context); 94 95 /** 96 * @Description Parse the context to obtain data. Call the corresponding function 97 * GetCapabilities and assemble the function to obtain data. 98 * 99 * @param server - Pointer to the global structure of the communication server. 100 * @param context - Pointer to the global communication context structure of the server. 101 * @return int - 0 Success, -1 Failed. 102 */ 103 int RpcGetCapabilities(RpcServer *server, Context *context); 104 105 /** 106 * @Description Parse the context to obtain data. Call the corresponding function 107 * GetSupportedComboModes and assemble the function to obtain data. 108 * 109 * @param server - Pointer to the global structure of the communication server. 110 * @param context - Pointer to the global communication context structure of the server. 111 * @return int - 0 Success, -1 Failed. 112 */ 113 int RpcGetSupportedComboModes(RpcServer *server, Context *context); 114 115 /** 116 * @Description Parse the context to obtain data. Call the corresponding function 117 * ConfigComboModes and assemble the function to obtain data. 118 * 119 * @param server - Pointer to the global structure of the communication server. 120 * @param context - Pointer to the global communication context structure of the server. 121 * @return int - 0 Success, -1 Failed. 122 */ 123 int RpcConfigComboModes(RpcServer *server, Context *context); 124 125 /** 126 * @Description Parse the context to obtain data. Call the corresponding function 127 * GetComboModes and assemble the function to obtain data. 128 * 129 * @param server - Pointer to the global structure of the communication server. 130 * @param context - Pointer to the global communication context structure of the server. 131 * @return int - 0 Success, -1 Failed. 132 */ 133 int RpcGetComboModes(RpcServer *server, Context *context); 134 135 /** 136 * @Description Parse the context to obtain data. Call the corresponding function 137 * RequestFirmwareDebugDump and assemble the function to obtain data. 138 * 139 * @param server - Pointer to the global structure of the communication server. 140 * @param context - Pointer to the global communication context structure of the server. 141 * @return int - 0 Success, -1 Failed. 142 */ 143 int RpcRequestFirmwareDebugDump(RpcServer *server, Context *context); 144 145 /** 146 * @Description Parse the context to obtain data. Call the corresponding function 147 * RpcIsChipSupportDbdc and assemble the function to obtain data. 148 * 149 * @param server - Pointer to the global structure of the communication server. 150 * @param context - Pointer to the global communication context structure of the server. 151 * @return int - 0 Success, -1 Failed. 152 */ 153 int RpcIsChipSupportDbdc(RpcServer *server, Context *context); 154 155 /** 156 * @Description Parse the context to obtain data. Call the corresponding function 157 * RpcIsChipSupportCsa and assemble the function to obtain data. 158 * 159 * @param server - Pointer to the global structure of the communication server. 160 * @param context - Pointer to the global communication context structure of the server. 161 * @return int - 0 Success, -1 Failed. 162 */ 163 int RpcIsChipSupportCsa(RpcServer *server, Context *context); 164 165 /** 166 * @Description Parse the context to obtain data. Call the corresponding function 167 * RpcIsChipSupportRadarDetect and assemble the function to obtain data. 168 * 169 * @param server - Pointer to the global structure of the communication server. 170 * @param context - Pointer to the global communication context structure of the server. 171 * @return int - 0 Success, -1 Failed. 172 */ 173 int RpcIsChipSupportRadarDetect(RpcServer *server, Context *context); 174 175 /** 176 * @Description Parse the context to obtain data. Call the corresponding function 177 * RpcIsChipSupportDfsChannel and assemble the function to obtain data. 178 * 179 * @param server - Pointer to the global structure of the communication server. 180 * @param context - Pointer to the global communication context structure of the server. 181 * @return int - 0 Success, -1 Failed. 182 */ 183 int RpcIsChipSupportDfsChannel(RpcServer *server, Context *context); 184 185 /** 186 * @Description Parse the context to obtain data. Call the corresponding function 187 * RpcIsChipSupportIndoorChannel and assemble the function to obtain data. 188 * 189 * @param server - Pointer to the global structure of the communication server. 190 * @param context - Pointer to the global communication context structure of the server. 191 * @return int - 0 Success, -1 Failed. 192 */ 193 int RpcIsChipSupportIndoorChannel(RpcServer *server, Context *context); 194 #ifdef __cplusplus 195 } 196 #endif 197 #endif