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 NAPI_TELEPHONY_OBSERVER_H 17 #define NAPI_TELEPHONY_OBSERVER_H 18 19 #include <memory> 20 #include <string> 21 #include <vector> 22 23 #include "signal_information.h" 24 #include "telephony_observer.h" 25 26 namespace OHOS { 27 namespace Telephony { 28 class NapiTelephonyObserver : public TelephonyObserver { 29 public: 30 void OnCallStateUpdated(int32_t slotId, int32_t callState, const std::u16string &phoneNumber) override; 31 void OnSignalInfoUpdated(int32_t slotId, const std::vector<sptr<SignalInformation>> &vec) override; 32 void OnNetworkStateUpdated(int32_t slotId, const sptr<NetworkState> &networkState) override; 33 void OnSimStateUpdated(int32_t slotId, CardType type, SimState state, LockReason reason) override; 34 void OnCellInfoUpdated(int32_t slotId, const std::vector<sptr<CellInformation>> &vec) override; 35 void OnCellularDataConnectStateUpdated(int32_t slotId, int32_t dataState, int32_t networkType) override; 36 void OnCellularDataFlowUpdated(int32_t slotId, int32_t dataFlowType) override; 37 void OnCfuIndicatorUpdated(int32_t slotId, bool cfuResult) override; 38 void OnVoiceMailMsgIndicatorUpdated(int32_t slotId, bool voiceMailMsgResult) override; 39 void OnIccAccountUpdated() override; 40 }; 41 } // namespace Telephony 42 } // namespace OHOS 43 #endif // NAPI_TELEPHONY_OBSERVER_H