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 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 * Ctrl Camera Request 118 * 119 * @param cameraId 120 * @param callingUid 121 * @param callingPid 122 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 123 */ 124 int32_t CtrlCameraRequest(const std::u16string &cameraId, int32_t callingUid, int32_t callingPid); 125 126 /** 127 * Set Preview Window Request 128 * 129 * @param x 130 * @param y 131 * @param z 132 * @param width 133 * @param height 134 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 135 */ 136 int32_t SetPreviewWindowRequest(int32_t x, int32_t y, int32_t z, int32_t width, int32_t height); 137 138 /** 139 * Set Display Window Request 140 * 141 * @param x 142 * @param y 143 * @param z 144 * @param width 145 * @param height 146 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 147 */ 148 int32_t SetDisplayWindowRequest(int32_t x, int32_t y, int32_t z, int32_t width, int32_t height); 149 150 /** 151 * Set Camera Zoom Request 152 * 153 * @param zoomRatio 154 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 155 */ 156 int32_t SetCameraZoomRequest(float zoomRatio); 157 158 /** 159 * Set Pause Image Request 160 * 161 * @param path 162 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 163 */ 164 int32_t SetPauseImageRequest(const std::u16string &path); 165 166 /** 167 * Set Device Direction Request 168 * 169 * @param rotation 170 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 171 */ 172 int32_t SetDeviceDirectionRequest(int32_t rotation); 173 174 /** 175 * SetMuteRequest 176 * 177 * @param slotId 178 * @param mute 179 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 180 */ 181 int32_t SetMuteRequest(int32_t slotId, int32_t mute); 182 183 /** 184 * GetMuteRequest 185 * 186 * @param slotId 187 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 188 */ 189 int32_t GetMuteRequest(int32_t slotId); 190 191 /** 192 * GetEmergencyCallListRequest 193 * 194 * @param slotId 195 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 196 */ 197 int32_t GetEmergencyCallListRequest(int32_t slotId); 198 199 /** 200 * SetEmergencyCallListRequest 201 * 202 * @param slotId 203 * @param eccVec 204 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 205 */ 206 int32_t SetEmergencyCallListRequest(int32_t slotId, std::vector<EmergencyCall> &eccVec); 207 208 /** 209 * Update Ims Capabilities 210 * 211 * @param slotId Indicates the card slot index number, 212 * ranging from {@code 0} to the maximum card slot index number supported by the device. 213 * @param imsCapabilityList Indicates the related ims capability 214 * @return Returns TELEPHONY_SUCCESS on success, others on failure. 215 */ 216 int32_t UpdateImsCapabilities(int32_t slotId, const ImsCapabilityList &imsCapabilityList); 217 218 private: 219 ModuleServiceUtils moduleUtils_; 220 }; 221 } // namespace Telephony 222 } // namespace OHOS 223 #endif // CELLULAR_CALL_CONFIG_REQUEST_H 224