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(); 54 void OnWpsOverlap(int status); 55 void OnWpsTimeOut(int status); 56 void OnWpaConnectionFull(int status); 57 void OnWpaConnectionReject(int status); 58 void OnWpaStaNotifyCallBack(const char *notifyParam); 59 void OnDisConnectReasonCallback(int reason, const char *bssid); 60 61 /** 62 * @Description Get the Supplicant Rpc Client object. 63 * 64 * @return RpcClient* 65 */ 66 RpcClient *GetSupplicantRpcClient(void); 67 68 void OnScanNotify(int status); 69 70 /** 71 * @Description Get the P2p Rpc Client object. 72 * 73 * @return RpcClient* 74 */ 75 RpcClient *GetP2pRpcClient(void); 76 77 void OnP2pConnectSupplicant(int state); 78 void OnP2pDeviceFound(const P2pDeviceInfo *info); 79 void OnP2pDeviceLost(const char *p2pDeviceAddress); 80 void OnP2pGoNegotiationRequest(const char *srcAddress, short passwordId); 81 void OnP2pGoNegotiationSuccess(void); 82 void OnP2pGoNegotiationFailure(int status); 83 void OnP2pInvitationResult(const char *bssid, int status); 84 void OnP2pInvitationReceived(const P2pInvitationInfo *info); 85 void OnP2pGroupFormationSuccess(void); 86 void OnP2pGroupFormationFailure(const char *failureReason); 87 void OnP2pGroupStarted(const P2pGroupInfo *group); 88 void OnP2pGroupRemoved(const char *groupIfName, int isGo); 89 void OnP2pProvisionDiscoveryPbcRequest(const char *p2pDeviceAddress); 90 void OnP2pProvisionDiscoveryPbcResponse(const char *p2pDeviceAddress); 91 void OnP2pProvisionDiscoveryEnterPin(const char *p2pDeviceAddress); 92 void OnP2pProvisionDiscoveryShowPin(const char *p2pDeviceAddress, const char *generatedPin); 93 void OnP2pProvisionDiscoveryFailure(void); 94 void OnP2pFindStopped(void); 95 void OnP2pServiceDiscoveryResponse( 96 const char *srcAddress, short updateIndicator, const unsigned char *tlvs, size_t tlvsLength); 97 void OnP2pStaDeauthorized(const char *p2pDeviceAddress); 98 void OnP2pStaAuthorized(const char *p2pDeviceAddress, const char *p2pGroupAddress); 99 void OnP2pConnectSupplicantFailed(void); 100 void OnP2pServDiscReq(const P2pServDiscReqInfo *info); 101 void OnP2pIfaceCreated(const char *ifName, int isGo); 102 void OnP2pConnectFailed(const char *bssid, int reason); 103 void OnP2pChannelSwitch(int freq); 104 #ifdef __cplusplus 105 } 106 #endif 107 #endif 108