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_CLIENT_CALLBACK_H
16 #define OHOS_I_DHCP_CLIENT_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 
26 namespace OHOS {
27 namespace DHCP {
28 #ifdef OHOS_ARCH_LITE
29 class IDhcpClientCallBack {
30 #else
31 class IDhcpClientCallBack : public IRemoteBroker {
32 #endif
33 public:
~IDhcpClientCallBack()34     virtual ~IDhcpClientCallBack() {}
35     virtual void OnIpSuccessChanged(int status, const std::string& ifname, DhcpResult& result) = 0;
36     virtual void OnIpFailChanged(int status, const std::string& ifname, const std::string& reason) = 0;
37 
38 #ifndef OHOS_ARCH_LITE
39     virtual void OnDhcpOfferReport(int status, const std::string& ifname, DhcpResult& result) = 0;
40 public:
41     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.wifi.IDhcpClientCallBack");
42 #endif
43 };
44 }  // namespace DHCP
45 }  // namespace OHOS
46 #endif