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 16 #ifndef I_NET_CONN_CALLBACK_H 17 #define I_NET_CONN_CALLBACK_H 18 19 #include "conn_ipc_interface_code.h" 20 #include "iremote_broker.h" 21 22 #include "net_specifier.h" 23 #include "net_link_info.h" 24 #include "net_handle.h" 25 26 namespace OHOS { 27 namespace NetManagerStandard { 28 class INetConnCallback : public IRemoteBroker { 29 public: 30 virtual ~INetConnCallback() = default; 31 public: 32 DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.NetManagerStandard.INetConnCallback"); 33 34 public: 35 virtual int32_t NetAvailable(sptr<NetHandle> &netHandle) = 0; 36 virtual int32_t NetCapabilitiesChange(sptr<NetHandle> &netHandle, const sptr<NetAllCapabilities> &netAllCap) = 0; 37 virtual int32_t NetConnectionPropertiesChange(sptr<NetHandle> &netHandle, const sptr<NetLinkInfo> &info) = 0; 38 virtual int32_t NetLost(sptr<NetHandle> &netHandle) = 0; 39 virtual int32_t NetUnavailable() = 0; 40 virtual int32_t NetBlockStatusChange(sptr<NetHandle> &netHandle, bool blocked) = 0; 41 }; 42 43 class IPreAirplaneCallback : public IRemoteBroker { 44 public: 45 virtual ~IPreAirplaneCallback() = default; 46 public: 47 DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.NetManagerStandard.IPreAirplaneCallback"); 48 49 public: 50 virtual int32_t PreAirplaneStart() = 0; 51 }; 52 } // namespace NetManagerStandard 53 } // namespace OHOS 54 #endif // I_NET_CONN_CALLBACK_H 55