1 /* 2 * Copyright (c) 2025 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 NET_EAP_CALLBACK_PROXY_H 17 #define NET_EAP_CALLBACK_PROXY_H 18 19 #include "iremote_proxy.h" 20 #include "inet_register_eap_callback.h" 21 #include "inet_eap_postback_callback.h" 22 23 namespace OHOS { 24 namespace NetManagerStandard { 25 class NetEapPostbackCallbackProxy : public IRemoteProxy<INetEapPostbackCallback> { 26 public: 27 explicit NetEapPostbackCallbackProxy(const sptr<IRemoteObject> &impl); 28 virtual ~NetEapPostbackCallbackProxy(); 29 30 public: 31 int32_t OnEapSupplicantPostback(NetType netType, const sptr<EapData> &eapData) override; 32 33 private: 34 bool WriteInterfaceToken(MessageParcel &data); 35 36 private: 37 static inline BrokerDelegator<NetEapPostbackCallbackProxy> delegator_; 38 }; 39 40 class NetRegisterEapCallbackProxy : public IRemoteProxy<INetRegisterEapCallback> { 41 public: 42 explicit NetRegisterEapCallbackProxy(const sptr<IRemoteObject> &impl); 43 virtual ~NetRegisterEapCallbackProxy(); 44 45 public: 46 int32_t OnRegisterCustomEapCallback(const std::string ®Cmd) override; 47 int32_t OnReplyCustomEapDataEvent(int result, const sptr<EapData> &eapData) override; 48 49 private: 50 bool WriteInterfaceToken(MessageParcel &data); 51 52 private: 53 static inline BrokerDelegator<NetRegisterEapCallbackProxy> delegator_; 54 }; 55 56 } // namespace NetManagerStandard 57 } // namespace OHOS 58 #endif // NET_EAP_CALLBACK_PROXY_H