1 /*
2  * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
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 MEDIA_TELEPHONY_LISTENER_H
17 #define MEDIA_TELEPHONY_LISTENER_H
18 
19 #include "telephony_observer.h"
20 
21 namespace OHOS {
22 namespace Media {
23 
24 class MediaTelephonyListener : public Telephony::TelephonyObserver {
25 public:
26     MediaTelephonyListener();
27     ~MediaTelephonyListener() override;
28 
29     void OnCallStateUpdated(int32_t slotId, int32_t callState, const std::u16string &phoneNumber) override;
30 
31     void OnSignalInfoUpdated(int32_t slotId,
32                              const std::vector<sptr<OHOS::Telephony::SignalInformation>> &vec) override;
33 
34     void OnNetworkStateUpdated(int32_t slotId, const sptr<OHOS::Telephony::NetworkState> &networkState) override;
35 
36     void OnCellInfoUpdated(int32_t slotId, const std::vector<sptr<OHOS::Telephony::CellInformation>> &vec) override;
37 
38     void OnSimStateUpdated(int32_t slotId, OHOS::Telephony::CardType type, OHOS::Telephony::SimState state,
39                            OHOS::Telephony::LockReason reason) override;
40 
41     void OnCellularDataConnectStateUpdated(int32_t slotId, int32_t dataState, int32_t networkType) override;
42 
43     void OnCellularDataFlowUpdated(int32_t slotId, int32_t dataFlowType) override;
44 
45     void OnCfuIndicatorUpdated(int32_t slotId, bool cfuResult) override;
46 
47     void OnVoiceMailMsgIndicatorUpdated(int32_t slotId, bool voiceMailMsgResult) override;
48 
49     void OnIccAccountUpdated() override;
50 };
51 }
52 }
53 #endif // MEDIA_TELEPHONY_LISTENER_H