1 /* 2 * Copyright (C) 2021-2023 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 #ifndef OHOS_I_DHCP_SERVICE__CALLBACK_H 16 #define OHOS_I_DHCP_SERVICE__CALLBACK_H 17 18 #include <string> 19 #ifndef OHOS_ARCH_LITE 20 #include <iremote_broker.h> 21 #include "message_parcel.h" 22 #include "message_option.h" 23 #endif 24 #include "inner_api/include/dhcp_define.h" 25 #include "dhcp_result_event.h" 26 namespace OHOS { 27 namespace DHCP { 28 #ifdef OHOS_ARCH_LITE 29 class IDhcpServerCallBack { 30 #else 31 class IDhcpServerCallBack : public IRemoteBroker { 32 #endif 33 public: ~IDhcpServerCallBack()34 virtual ~IDhcpServerCallBack() {} 35 virtual void OnServerStatusChanged(int status) = 0; 36 virtual void OnServerLeasesChanged(const std::string& ifname, std::vector<std::string>& leases) = 0; 37 virtual void OnServerSerExitChanged(const std::string& ifname) = 0; 38 virtual void OnServerSuccess(const std::string& ifname, std::vector<DhcpStationInfo>& stationInfos) = 0; 39 #ifndef OHOS_ARCH_LITE 40 public: 41 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.wifi.IDhcpServerCallBack"); 42 #endif 43 }; 44 } // namespace DHCP 45 } // namespace OHOS 46 #endif