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_AP_H 17 #define OHOS_WIFI_HAL_CRPC_AP_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 * StartSoftAp 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 RpcStartSoftAp(RpcServer *server, Context *context); 34 35 /** 36 * @Description Parse the context to obtain data. Call the corresponding function 37 * StopSoftAp 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 RpcStopSoftAp(RpcServer *server, Context *context); 44 45 /** 46 * @Description Parse the context to obtain data. Call the corresponding function 47 * SetHostapdConfig 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 RpcSetHostapdConfig(RpcServer *server, Context *context); 54 55 /** 56 * @Description Parse the context to obtain data. Call the corresponding function 57 * GetStaInfos 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 RpcGetStaInfos(RpcServer *server, Context *context); 64 65 /** 66 * @Description Parse the context to obtain data. Call the corresponding function 67 * SetCountryCode 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 RpcSetCountryCode(RpcServer *server, Context *context); 74 75 /** 76 * @Description Parse the context to obtain data. Call the corresponding function 77 * SetMacFilter 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 RpcSetMacFilter(RpcServer *server, Context *context); 84 85 /** 86 * @Description Parse the context to obtain data. Call the corresponding function 87 * DelMacFilter 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 RpcDelMacFilter(RpcServer *server, Context *context); 94 95 /** 96 * @Description Parse the context to obtain data. Call the corresponding function 97 * DisassociateSta 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 RpcDisassociateSta(RpcServer *server, Context *context); 104 105 /** 106 * @Description Parse the context to obtain data. Call the corresponding function 107 * GetValidFrequenciesForBand 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 RpcGetValidFrequenciesForBand(RpcServer *server, Context *context); 114 115 /** 116 * @Description Parse the context to obtain data. Call the corresponding function 117 * SetPowerModel 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 RpcSetPowerModel(RpcServer *server, Context *context); 124 125 /** 126 * @Description Parse the context to obtain data. Call the corresponding function 127 * GetPowerModel 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 RpcGetPowerModel(RpcServer *server, Context *context); 134 #ifdef __cplusplus 135 } 136 #endif 137 #endif