• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
25 namespace OHOS {
26 namespace Telephony {
27 class ConfigRequest : BaseRequest {
28 public:
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 Carrier Vt Config
48      *
49      * @param slotId
50      * @param active
51      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
52      */
53     int32_t SetCarrierVtConfigRequest(int32_t slotId, bool active);
54 
55     /**
56      * Set Lte Ims Switch Status Request
57      *
58      * @param slotId
59      * @param active
60      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
61      */
62     int32_t SetImsSwitchStatusRequest(int32_t slotId, bool active);
63 
64     /**
65      * Get Lte Ims Switch Status Request
66      *
67      * @param slotId
68      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
69      */
70     int32_t GetImsSwitchStatusRequest(int32_t slotId);
71 
72     /**
73      * Set VoNR Switch Status Request
74      *
75      * @param slotId
76      * @param state
77      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
78      */
79     int32_t SetVoNRSwitchStatusRequest(int32_t slotId, int32_t state);
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, const std::string &value);
89 
90     /**
91      * Set Ims Config Request
92      *
93      * @param ImsConfigItem
94      * @param value
95      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
96      */
97     int32_t SetImsConfigRequest(ImsConfigItem item, int32_t value);
98 
99     /**
100      * Get Ims Config Request
101      *
102      * @param ImsConfigItem
103      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
104      */
105     int32_t GetImsConfigRequest(ImsConfigItem item);
106 
107     /**
108      * Set Ims Feature Value Request
109      *
110      * @param FeatureType
111      * @param value
112      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
113      */
114     int32_t SetImsFeatureValueRequest(FeatureType type, int32_t value);
115 
116     /**
117      * Get Ims Feature Value Request
118      *
119      * @param FeatureType Indicate which feature type to query.
120      * @param value Indicate the return value of the query feature type.
121      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
122      */
123     int32_t GetImsFeatureValueRequest(FeatureType type, int32_t &value);
124 
125     /**
126      * SetMuteRequest
127      *
128      * @param slotId
129      * @param mute
130      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
131      */
132     int32_t SetMuteRequest(int32_t slotId, int32_t mute);
133 
134     /**
135      * GetMuteRequest
136      *
137      * @param slotId
138      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
139      */
140     int32_t GetMuteRequest(int32_t slotId);
141 
142     /**
143      * GetEmergencyCallListRequest
144      *
145      * @param slotId
146      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
147      */
148     int32_t GetEmergencyCallListRequest(int32_t slotId);
149 
150      /**
151      * SetEmergencyCallListRequest
152      *
153      * @param slotId
154      * @param eccVec
155      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
156      */
157     int32_t SetEmergencyCallListRequest(int32_t slotId, std::vector<EmergencyCall>  &eccVec);
158 
159     /**
160      * Update Ims Capabilities
161      *
162      * @param slotId Indicates the card slot index number,
163      * ranging from {@code 0} to the maximum card slot index number supported by the device.
164      * @param imsCapabilityList Indicates the related ims capability
165      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
166      */
167     int32_t UpdateImsCapabilities(int32_t slotId, const ImsCapabilityList &imsCapabilityList);
168 
169     /**
170      * @brief Notify operatorconfig changed
171      *
172      * @param slotId Indicates the card slot index number,
173      * ranging from 0 to the maximum card slot index number supported by the device.
174      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
175      */
176     int32_t NotifyOperatorConfigChanged(int32_t slotId, int32_t state);
177 
178     /**
179      * @brief SetVideoCallWaiting IMS SetVideoCallWaiting interface
180      *
181      * @param slotId Indicates the card slot index number,
182      * ranging from 0 to the maximum card slot index number supported by the device.
183      * @param activate Indicates the action for SetVideoCallWaiting,
184      * true, means turn on VideoCallWaiting; false, means turn off VideoCallWaiting.
185      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
186      */
187     int32_t SetVideoCallWaiting(int32_t slotId, bool activate);
188 
189 private:
190     ModuleServiceUtils moduleUtils_;
191 };
192 } // namespace Telephony
193 } // namespace OHOS
194 #endif // CELLULAR_CALL_CONFIG_REQUEST_H
195