/* * Copyright (c) 2021-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef ETHERNET_SERVICE_PROXY_H #define ETHERNET_SERVICE_PROXY_H #include #include "i_ethernet_service.h" #include "iremote_proxy.h" namespace OHOS { namespace NetManagerStandard { class EthernetServiceProxy : public IRemoteProxy { public: explicit EthernetServiceProxy(const sptr &impl) : IRemoteProxy(impl) {} virtual ~EthernetServiceProxy() = default; bool WriteInterfaceToken(MessageParcel &data); int32_t GetMacAddress(std::vector &macAddrList) override; int32_t SetIfaceConfig(const std::string &iface, sptr &ic) override; int32_t GetIfaceConfig(const std::string &iface, sptr &ifaceConfig) override; int32_t IsIfaceActive(const std::string &iface, int32_t &activeStatus) override; int32_t GetAllActiveIfaces(std::vector &activeIfaces) override; int32_t ResetFactory() override; int32_t RegisterIfacesStateChanged(const sptr &callback) override; int32_t UnregisterIfacesStateChanged(const sptr &callback) override; int32_t SetInterfaceUp(const std::string &iface) override; int32_t SetInterfaceDown(const std::string &iface) override; int32_t GetInterfaceConfig(const std::string &iface, OHOS::nmd::InterfaceConfigurationParcel &cfg) override; int32_t SetInterfaceConfig(const std::string &iface, OHOS::nmd::InterfaceConfigurationParcel &cfg) override; private: int32_t SendRequest(MessageParcel &data, const std::string &iface, MessageParcel &reply, uint32_t code); static inline BrokerDelegator delegator_; }; } // namespace NetManagerStandard } // namespace OHOS #endif // ETHERNET_SERVICE_PROXY_H