• 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 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 Ims Config Request
65      *
66      * @param ImsConfigItem
67      * @param value
68      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
69      */
70     int32_t SetImsConfigRequest(ImsConfigItem item, const std::string &value);
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, int32_t value);
80 
81     /**
82      * Get Ims Config Request
83      *
84      * @param ImsConfigItem
85      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
86      */
87     int32_t GetImsConfigRequest(ImsConfigItem item);
88 
89     /**
90      * Set Ims Feature Value Request
91      *
92      * @param FeatureType
93      * @param value
94      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
95      */
96     int32_t SetImsFeatureValueRequest(FeatureType type, int32_t value);
97 
98     /**
99      * Get Ims Feature Value Request
100      *
101      * @param FeatureType Indicate which feature type to query.
102      * @param value Indicate the return value of the query feature type.
103      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
104      */
105     int32_t GetImsFeatureValueRequest(FeatureType type, int32_t &value);
106 
107     /**
108      * Ctrl Camera Request
109      *
110      * @param cameraId
111      * @param callingUid
112      * @param callingPid
113      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
114      */
115     int32_t CtrlCameraRequest(const std::u16string &cameraId, int32_t callingUid, int32_t callingPid);
116 
117     /**
118      * Set Preview Window Request
119      *
120      * @param x
121      * @param y
122      * @param z
123      * @param width
124      * @param height
125      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
126      */
127     int32_t SetPreviewWindowRequest(int32_t x, int32_t y, int32_t z, int32_t width, int32_t height);
128 
129     /**
130      * Set Display Window Request
131      *
132      * @param x
133      * @param y
134      * @param z
135      * @param width
136      * @param height
137      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
138      */
139     int32_t SetDisplayWindowRequest(int32_t x, int32_t y, int32_t z, int32_t width, int32_t height);
140 
141     /**
142      * Set Camera Zoom Request
143      *
144      * @param zoomRatio
145      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
146      */
147     int32_t SetCameraZoomRequest(float zoomRatio);
148 
149     /**
150      * Set Pause Image Request
151      *
152      * @param path
153      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
154      */
155     int32_t SetPauseImageRequest(const std::u16string &path);
156 
157     /**
158      * Set Device Direction Request
159      *
160      * @param rotation
161      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
162      */
163     int32_t SetDeviceDirectionRequest(int32_t rotation);
164 
165     /**
166      * SetMuteRequest
167      *
168      * @param slotId
169      * @param mute
170      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
171      */
172     int32_t SetMuteRequest(int32_t slotId, int32_t mute);
173 
174     /**
175      * GetMuteRequest
176      *
177      * @param slotId
178      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
179      */
180     int32_t GetMuteRequest(int32_t slotId);
181 
182     /**
183      * GetEmergencyCallListRequest
184      *
185      * @param slotId
186      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
187      */
188     int32_t GetEmergencyCallListRequest(int32_t slotId);
189 
190      /**
191      * SetEmergencyCallListRequest
192      *
193      * @param slotId
194      * @param eccVec
195      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
196      */
197     int32_t SetEmergencyCallListRequest(int32_t slotId, std::vector<EmergencyCall>  &eccVec);
198 
199     /**
200      * Update Ims Capabilities
201      *
202      * @param slotId Indicates the card slot index number,
203      * ranging from {@code 0} to the maximum card slot index number supported by the device.
204      * @param imsCapabilityList Indicates the related ims capability
205      * @return Returns TELEPHONY_SUCCESS on success, others on failure.
206      */
207     int32_t UpdateImsCapabilities(int32_t slotId, const ImsCapabilityList &imsCapabilityList);
208 
209 private:
210     ModuleServiceUtils moduleUtils_;
211 };
212 } // namespace Telephony
213 } // namespace OHOS
214 #endif // CELLULAR_CALL_CONFIG_REQUEST_H
215