1d95e75fdSopenharmony_ci/*
2d95e75fdSopenharmony_ci * Copyright (C) 2021-2022 Huawei Device Co., Ltd.
3d95e75fdSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4d95e75fdSopenharmony_ci * you may not use this file except in compliance with the License.
5d95e75fdSopenharmony_ci * You may obtain a copy of the License at
6d95e75fdSopenharmony_ci *
7d95e75fdSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8d95e75fdSopenharmony_ci *
9d95e75fdSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10d95e75fdSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11d95e75fdSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12d95e75fdSopenharmony_ci * See the License for the specific language governing permissions and
13d95e75fdSopenharmony_ci * limitations under the License.
14d95e75fdSopenharmony_ci */
15d95e75fdSopenharmony_ci
16d95e75fdSopenharmony_ci#ifndef CELLULAR_CALL_MODULE_SERVICE_UTILS_H
17d95e75fdSopenharmony_ci#define CELLULAR_CALL_MODULE_SERVICE_UTILS_H
18d95e75fdSopenharmony_ci
19d95e75fdSopenharmony_ci#include "iservice_registry.h"
20d95e75fdSopenharmony_ci#include "singleton.h"
21d95e75fdSopenharmony_ci
22d95e75fdSopenharmony_ci#include "ims_call_interface.h"
23d95e75fdSopenharmony_ci#include "network_state.h"
24d95e75fdSopenharmony_ci
25d95e75fdSopenharmony_cinamespace OHOS {
26d95e75fdSopenharmony_cinamespace Telephony {
27d95e75fdSopenharmony_ciclass ModuleServiceUtils : public std::enable_shared_from_this<ModuleServiceUtils> {
28d95e75fdSopenharmony_cipublic:
29d95e75fdSopenharmony_ci    /**
30d95e75fdSopenharmony_ci     * Get Cs Radio state
31d95e75fdSopenharmony_ci     *
32d95e75fdSopenharmony_ci     * @param slotId
33d95e75fdSopenharmony_ci     * @return bool
34d95e75fdSopenharmony_ci     */
35d95e75fdSopenharmony_ci    bool GetRadioState(int32_t slotId);
36d95e75fdSopenharmony_ci
37d95e75fdSopenharmony_ci    /**
38d95e75fdSopenharmony_ci     * Get Network State
39d95e75fdSopenharmony_ci     *
40d95e75fdSopenharmony_ci     * @param slotId
41d95e75fdSopenharmony_ci     * @return Network State
42d95e75fdSopenharmony_ci     */
43d95e75fdSopenharmony_ci    PhoneType GetNetworkStatus(int32_t slotId);
44d95e75fdSopenharmony_ci
45d95e75fdSopenharmony_ci    /**
46d95e75fdSopenharmony_ci     * Get Iso Country Code
47d95e75fdSopenharmony_ci     *
48d95e75fdSopenharmony_ci     * @param slotId
49d95e75fdSopenharmony_ci     * @return Iso Country Code
50d95e75fdSopenharmony_ci     */
51d95e75fdSopenharmony_ci    std::string GetIsoCountryCode(int32_t slotId);
52d95e75fdSopenharmony_ci
53d95e75fdSopenharmony_ci    /**
54d95e75fdSopenharmony_ci     * Get net work Country Code
55d95e75fdSopenharmony_ci     *
56d95e75fdSopenharmony_ci     * @param slotId
57d95e75fdSopenharmony_ci     * @return Network Country Code
58d95e75fdSopenharmony_ci     */
59d95e75fdSopenharmony_ci    std::string GetNetworkCountryCode(int32_t slotId);
60d95e75fdSopenharmony_ci
61d95e75fdSopenharmony_ci    /**
62d95e75fdSopenharmony_ci     * Get IMS Domain Registration State
63d95e75fdSopenharmony_ci     *
64d95e75fdSopenharmony_ci     * @param slotId
65d95e75fdSopenharmony_ci     * @return Whether to register
66d95e75fdSopenharmony_ci     */
67d95e75fdSopenharmony_ci    bool GetImsRegistrationState(int32_t slotId);
68d95e75fdSopenharmony_ci
69d95e75fdSopenharmony_ci    /**
70d95e75fdSopenharmony_ci     * Confirm IMS support UT or not
71d95e75fdSopenharmony_ci     *
72d95e75fdSopenharmony_ci     * @param slotId
73d95e75fdSopenharmony_ci     * @return bool
74d95e75fdSopenharmony_ci     */
75d95e75fdSopenharmony_ci    bool GetImsUtSupportState(int32_t slotId);
76d95e75fdSopenharmony_ci
77d95e75fdSopenharmony_ci    /**
78d95e75fdSopenharmony_ci     * Get Satellite status
79d95e75fdSopenharmony_ci     *
80d95e75fdSopenharmony_ci     * @return Satellite status
81d95e75fdSopenharmony_ci     */
82d95e75fdSopenharmony_ci    bool GetSatelliteStatus();
83d95e75fdSopenharmony_ci
84d95e75fdSopenharmony_ci    /**
85d95e75fdSopenharmony_ci     * Get slot info
86d95e75fdSopenharmony_ci     *
87d95e75fdSopenharmony_ci     * @return slot id
88d95e75fdSopenharmony_ci     */
89d95e75fdSopenharmony_ci    std::vector<int32_t> GetSlotInfo();
90d95e75fdSopenharmony_ci
91d95e75fdSopenharmony_ci    /**
92d95e75fdSopenharmony_ci     * Need to call ImsService
93d95e75fdSopenharmony_ci     *
94d95e75fdSopenharmony_ci     * @return bool
95d95e75fdSopenharmony_ci     */
96d95e75fdSopenharmony_ci    bool NeedCallImsService() const;
97d95e75fdSopenharmony_ci
98d95e75fdSopenharmony_ci    /**
99d95e75fdSopenharmony_ci     * Get ImsService Remote Object
100d95e75fdSopenharmony_ci     *
101d95e75fdSopenharmony_ci     * @return sptr<ImsInterface>
102d95e75fdSopenharmony_ci     */
103d95e75fdSopenharmony_ci    sptr<ImsCallInterface> GetImsServiceRemoteObject() const;
104d95e75fdSopenharmony_ci
105d95e75fdSopenharmony_ci    int32_t GetAirplaneMode(bool &airplaneModeOn);
106d95e75fdSopenharmony_ci
107d95e75fdSopenharmony_ci    int32_t UpdateRadioOn(int32_t slotId);
108d95e75fdSopenharmony_ci
109d95e75fdSopenharmony_ci    RegServiceState GetCsRegState(int32_t slotId);
110d95e75fdSopenharmony_ci
111d95e75fdSopenharmony_ci    RegServiceState GetPsRegState(int32_t slotId);
112d95e75fdSopenharmony_ci};
113d95e75fdSopenharmony_ci} // namespace Telephony
114d95e75fdSopenharmony_ci} // namespace OHOS
115d95e75fdSopenharmony_ci#endif // CELLULAR_CALL_MODULE_SERVICE_UTILS_H
116