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_IDL_INNER_INTERFACE_H 17 #define OHOS_WIFI_IDL_INNER_INTERFACE_H 18 19 #include "client.h" 20 #include "i_wifi_struct.h" 21 22 #ifdef __cplusplus 23 extern "C" { 24 #endif 25 26 /** 27 * @Description Get the Ap Rpc Client object. 28 * 29 * @return RpcClient* 30 */ 31 RpcClient *GetApRpcClient(void); 32 33 void OnApStaJoinOrLeave(const CStationInfo *info, int id); 34 void OnApEnableOrDisable(int status, int id); 35 36 /** 37 * @Description Get the Chip Rpc Client object. 38 * 39 * @return RpcClient* 40 */ 41 RpcClient *GetChipRpcClient(void); 42 43 /** 44 * @Description Get the Sta Rpc Client object. 45 * 46 * @return RpcClient* 47 */ 48 RpcClient *GetStaRpcClient(void); 49 50 void OnConnectChanged(int status, int networkId, const char *mac); 51 void OnBssidChanged(const char *reason, const char *bssid); 52 void OnWpaStateChanged(int status); 53 void OnWpaSsidWrongKey(int status); 54 void OnWpsOverlap(int status); 55 void OnWpsTimeOut(int status); 56 void OnWpaConnectionFull(int status); 57 void OnWpaConnectionReject(int status); 58 59 /** 60 * @Description Get the Supplicant Rpc Client object. 61 * 62 * @return RpcClient* 63 */ 64 RpcClient *GetSupplicantRpcClient(void); 65 66 void OnScanNotify(int status); 67 68 /** 69 * @Description Get the P2p Rpc Client object. 70 * 71 * @return RpcClient* 72 */ 73 RpcClient *GetP2pRpcClient(void); 74 75 void OnP2pConnectSupplicant(int state); 76 void OnP2pDeviceFound(const P2pDeviceInfo *info); 77 void OnP2pDeviceLost(const char *p2pDeviceAddress); 78 void OnP2pGoNegotiationRequest(const char *srcAddress, short passwordId); 79 void OnP2pGoNegotiationSuccess(void); 80 void OnP2pGoNegotiationFailure(int status); 81 void OnP2pInvitationResult(const char *bssid, int status); 82 void OnP2pInvitationReceived(const P2pInvitationInfo *info); 83 void OnP2pGroupFormationSuccess(void); 84 void OnP2pGroupFormationFailure(const char *failureReason); 85 void OnP2pGroupStarted(const P2pGroupInfo *group); 86 void OnP2pGroupRemoved(const char *groupIfName, int isGo); 87 void OnP2pProvisionDiscoveryPbcRequest(const char *p2pDeviceAddress); 88 void OnP2pProvisionDiscoveryPbcResponse(const char *p2pDeviceAddress); 89 void OnP2pProvisionDiscoveryEnterPin(const char *p2pDeviceAddress); 90 void OnP2pProvisionDiscoveryShowPin(const char *p2pDeviceAddress, const char *generatedPin); 91 void OnP2pProvisionDiscoveryFailure(void); 92 void OnP2pFindStopped(void); 93 void OnP2pServiceDiscoveryResponse( 94 const char *srcAddress, short updateIndicator, const unsigned char *tlvs, size_t tlvsLength); 95 void OnP2pStaDeauthorized(const char *p2pDeviceAddress); 96 void OnP2pStaAuthorized(const char *p2pDeviceAddress); 97 void OnP2pConnectSupplicantFailed(void); 98 void OnP2pServDiscReq(const P2pServDiscReqInfo *info); 99 void OnP2pIfaceCreated(const char *ifName, int isGo); 100 #ifdef __cplusplus 101 } 102 #endif 103 #endif 104