• 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 #include "dhcp_result_notify.h"
17 
18 #include <iostream>
19 
20 namespace OHOS {
21 namespace Wifi {
DhcpResultNotify()22 DhcpResultNotify::DhcpResultNotify()
23 {
24     std::cout << "enter DhcpResultNotify::DhcpResultNotify()..." << std::endl;
25 }
26 
~DhcpResultNotify()27 DhcpResultNotify::~DhcpResultNotify()
28 {
29     std::cout << "enter DhcpResultNotify::~DhcpResultNotify()..." << std::endl;
30 }
31 
OnSuccess(int status,const std::string & ifname,DhcpResult & result)32 void DhcpResultNotify::OnSuccess(int status, const std::string& ifname, DhcpResult& result)
33 {
34     std::cout << "===================enter DhcpResultNotify::OnSuccess()...status:" << status << ",ifname:" << ifname
35         << ", result.iptype:" << result.iptype << ",isOptSuc:" << result.isOptSuc
36         << ",strYourCli:" << result.strYourCli << ",strServer:" << result.strServer << ",strSubnet:" << result.strSubnet
37         << ",strDns1:" << result.strDns1 << ",strDns2:" << result.strDns2
38         << ",strRouter1:" << result.strRouter1 << ",strRouter2:" << result.strRouter2
39         << ",strVendor:" << result.strVendor << ",uLeaseTime:" << result.uLeaseTime
40         << ",uAddTime:" << result.uAddTime << ",uGetTime:" << result.uGetTime << std::endl;
41 }
42 
OnFailed(int status,const std::string & ifname,const std::string & reason)43 void DhcpResultNotify::OnFailed(int status, const std::string& ifname, const std::string& reason)
44 {
45     std::cout << "===================enter DhcpResultNotify::OnFailed()...status:" << status << ",ifname:" << ifname
46         << ", reason:" << reason << std::endl;
47 }
48 
OnSerExitNotify(const std::string & ifname)49 void DhcpResultNotify::OnSerExitNotify(const std::string& ifname)
50 {
51     std::cout << "===================enter DhcpResultNotify::OnSerExitNotify()...ifname:" << ifname << std::endl;
52 }
53 }  // namespace Wifi
54 }  // namespace OHOS