• 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 I_ETHERNET_SERVICE_H
17 #define I_ETHERNET_SERVICE_H
18 
19 #include <string>
20 #include <vector>
21 
22 #include "iremote_broker.h"
23 #include "iremote_object.h"
24 
25 #include "interface_configuration.h"
26 
27 namespace OHOS {
28 namespace NetManagerStandard {
29 constexpr int32_t GET_CFG_SUC = 1;
30 class IEthernetService : public IRemoteBroker {
31 public:
32     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.NetManagerStandard.IEthernetService");
33     enum {
34         CMD_SET_IF_CFG,
35         CMD_GET_IF_CFG,
36         CMD_IS_ACTIVATE,
37         CMD_GET_ACTIVATE_INTERFACE,
38         CMD_RESET_FACTORY,
39     };
40 
41 public:
42     virtual int32_t SetIfaceConfig(const std::string &iface, sptr<InterfaceConfiguration> &ic) = 0;
43     virtual sptr<InterfaceConfiguration> GetIfaceConfig(const std::string &iface) = 0;
44     virtual int32_t IsIfaceActive(const std::string &iface) = 0;
45     virtual std::vector<std::string> GetAllActiveIfaces() = 0;
46     virtual int32_t ResetFactory() = 0;
47 };
48 } // namespace NetManagerStandard
49 } // namespace OHOS
50 #endif // I_ETHERNET_SERVICE_H