• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_DHCP_RESULT_NOTIFY_H
17 #define OHOS_DHCP_RESULT_NOTIFY_H
18 
19 #include "i_dhcp_result_notify.h"
20 #include "dhcp_define.h"
21 
22 
23 namespace OHOS {
24 namespace Wifi {
25 class DhcpResultNotify : public OHOS::Wifi::IDhcpResultNotify {
26 public:
27     /**
28      * @Description : Construct a new dhcp result notify object
29      *
30      */
31     DhcpResultNotify();
32 
33     /**
34      * @Description : Destroy the dhcp result notify object
35      *
36      */
37     ~DhcpResultNotify() override;
38 
39     /**
40      * @Description:asyn get dhcp result of specified interface success notify
41      *
42      * @param status - int
43      * @param ifname - interface name,eg:wlan0
44      * @param result - dhcp result
45      */
46     void OnSuccess(int status, const std::string& ifname, DhcpResult& result) override;
47 
48     /**
49      * @Description:asyn get dhcp result of specified interface failed notify
50      *
51      * @param status - int
52      * @param ifname - interface name,eg:wlan0
53      * @param reason - failed reason
54      */
55     void OnFailed(int status, const std::string& ifname, const std::string& reason) override;
56 
57     /**
58      * @Description : Get the abnormal exit notify of dhcp server process.
59      *
60      * @param ifname - interface name, eg:wlan0 [in]
61      */
62     void OnSerExitNotify(const std::string& ifname) override;
63 };
64 }  // namespace Wifi
65 }  // namespace OHOS
66 #endif