• 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 CALL_MANAGER_INNER_TYPE_H
17 #define CALL_MANAGER_INNER_TYPE_H
18 
19 #include <cstdio>
20 #include <string>
21 #include <vector>
22 #include <ctime>
23 
24 namespace OHOS {
25 namespace Telephony {
26 constexpr int16_t kMaxNumberLen = 100;
27 constexpr int16_t kMaxBundleNameLen = 100;
28 constexpr uint16_t REJECT_CALL_MSG_MAX_LEN = 300;
29 constexpr uint16_t ACCOUNT_NUMBER_MAX_LENGTH = 100;
30 constexpr uint16_t CONNECT_SERVICE_WAIT_TIME = 1000; // ms
31 constexpr int16_t ERR_ID = -1;
32 constexpr int16_t INVALID_CALLID = 0;
33 
34 // call type
35 enum class CallType {
36     TYPE_CS = 0, // CS
37     TYPE_IMS = 1, // IMS
38     TYPE_OTT = 2, // OTT
39     TYPE_ERR_CALL = 3, // OTHER
40 };
41 
42 // call state
43 enum class TelCallState {
44     CALL_STATUS_UNKNOWN = -1,
45     CALL_STATUS_ACTIVE = 0,
46     CALL_STATUS_HOLDING,
47     CALL_STATUS_DIALING,
48     CALL_STATUS_ALERTING,
49     CALL_STATUS_INCOMING,
50     CALL_STATUS_WAITING,
51     CALL_STATUS_DISCONNECTED,
52     CALL_STATUS_DISCONNECTING,
53     CALL_STATUS_IDLE,
54 };
55 
56 enum class TelConferenceState {
57     TEL_CONFERENCE_IDLE = 0,
58     TEL_CONFERENCE_ACTIVE,
59     TEL_CONFERENCE_HOLDING,
60     TEL_CONFERENCE_DISCONNECTING,
61     TEL_CONFERENCE_DISCONNECTED,
62 };
63 
64 // phone type
65 enum class PhoneNetType {
66     PHONE_TYPE_GSM = 1, // gsm
67     PHONE_TYPE_CDMA = 2, // cdma
68 };
69 
70 // call mode
71 enum class VideoStateType {
72     TYPE_VOICE = 0, // Voice
73     TYPE_VIDEO, // Video
74 };
75 
76 enum class DialScene {
77     CALL_NORMAL = 0,
78     CALL_PRIVILEGED,
79     CALL_EMERGENCY,
80 };
81 
82 enum class CallDirection {
83     CALL_DIRECTION_IN = 0,
84     CALL_DIRECTION_OUT,
85     CALL_DIRECTION_UNKNOW,
86 };
87 
88 enum class CallRunningState {
89     CALL_RUNNING_STATE_CREATE = 0, // A new session
90     CALL_RUNNING_STATE_CONNECTING,
91     CALL_RUNNING_STATE_DIALING,
92     CALL_RUNNING_STATE_RINGING,
93     CALL_RUNNING_STATE_ACTIVE,
94     CALL_RUNNING_STATE_HOLD,
95     CALL_RUNNING_STATE_ENDED,
96     CALL_RUNNING_STATE_ENDING,
97 };
98 
99 enum class CallEndedType {
100     UNKNOWN = 0,
101     PHONE_IS_BUSY,
102     INVALID_NUMBER,
103     CALL_ENDED_NORMALLY,
104 };
105 
106 struct SIMCardInfo {
107     int32_t simId; // IccId
108     int32_t country;
109     int32_t state; // SIM card active status
110     PhoneNetType phoneNetType;
111 };
112 
113 enum class DialType {
114     DIAL_CARRIER_TYPE = 0,
115     DIAL_VOICE_MAIL_TYPE,
116     DIAL_OTT_TYPE,
117 };
118 
119 enum class CallStateToApp {
120     /**
121      * Indicates an invalid state, which is used when the call state fails to be obtained.
122      */
123     CALL_STATE_UNKNOWN = -1,
124 
125     /**
126      * Indicates that there is no ongoing call.
127      */
128     CALL_STATE_IDLE = 0,
129 
130     /**
131      * Indicates that an incoming call is ringing or waiting.
132      */
133     CALL_STATE_RINGING = 1,
134 
135     /**
136      * Indicates that a least one call is in the dialing, active, or hold state, and there is no new incoming call
137      * ringing or waiting.
138      */
139     CALL_STATE_OFFHOOK = 2
140 };
141 
142 enum class CallAnswerType {
143     CALL_ANSWER_MISSED = 0,
144     CALL_ANSWER_ACTIVED,
145     CALL_ANSWER_REJECT,
146 };
147 
148 struct CallAttributeInfo {
149     char accountNumber[kMaxNumberLen + 1];
150     char bundleName[kMaxBundleNameLen + 1];
151     bool speakerphoneOn;
152     int32_t accountId;
153     VideoStateType videoState;
154     int64_t startTime; // Call start time
155     bool isEcc;
156     CallType callType;
157     int32_t callId;
158     TelCallState callState;
159     TelConferenceState conferenceState;
160     time_t callBeginTime;
161     time_t callEndTime;
162     time_t ringBeginTime;
163     time_t ringEndTime;
164     CallDirection callDirection;
165     CallAnswerType answerType;
166 };
167 
168 struct CallRecordInfo {
169     int32_t callId;
170     char phoneNumber[kMaxNumberLen + 1];
171     char formattedPhoneNumber[kMaxNumberLen + 1];
172     CallType callType;
173     time_t callBeginTime;
174     time_t callEndTime;
175     uint32_t ringDuration;
176     uint32_t callDuration;
177     CallDirection directionType;
178     CallAnswerType answerType;
179     int32_t countryCode;
180     int32_t slotId;
181 };
182 
183 enum class CallAbilityEventId {
184     EVENT_DIAL_NO_CARRIER = 1,
185     EVENT_INVALID_FDN_NUMBER,
186     EVENT_OTT_FUNCTION_UNSUPPORTED,
187 };
188 
189 struct CallEventInfo {
190     CallAbilityEventId eventId;
191     char phoneNum[kMaxNumberLen + 1];
192     char bundleName[kMaxBundleNameLen + 1];
193 };
194 
195 struct AccountInfo {
196     int32_t accountId;
197     int32_t power;
198     char bundleName[kMaxNumberLen + 1];
199     bool isEnabled;
200 };
201 
202 struct CallReportInfo {
203     int32_t index;
204     char accountNum[kMaxNumberLen + 1]; // call phone number
205     int32_t accountId;
206     CallType callType; // call type: CS、IMS
207     VideoStateType callMode; // call mode: video or audio
208     TelCallState state; // call state
209     int32_t voiceDomain; // 0:CS、1:IMS
210 };
211 
212 struct CallsReportInfo {
213     std::vector<CallReportInfo> callVec;
214     int32_t slotId;
215 };
216 
217 /*
218  * 3GPP TS 24.008
219  * V17.4.0 10.5.4.11 Cause
220  * The purpose of the cause information element is to describe the reason for generating
221  * certain messages, to provide diagnostic information in the event of procedural
222  * errors and to indicate the location of the cause originator.
223  */
224 enum class DisconnectedReason : int32_t {
225     UNASSIGNED_NUMBER = 1,
226     NO_ROUTE_TO_DESTINATION = 3,
227     CHANNEL_UNACCEPTABLE = 6,
228     OPERATOR_DETERMINED_BARRING = 8,
229     CALL_COMPLETED_ELSEWHERE = 13,
230     NORMAL_CALL_CLEARING = 16,
231     USER_BUSY = 17,
232     NO_USER_RESPONDING = 18,
233     USER_ALERTING_NO_ANSWER = 19,
234     CALL_REJECTED = 21,
235     NUMBER_CHANGED = 22,
236     CALL_REJECTED_DUE_TO_FEATURE_AT_THE_DESTINATION = 24,
237     FAILED_PRE_EMPTION = 25,
238     NON_SELECTED_USER_CLEARING = 26,
239     DESTINATION_OUT_OF_ORDER = 27,
240     INVALID_NUMBER_FORMAT = 28,
241     FACILITY_REJECTED = 29,
242     RESPONSE_TO_STATUS_ENQUIRY = 30,
243     NORMAL_UNSPECIFIED = 31,
244     NO_CIRCUIT_CHANNEL_AVAILABLE = 34,
245     NETWORK_OUT_OF_ORDER = 38,
246     TEMPORARY_FAILURE = 41,
247     SWITCHING_EQUIPMENT_CONGESTION = 42,
248     ACCESS_INFORMATION_DISCARDED = 43,
249     REQUEST_CIRCUIT_CHANNEL_NOT_AVAILABLE = 44,
250     RESOURCES_UNAVAILABLE_UNSPECIFIED = 47,
251     QUALITY_OF_SERVICE_UNAVAILABLE = 49,
252     REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
253     INCOMING_CALLS_BARRED_WITHIN_THE_CUG = 55,
254     BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
255     BEARER_CAPABILITY_NOT_PRESENTLY_AVAILABLE = 58,
256     SERVICE_OR_OPTION_NOT_AVAILABLE_UNSPECIFIED = 63,
257     BEARER_SERVICE_NOT_IMPLEMENTED = 65,
258     ACM_EQUALTO_OR_GREATE_THAN_ACMMAX = 68,
259     REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
260     ONLY_RESTRICTED_DIGITAL_INFO_BEARER_CAPABILITY_IS_AVAILABLE = 70,
261     SERVICE_OR_OPTION_NOT_IMPLEMENTED_UNSPECIFIED = 79,
262     INVALID_TRANSACTION_IDENTIFIER_VALUE = 81,
263     USER_NOT_MEMBER_OF_CUG = 87,
264     INCOMPATIBLE_DESTINATION = 88,
265     INVALID_TRANSIT_NETWORK_SELECTION = 91,
266     SEMANTICALLY_INCORRECT_MESSAGE = 95,
267     INVALID_MANDATORY_INFORMATION = 96,
268     MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED = 97,
269     MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
270     INFORMATION_ELEMENT_NON_EXISTENT_OR_NOT_IMPLEMENTED = 99,
271     CONDITIONAL_IE_ERROR = 100,
272     MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
273     RECOVERY_ON_TIMER_EXPIRED = 102,
274     PROTOCOL_ERROR_UNSPECIFIED = 111,
275     INTERWORKING_UNSPECIFIED = 127,
276     CALL_BARRED = 240,
277     FDN_BLOCKED = 241,
278     IMSI_UNKNOWN_IN_VLR = 242,
279     IMEI_NOT_ACCEPTED = 243,
280     DIAL_MODIFIED_TO_USSD = 244, // STK Call Control
281     DIAL_MODIFIED_TO_SS = 245,
282     DIAL_MODIFIED_TO_DIAL = 246,
283     RADIO_OFF = 247, // Radio is OFF
284     OUT_OF_SERVICE = 248, // No cellular coverage
285     NO_VALID_SIM = 249, // No valid SIM is present
286     RADIO_INTERNAL_ERROR = 250, // Internal error at Modem
287     NETWORK_RESP_TIMEOUT = 251, // No response from network
288     NETWORK_REJECT = 252, // Explicit network reject
289     RADIO_ACCESS_FAILURE = 253, // RRC connection failure. Eg.RACH
290     RADIO_LINK_FAILURE = 254, // Radio Link Failure
291     RADIO_LINK_LOST = 255, // Radio link lost due to poor coverage
292     RADIO_UPLINK_FAILURE = 256, // Radio uplink failure
293     RADIO_SETUP_FAILURE = 257, // RRC connection setup failure
294     RADIO_RELEASE_NORMAL = 258, // RRC connection release, normal
295     RADIO_RELEASE_ABNORMAL = 259, // RRC connection release, abnormal
296     ACCESS_CLASS_BLOCKED = 260, // Access class barring
297     NETWORK_DETACH = 261, // Explicit network detach
298     INVALID_PARAMETER = 1025,
299     SIM_NOT_EXIT = 1026,
300     SIM_PIN_NEED = 1027,
301     CALL_NOT_ALLOW = 1029,
302     SIM_INVALID = 1045,
303     FAILED_UNKNOWN = 1279,
304 };
305 
306 struct DisconnectedDetails {
307     DisconnectedReason reason;
308     std::string message;
309 };
310 
311 enum class AudioDevice {
312     DEVICE_EARPIECE = 0,
313     DEVICE_SPEAKER,
314     DEVICE_WIRED_HEADSET,
315     DEVICE_BLUETOOTH_SCO,
316     DEVICE_DISABLE,
317     DEVICE_UNKNOWN,
318 };
319 
320 enum class CellularCallEventType {
321     EVENT_REQUEST_RESULT_TYPE = 0,
322 };
323 
324 enum class RequestResultEventId {
325     INVALID_REQUEST_RESULT_EVENT_ID = -1,
326     RESULT_DIAL_SEND_FAILED = 0,
327     RESULT_DIAL_NO_CARRIER,
328     RESULT_END_SEND_FAILED,
329     RESULT_REJECT_SEND_FAILED,
330     RESULT_ACCEPT_SEND_FAILED,
331     RESULT_HOLD_SEND_FAILED,
332     RESULT_ACTIVE_SEND_FAILED,
333     RESULT_SWAP_SEND_FAILED,
334     RESULT_JOIN_SEND_FAILED,
335     RESULT_SPLIT_SEND_FAILED,
336     RESULT_SUPPLEMENT_SEND_FAILED,
337     RESULT_INVITE_TO_CONFERENCE_SUCCESS,
338     RESULT_INVITE_TO_CONFERENCE_FAILED,
339     RESULT_KICK_OUT_FROM_CONFERENCE_SUCCESS,
340     RESULT_KICK_OUT_FROM_CONFERENCE_FAILED,
341 
342     RESULT_SEND_DTMF_SUCCESS,
343     RESULT_SEND_DTMF_FAILED,
344 
345     RESULT_GET_CURRENT_CALLS_FAILED,
346 
347     RESULT_SET_CALL_PREFERENCE_MODE_SUCCESS,
348     RESULT_SET_CALL_PREFERENCE_MODE_FAILED,
349     RESULT_GET_IMS_CALLS_DATA_FAILED,
350 
351     RESULT_GET_CALL_WAITING_SUCCESS,
352     RESULT_GET_CALL_WAITING_FAILED,
353     RESULT_SET_CALL_WAITING_SUCCESS,
354     RESULT_SET_CALL_WAITING_FAILED,
355     RESULT_GET_CALL_RESTRICTION_SUCCESS,
356     RESULT_GET_CALL_RESTRICTION_FAILED,
357     RESULT_SET_CALL_RESTRICTION_SUCCESS,
358     RESULT_SET_CALL_RESTRICTION_FAILED,
359     RESULT_GET_CALL_TRANSFER_SUCCESS,
360     RESULT_GET_CALL_TRANSFER_FAILED,
361     RESULT_SET_CALL_TRANSFER_SUCCESS,
362     RESULT_SET_CALL_TRANSFER_FAILED,
363     RESULT_SEND_USSD_SUCCESS,
364     RESULT_SEND_USSD_FAILED,
365 
366     RESULT_SET_MUTE_SUCCESS,
367     RESULT_SET_MUTE_FAILED,
368 
369     RESULT_CTRL_CAMERA_SUCCESS,
370     RESULT_CTRL_CAMERA_FAILED,
371     RESULT_SET_PREVIEW_WINDOW_SUCCESS,
372     RESULT_SET_PREVIEW_WINDOW_FAILED,
373     RESULT_SET_DISPLAY_WINDOW_SUCCESS,
374     RESULT_SET_DISPLAY_WINDOW_FAILED,
375     RESULT_SET_CAMERA_ZOOM_SUCCESS,
376     RESULT_SET_CAMERA_ZOOM_FAILED,
377     RESULT_SET_PAUSE_IMAGE_SUCCESS,
378     RESULT_SET_PAUSE_IMAGE_FAILED,
379     RESULT_SET_DEVICE_DIRECTION_SUCCESS,
380     RESULT_SET_DEVICE_DIRECTION_FAILED,
381 };
382 
383 enum class CallResultReportId {
384     START_DTMF_REPORT_ID = 0,
385     STOP_DTMF_REPORT_ID,
386     SEND_USSD_REPORT_ID,
387     GET_IMS_CALL_DATA_REPORT_ID,
388     GET_CALL_WAITING_REPORT_ID,
389     SET_CALL_WAITING_REPORT_ID,
390     GET_CALL_RESTRICTION_REPORT_ID,
391     SET_CALL_RESTRICTION_REPORT_ID,
392     GET_CALL_TRANSFER_REPORT_ID,
393     SET_CALL_TRANSFER_REPORT_ID,
394     GET_CALL_CLIP_ID,
395     GET_CALL_CLIR_ID,
396     SET_CALL_CLIR_ID,
397     START_RTT_REPORT_ID,
398     STOP_RTT_REPORT_ID,
399     GET_IMS_CONFIG_REPORT_ID,
400     SET_IMS_CONFIG_REPORT_ID,
401     GET_IMS_FEATURE_VALUE_REPORT_ID,
402     SET_IMS_FEATURE_VALUE_REPORT_ID,
403     INVITE_TO_CONFERENCE_REPORT_ID,
404     UPDATE_MEDIA_MODE_REPORT_ID,
405 };
406 
407 struct CellularCallEventInfo {
408     CellularCallEventType eventType;
409     RequestResultEventId eventId;
410 };
411 
412 enum class RBTPlayInfo {
413     NETWORK_ALERTING,
414     LOCAL_ALERTING,
415 };
416 
417 struct CallWaitResponse {
418     int32_t result; // 0: ok  other: error
419     int32_t status;
420     int32_t classCw;
421 };
422 
423 struct ClipResponse {
424     int32_t result; // 0: ok  other: error
425     int32_t action;
426     int32_t clipStat;
427 };
428 
429 struct ClirResponse {
430     int32_t result; // 0: ok  other: error
431     int32_t action;
432     int32_t clirStat;
433 };
434 
435 struct ColrResponse {
436     int32_t result; // 0: ok  other: error
437     int32_t action;
438     int32_t colrStat;
439 };
440 
441 struct ColpResponse {
442     int32_t result; // 0: ok  other: error
443     int32_t action;
444     int32_t colpStat;
445 };
446 
447 struct MmiCodeInfo {
448     int32_t result;  // 0: ok  other: error
449     char message[kMaxNumberLen + 1];
450 };
451 
452 struct CallTransferResponse {
453     int32_t result; // 0: ok  other: error
454     int32_t status;
455     int32_t classx;
456     int32_t type;
457     char number[kMaxNumberLen + 1];
458     int32_t reason;
459     int32_t time;
460 };
461 
462 struct CallRestrictionResponse {
463     int32_t result; // 0: ok  other: error
464     int32_t status; // parameter sets/shows the result code presentation status in the TA
465     int32_t classCw; // parameter shows the subscriber CLIP service status in the network, <0-4>
466 };
467 
468 struct CallPreferenceResponse {
469     int32_t result; // 0: ok  other: error
470     /*
471      * 1:CS Voice only
472      * 2:CS Voice preferred, IMS PS Voice as secondary
473      * 3:IMS PS Voice preferred, CS Voice as secondary
474      * 4:IMS PS Voice only
475      */
476     int32_t mode;
477 };
478 
479 struct GetImsConfigResponse {
480     int32_t result;
481     int32_t value;
482 };
483 
484 struct GetImsFeatureValueResponse {
485     int32_t result;
486     int32_t value;
487 };
488 
489 struct GetLteEnhanceModeResponse {
490     int32_t result;
491     int32_t value;
492 };
493 
494 struct MuteControlResponse {
495     int32_t result;
496     int32_t value; // 0: Un mute 1: Set mute
497 };
498 
499 struct CellularCallInfo {
500     int32_t callId; // uuid
501     char phoneNum[kMaxNumberLen]; // call phone number
502     int32_t slotId; // del
503     int32_t accountId;
504     CallType callType; // call type: CS、IMS
505     int32_t videoState; // 0: audio 1:video
506     int32_t index; // CallInfo index
507 };
508 
509 /**
510  * 27007-430_2001 7.11	Call forwarding number and conditions +CCFC
511  * 3GPP TS 22.082 [4]
512  * <mode>:
513  * 0	disable
514  * 1	enable
515  * 3	registration
516  * 4	erasure
517  */
518 enum class CallTransferSettingType {
519     CALL_TRANSFER_DISABLE = 0,
520     CALL_TRANSFER_ENABLE = 1,
521     CALL_TRANSFER_REGISTRATION = 3,
522     CALL_TRANSFER_ERASURE = 4,
523 };
524 
525 /**
526  * 27007-430_2001 7.11	Call forwarding number and conditions +CCFC
527  * 3GPP TS 22.082 [4]
528  * <reason>:
529  * 0	unconditional
530  * 1	mobile busy
531  * 2	no reply
532  * 3	not reachable
533  */
534 enum class CallTransferType {
535     TRANSFER_TYPE_UNCONDITIONAL = 0,
536     TRANSFER_TYPE_BUSY = 1,
537     TRANSFER_TYPE_NO_REPLY = 2,
538     TRANSFER_TYPE_NOT_REACHABLE = 3,
539 };
540 
541 struct CallTransferInfo {
542     char transferNum[kMaxNumberLen + 1];
543     CallTransferSettingType settingType;
544     CallTransferType type;
545 };
546 
547 enum class SsRequestType {
548     SS_ACTIVATION = 0,
549     SS_DEACTIVATION,
550     SS_INTERROGATION,
551     SS_REGISTRATION,
552     SS_ERASURE,
553 };
554 
555 struct VideoWindow {
556     int32_t x;
557     int32_t y;
558     int32_t z;
559     int32_t width;
560     int32_t height;
561 };
562 
563 // 3GPP TS 22.030 V4.0.0 (2001-03)
564 // 3GPP TS 22.088 V4.0.0 (2001-03)
565 enum class CallRestrictionType {
566     RESTRICTION_TYPE_ALL_INCOMING = 0,
567     RESTRICTION_TYPE_ALL_OUTGOING,
568     RESTRICTION_TYPE_INTERNATIONAL,
569     RESTRICTION_TYPE_INTERNATIONAL_EXCLUDING_HOME,
570     RESTRICTION_TYPE_ROAMING_INCOMING,
571     RESTRICTION_TYPE_ALL_CALLS,
572     RESTRICTION_TYPE_OUTGOING_SERVICES,
573     RESTRICTION_TYPE_INCOMING_SERVICES,
574 };
575 
576 // 3GPP TS 22.088 V4.0.0 (2001-03)
577 enum class CallRestrictionMode {
578     RESTRICTION_MODE_DEACTIVATION = 0,
579     RESTRICTION_MODE_ACTIVATION = 1,
580 };
581 
582 struct CallRestrictionInfo {
583     char password[kMaxNumberLen + 1];
584     CallRestrictionType fac;
585     CallRestrictionMode mode;
586 };
587 
588 // 3GPP TS 27.007 V3.9.0 (2001-06) Call related supplementary services +CHLD
589 // 3GPP TS 27.007 V3.9.0 (2001-06) 7.22	Informative examples
590 enum CallSupplementType {
591     TYPE_DEFAULT = 0, // default type
592     TYPE_HANG_UP_HOLD_WAIT = 1, // release the held call and the wait call
593     TYPE_HANG_UP_ACTIVE = 2, // release the active call and recover the held call
594     TYPE_HANG_UP_ALL = 3, // release all calls
595 };
596 
597 enum CellularCallReturnType {
598     // 3GPP TS 27.007 V3.9.0 (2001-06) 6.27	Informative examples
599     RETURN_TYPE_MMI = 0,
600 };
601 
602 // 3GPP TS 27.007 V17.3.0 (2021-09) 10.1.35	UE's voice domain preference E-UTRAN +CEVDP
603 enum DomainPreferenceMode {
604     CS_VOICE_ONLY = 1,
605     CS_VOICE_PREFERRED = 2,
606     IMS_PS_VOICE_PREFERRED = 3,
607     IMS_PS_VOICE_ONLY = 4,
608 };
609 
610 enum ImsCallMode {
611     CALL_MODE_AUDIO_ONLY = 0,
612     CALL_MODE_SEND_ONLY,
613     CALL_MODE_RECEIVE_ONLY,
614     CALL_MODE_SEND_RECEIVE,
615     CALL_MODE_VIDEO_PAUSED,
616 };
617 
618 struct CallMediaModeRequest {
619     char phoneNum[kMaxNumberLen + 1];
620     ImsCallMode mode;
621 };
622 
623 struct CallMediaModeResponse {
624     char phoneNum[kMaxNumberLen + 1];
625     int32_t result;
626 };
627 
628 enum ImsConfigItem {
629     /**
630      * video quality
631      *
632      * format: bool
633      */
634     ITEM_VIDEO_QUALITY = 0,
635 
636     /**
637      * 3GPP TS 24.167 V17.1.0 (2020-12) 5.31 /<X>/Mobility_Management_IMS_Voice_Termination
638      * Ims Switch Status
639      *
640      * format: bool
641      * Access Types: Get, Replace
642      * Values: 0, 1
643      * 0 – Mobility Management for IMS Voice Termination disabled.
644      * 1 – Mobility Management for IMS Voice Termination enabled.
645      */
646     ITEM_IMS_SWITCH_STATUS,
647 };
648 
649 enum VideoQualityValue {
650     LOW = 0,
651     HIGH = 1,
652 };
653 
654 enum ImsConfigValue {
655     CONFIG_SUCCESS = 0,
656     CONFIG_FAILED = 1,
657 };
658 
659 enum FeatureType {
660     /**
661      * Official Document IR.92 - IMS Profile for Voice and SMS
662      * Annex C MNO provisioning and Late Customization
663      *
664      * format: bool
665      * 3GPP TS 24.167 V17.1.0 (2020-12) 5.43 /<X>/Media_type_restriction_policy
666      */
667     TYPE_VOICE_OVER_LTE = 0,
668 
669     /**
670      * Official Document IR.92 - IMS Profile for Voice and SMS
671      * Annex C MNO provisioning and Late Customization
672      *
673      * format: bool
674      * 3GPP TS 24.167 V17.1.0 (2020-12) 5.43 /<X>/Media_type_restriction_policy
675      */
676     TYPE_VIDEO_OVER_LTE,
677     TYPE_SS_OVER_UT,
678 };
679 
680 enum class OttCallRequestId {
681     OTT_REQUEST_DIAL = 0,
682     OTT_REQUEST_HANG_UP,
683     OTT_REQUEST_REJECT,
684     OTT_REQUEST_ANSWER,
685     OTT_REQUEST_HOLD,
686     OTT_REQUEST_UN_HOLD,
687     OTT_REQUEST_SWITCH,
688     OTT_REQUEST_COMBINE_CONFERENCE,
689     OTT_REQUEST_SEPARATE_CONFERENCE,
690     OTT_REQUEST_INVITE_TO_CONFERENCE,
691     OTT_REQUEST_UPDATE_CALL_MEDIA_MODE,
692 };
693 
694 struct OttCallRequestInfo {
695     char phoneNum[kMaxNumberLen + 1]; // call phone number
696     char bundleName[kMaxBundleNameLen + 1];
697     VideoStateType videoState; // 0: audio 1:video
698 };
699 
700 struct OttCallDetailsInfo {
701     char phoneNum[kMaxNumberLen + 1]; // call phone number
702     char bundleName[kMaxBundleNameLen + 1];
703     VideoStateType videoState; // 0: audio 1:video
704     TelCallState callState;
705 };
706 
707 enum class OttCallEventId {
708     OTT_CALL_EVENT_FUNCTION_UNSUPPORTED = 0,
709 };
710 
711 struct OttCallEventInfo {
712     OttCallEventId ottCallEventId;
713     char bundleName[kMaxBundleNameLen + 1];
714 };
715 
716 struct CallDetailInfo {
717     int32_t index;
718     char phoneNum[kMaxNumberLen + 1]; // call phone number
719     char bundleName[kMaxBundleNameLen + 1];
720     int32_t accountId;
721     CallType callType; // call type: CS、IMS
722     VideoStateType callMode; // call mode: video or audio
723     TelCallState state; // call state
724     int32_t voiceDomain; // 0:CS、1:IMS
725 };
726 
727 struct CallDetailsInfo {
728     std::vector<CallDetailInfo> callVec;
729     int32_t slotId;
730     char bundleName[kMaxBundleNameLen + 1];
731 };
732 } // namespace Telephony
733 } // namespace OHOS
734 #endif // CALL_MANAGER_INNER_TYPE_H
735