1/*
2 * Copyright (C) 2021-2022 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 CELLULAR_CALL_CONFIG_REQUEST_H
17#define CELLULAR_CALL_CONFIG_REQUEST_H
18
19#include "base_request.h"
20#include "ims_feature.h"
21#include "module_service_utils.h"
22#include "telephony_log_wrapper.h"
23#include "telephony_types.h"
24
25namespace OHOS {
26namespace Telephony {
27class ConfigRequest : BaseRequest {
28public:
29    /**
30     * Set Domain Preference Mode Request
31     *
32     * @param slotId
33     * @param mode
34     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
35     */
36    int32_t SetDomainPreferenceModeRequest(int32_t slotId, int32_t mode);
37
38    /**
39     * Get Domain Preference Mode Request
40     *
41     * @param slotId
42     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
43     */
44    int32_t GetDomainPreferenceModeRequest(int32_t slotId);
45
46    /**
47     * Set Lte Ims Switch Status Request
48     *
49     * @param slotId
50     * @param active
51     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
52     */
53    int32_t SetImsSwitchStatusRequest(int32_t slotId, bool active);
54
55    /**
56     * Get Lte Ims Switch Status Request
57     *
58     * @param slotId
59     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
60     */
61    int32_t GetImsSwitchStatusRequest(int32_t slotId);
62
63    /**
64     * Set VoNR Switch Status Request
65     *
66     * @param slotId
67     * @param state
68     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
69     */
70    int32_t SetVoNRSwitchStatusRequest(int32_t slotId, int32_t state);
71
72    /**
73     * Set Ims Config Request
74     *
75     * @param ImsConfigItem
76     * @param value
77     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
78     */
79    int32_t SetImsConfigRequest(ImsConfigItem item, const std::string &value);
80
81    /**
82     * Set Ims Config Request
83     *
84     * @param ImsConfigItem
85     * @param value
86     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
87     */
88    int32_t SetImsConfigRequest(ImsConfigItem item, int32_t value);
89
90    /**
91     * Get Ims Config Request
92     *
93     * @param ImsConfigItem
94     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
95     */
96    int32_t GetImsConfigRequest(ImsConfigItem item);
97
98    /**
99     * Set Ims Feature Value Request
100     *
101     * @param FeatureType
102     * @param value
103     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
104     */
105    int32_t SetImsFeatureValueRequest(FeatureType type, int32_t value);
106
107    /**
108     * Get Ims Feature Value Request
109     *
110     * @param FeatureType Indicate which feature type to query.
111     * @param value Indicate the return value of the query feature type.
112     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
113     */
114    int32_t GetImsFeatureValueRequest(FeatureType type, int32_t &value);
115
116    /**
117     * SetMuteRequest
118     *
119     * @param slotId
120     * @param mute
121     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
122     */
123    int32_t SetMuteRequest(int32_t slotId, int32_t mute);
124
125    /**
126     * GetMuteRequest
127     *
128     * @param slotId
129     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
130     */
131    int32_t GetMuteRequest(int32_t slotId);
132
133    /**
134     * GetEmergencyCallListRequest
135     *
136     * @param slotId
137     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
138     */
139    int32_t GetEmergencyCallListRequest(int32_t slotId);
140
141     /**
142     * SetEmergencyCallListRequest
143     *
144     * @param slotId
145     * @param eccVec
146     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
147     */
148    int32_t SetEmergencyCallListRequest(int32_t slotId, std::vector<EmergencyCall>  &eccVec);
149
150    /**
151     * Update Ims Capabilities
152     *
153     * @param slotId Indicates the card slot index number,
154     * ranging from {@code 0} to the maximum card slot index number supported by the device.
155     * @param imsCapabilityList Indicates the related ims capability
156     * @return Returns TELEPHONY_SUCCESS on success, others on failure.
157     */
158    int32_t UpdateImsCapabilities(int32_t slotId, const ImsCapabilityList &imsCapabilityList);
159
160private:
161    ModuleServiceUtils moduleUtils_;
162};
163} // namespace Telephony
164} // namespace OHOS
165#endif // CELLULAR_CALL_CONFIG_REQUEST_H
166