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 TELEPHONY_OBSERVER_PROXY_H 17 #define TELEPHONY_OBSERVER_PROXY_H 18 19 #include "iremote_proxy.h" 20 21 #include "telephony_log_wrapper.h" 22 #include "telephony_observer_broker.h" 23 24 namespace OHOS { 25 namespace Telephony { 26 class TelephonyObserverProxy : public IRemoteProxy<TelephonyObserverBroker> { 27 public: 28 explicit TelephonyObserverProxy(const sptr<IRemoteObject> &impl); 29 virtual ~TelephonyObserverProxy() = default; 30 void OnCallStateUpdated( 31 int32_t slotId, int32_t callState, const std::u16string &phoneNumber); 32 void OnSignalInfoUpdated( 33 int32_t slotId, const std::vector<sptr<SignalInformation>> &vec); 34 void OnNetworkStateUpdated( 35 int32_t slotId, const sptr<NetworkState> &networkState); 36 void OnCellInfoUpdated( 37 int32_t slotId, const std::vector<sptr<CellInformation>> &vec); 38 void OnSimStateUpdated( 39 int32_t slotId, CardType type, SimState state, LockReason reason); 40 void OnCellularDataConnectStateUpdated( 41 int32_t slotId, int32_t dataState, int32_t networkType); 42 void OnCellularDataFlowUpdated( 43 int32_t slotId, int32_t dataFlowType); 44 void OnCfuIndicatorUpdated(int32_t slotId, bool cfuResult); 45 void OnVoiceMailMsgIndicatorUpdated(int32_t slotId, bool voiceMailMsgResult); 46 void OnIccAccountUpdated(); 47 48 private: 49 static inline BrokerDelegator<TelephonyObserverProxy> delegator_; 50 }; 51 } // namespace Telephony 52 } // namespace OHOS 53 #endif // TELEPHONY_OBSERVER_PROXY_H