1/*
2 * Copyright (C) 2021-2023 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/**
17 * @file
18 * @kit TelephonyKit
19 */
20
21import type { AsyncCallback } from './@ohos.base';
22import type Context from './application/BaseContext';
23
24/**
25 * Provides the capabilities and methods for obtaining Short Message Service (SMS) management objects.
26 *
27 * @namespace sms
28 * @syscap SystemCapability.Telephony.SmsMms
29 * @since 6
30 */
31declare namespace sms {
32  /**
33   * Splits a long SMS message into multiple fragments.
34   *
35   * <p>If the length of an SMS message exceeds the maximum length allowed (140 bytes),
36   * the SMS message is split into multiple segments for processing.
37   *
38   * @permission ohos.permission.SEND_MESSAGES
39   * @param { string } content - Indicates the short message content, which cannot be {@code null}.
40   * @param { AsyncCallback<Array<string>> } callback - Indicates the callback for getting a list of split segments,
41   * which can be combined into a complete SMS message;
42   * Returns an empty string if no permission is granted or the short message content is {@code null}.
43   * @throws { BusinessError } 201 - Permission denied.
44   * @throws { BusinessError } 202 - Non-system applications use system APIs.
45   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
46   * Incorrect parameter types.
47   * @throws { BusinessError } 8300001 - Invalid parameter value.
48   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
49   * @throws { BusinessError } 8300003 - System internal error.
50   * @throws { BusinessError } 8300999 - Unknown error code.
51   * @syscap SystemCapability.Telephony.SmsMms
52   * @systemapi Hide this for inner system use.
53   * @since 8
54   */
55  function splitMessage(content: string, callback: AsyncCallback<Array<string>>): void;
56
57  /**
58   * Splits a long SMS message into multiple fragments.
59   *
60   * <p>If the length of an SMS message exceeds the maximum length allowed (140 bytes),
61   * the SMS message is split into multiple segments for processing.
62   *
63   * @permission ohos.permission.SEND_MESSAGES
64   * @param { string } content - Indicates the short message content, which cannot be {@code null}.
65   * @returns { Promise<Array<string>> } Returns a list of split segments, which can be combined into a complete SMS
66   * message; Returns an empty string if no permission is granted or the short message content is {@code null}.
67   * @throws { BusinessError } 201 - Permission denied.
68   * @throws { BusinessError } 202 - Non-system applications use system APIs.
69   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
70   * Incorrect parameter types.
71   * @throws { BusinessError } 8300001 - Invalid parameter value.
72   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
73   * @throws { BusinessError } 8300003 - System internal error.
74   * @throws { BusinessError } 8300999 - Unknown error code.
75   * @syscap SystemCapability.Telephony.SmsMms
76   * @systemapi Hide this for inner system use.
77   * @since 8
78   */
79  function splitMessage(content: string): Promise<Array<string>>;
80
81  /**
82   * Creates an SMS message instance based on the protocol data unit (PDU) and the specified SMS protocol.
83   *
84   * <p>After receiving the original PDU data, the system creates an SMS message instance according to the specified
85   * SMS protocol.
86   *
87   * @param { Array<number> } pdu - Indicates the original data, which is obtained from the received SMS.
88   * @param { string } specification - Indicates the SMS protocol type. The value {@code 3gpp} indicates GSM/UMTS/LTE
89   * SMS, and the value {@code 3gpp2} indicates CDMA/LTE SMS.
90   * @param { AsyncCallback<ShortMessage> } callback - Indicates the callback for getting an SMS message instance;
91   * Returns {@code null} if {@code pdu} is empty or {@code specification} is not supported.
92   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
93   * Incorrect parameter types.
94   * @throws { BusinessError } 8300001 - Invalid parameter value.
95   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
96   * @throws { BusinessError } 8300003 - System internal error.
97   * @throws { BusinessError } 8300999 - Unknown error code.
98   * @syscap SystemCapability.Telephony.SmsMms
99   * @since 6
100   */
101  function createMessage(pdu: Array<number>, specification: string, callback: AsyncCallback<ShortMessage>): void;
102
103  /**
104   * Creates an SMS message instance based on the protocol data unit (PDU) and the specified SMS protocol.
105   *
106   * <p>After receiving the original PDU data, the system creates an SMS message instance according to the specified
107   * SMS protocol.
108   *
109   * @param { Array<number> } pdu - Indicates the original data, which is obtained from the received SMS.
110   * @param { string } specification - Indicates the SMS protocol type. The value {@code 3gpp} indicates GSM/UMTS/LTE
111   * SMS, and the value {@code 3gpp2} indicates CDMA/LTE SMS.
112   * @returns { Promise<ShortMessage> } Returns an SMS message instance;
113   * Returns {@code null} if {@code pdu} is empty or {@code specification} is not supported.
114   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
115   * Incorrect parameter types.
116   * @throws { BusinessError } 8300001 - Invalid parameter value.
117   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
118   * @throws { BusinessError } 8300003 - System internal error.
119   * @throws { BusinessError } 8300999 - Unknown error code.
120   * @syscap SystemCapability.Telephony.SmsMms
121   * @since 6
122   */
123  function createMessage(pdu: Array<number>, specification: string): Promise<ShortMessage>;
124
125  /**
126   * Sends a text or data SMS message.
127   *
128   * <p>This method checks whether the length of an SMS message exceeds the maximum length. If the
129   * maximum length is exceeded, the SMS message is split into multiple parts and sent separately.
130   *
131   * @permission ohos.permission.SEND_MESSAGES
132   * @param { SendMessageOptions } options - Indicates the parameters and callback for sending the SMS message.
133   * @throws { BusinessError } 201 - Permission denied.
134   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
135   * Incorrect parameter types.
136   * @throws { BusinessError } 8300001 - Invalid parameter value.
137   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
138   * @throws { BusinessError } 8300003 - System internal error.
139   * @throws { BusinessError } 8300999 - Unknown error code.
140   * @syscap SystemCapability.Telephony.SmsMms
141   * @since 6
142   * @deprecated since 10
143   * @useinstead telephony.sms#sendShortMessage
144   */
145  function sendMessage(options: SendMessageOptions): void;
146
147  /**
148   * Sends a text or data SMS message.
149   *
150   * <p>This method checks whether the length of an SMS message exceeds the maximum length. If the
151   * maximum length is exceeded, the SMS message is split into multiple parts and sent separately.
152   *
153   * @permission ohos.permission.SEND_MESSAGES
154   * @param { SendMessageOptions } options - Indicates the parameters and callback for sending the SMS message.
155   * @param { AsyncCallback<void> } callback - The callback of sendShortMessage.
156   * @throws { BusinessError } 201 - Permission denied.
157   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
158   * Incorrect parameter types.
159   * @throws { BusinessError } 8300001 - Invalid parameter value.
160   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
161   * @throws { BusinessError } 8300003 - System internal error.
162   * @throws { BusinessError } 8300999 - Unknown error code.
163   * @syscap SystemCapability.Telephony.SmsMms
164   * @since 10
165   */
166  function sendShortMessage(options: SendMessageOptions, callback: AsyncCallback<void>): void;
167
168  /**
169   * Sends a text or data SMS message.
170   *
171   * <p>This method checks whether the length of an SMS message exceeds the maximum length. If the
172   * maximum length is exceeded, the SMS message is split into multiple parts and sent separately.
173   *
174   * @permission ohos.permission.SEND_MESSAGES
175   * @param { SendMessageOptions } options - Indicates the parameters and callback for sending the SMS message.
176   * @returns { Promise<void> } The promise returned by the sendShortMessage.
177   * @throws { BusinessError } 201 - Permission denied.
178   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
179   * Incorrect parameter types.
180   * @throws { BusinessError } 8300001 - Invalid parameter value.
181   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
182   * @throws { BusinessError } 8300003 - System internal error.
183   * @throws { BusinessError } 8300999 - Unknown error code.
184   * @syscap SystemCapability.Telephony.SmsMms
185   * @since 10
186   */
187  function sendShortMessage(options: SendMessageOptions): Promise<void>;
188
189  /**
190   * Sets the default SIM card for sending SMS messages. You can obtain the default SIM card by
191   * using {@code getDefaultSmsSlotId}.
192   *
193   * @permission ohos.permission.SET_TELEPHONY_STATE
194   * @param { number } slotId - Indicates the default SIM card for sending SMS messages. The value {@code 0} indicates
195   * card slot 1, and the value {@code 1} indicates card slot 2.
196   * @param { AsyncCallback<void> } callback - The callback of setDefaultSmsSlotId.
197   * @throws { BusinessError } 201 - Permission denied.
198   * @throws { BusinessError } 202 - Non-system applications use system APIs.
199   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
200   * Incorrect parameter types.
201   * @throws { BusinessError } 8300001 - Invalid parameter value.
202   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
203   * @throws { BusinessError } 8300003 - System internal error.
204   * @throws { BusinessError } 8300004 - Do not have sim card.
205   * @throws { BusinessError } 8300999 - Unknown error code.
206   * @syscap SystemCapability.Telephony.SmsMms
207   * @systemapi Hide this for inner system use.
208   * @since 7
209   */
210  function setDefaultSmsSlotId(slotId: number, callback: AsyncCallback<void>): void;
211
212  /**
213   * Sets the default SIM card for sending SMS messages. You can obtain the default SIM card by
214   * using {@code getDefaultSmsSlotId}.
215   *
216   * @permission ohos.permission.SET_TELEPHONY_STATE
217   * @param { number } slotId - Indicates the default SIM card for sending SMS messages. The value {@code 0} indicates
218   * card slot 1, and the value {@code 1} indicates card slot 2.
219   * @returns { Promise<void> } The promise returned by the setDefaultSmsSlotId.
220   * @throws { BusinessError } 201 - Permission denied.
221   * @throws { BusinessError } 202 - Non-system applications use system APIs.
222   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
223   * Incorrect parameter types.
224   * @throws { BusinessError } 8300001 - Invalid parameter value.
225   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
226   * @throws { BusinessError } 8300003 - System internal error.
227   * @throws { BusinessError } 8300004 - Do not have sim card.
228   * @throws { BusinessError } 8300999 - Unknown error code.
229   * @syscap SystemCapability.Telephony.SmsMms
230   * @systemapi Hide this for inner system use.
231   * @since 7
232   */
233  function setDefaultSmsSlotId(slotId: number): Promise<void>;
234
235  /**
236   * Obtains the default SIM card for sending SMS messages.
237   *
238   * @param { AsyncCallback<number> } callback - Indicates the callback for getting the default SIM card for sending SMS
239   * messages.
240   * Returns {@code 0} if the default SIM card for sending SMS messages is in card slot 1;
241   * Returns {@code 1} if the default SIM card for sending SMS messages is in card slot 2.
242   * @syscap SystemCapability.Telephony.SmsMms
243   * @since 7
244   */
245  function getDefaultSmsSlotId(callback: AsyncCallback<number>): void;
246
247  /**
248   * Obtains the default SIM card for sending SMS messages.
249   *
250   * @returns { Promise<number> } Returns {@code 0} if the default SIM card for sending SMS messages is in card slot 1;
251   * Returns {@code 1} if the default SIM card for sending SMS messages is in card slot 2.
252   * @syscap SystemCapability.Telephony.SmsMms
253   * @since 7
254   */
255  function getDefaultSmsSlotId(): Promise<number>;
256
257  /**
258   * Sets the address for the Short Message Service Center (SMSC) based on a specified slot ID.
259   *
260   * @permission ohos.permission.SET_TELEPHONY_STATE
261   * @param { number } slotId - Indicates the ID of the slot holding the SIM card for sending SMS messages.
262   * @param { string } smscAddr - Indicates the SMSC address.
263   * @param { AsyncCallback<void> } callback - The callback of setSmscAddr.
264   * @throws { BusinessError } 201 - Permission denied.
265   * @throws { BusinessError } 202 - Non-system applications use system APIs.
266   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
267   * Incorrect parameter types.
268   * @throws { BusinessError } 8300001 - Invalid parameter value.
269   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
270   * @throws { BusinessError } 8300003 - System internal error.
271   * @throws { BusinessError } 8300999 - Unknown error code.
272   * @syscap SystemCapability.Telephony.SmsMms
273   * @systemapi Hide this for inner system use.
274   * @since 7
275   */
276  function setSmscAddr(slotId: number, smscAddr: string, callback: AsyncCallback<void>): void;
277
278  /**
279   * Sets the address for the Short Message Service Center (SMSC) based on a specified slot ID.
280   *
281   * @permission ohos.permission.SET_TELEPHONY_STATE
282   * @param { number } slotId - Indicates the ID of the slot holding the SIM card for sending SMS messages.
283   * @param { string } smscAddr - Indicates the SMSC address.
284   * @returns { Promise<void> } The promise returned by the setSmscAddr.
285   * @throws { BusinessError } 201 - Permission denied.
286   * @throws { BusinessError } 202 - Non-system applications use system APIs.
287   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
288   * Incorrect parameter types.
289   * @throws { BusinessError } 8300001 - Invalid parameter value.
290   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
291   * @throws { BusinessError } 8300003 - System internal error.
292   * @throws { BusinessError } 8300999 - Unknown error code.
293   * @syscap SystemCapability.Telephony.SmsMms
294   * @systemapi Hide this for inner system use.
295   * @since 7
296   */
297  function setSmscAddr(slotId: number, smscAddr: string): Promise<void>;
298
299  /**
300   * Obtains the SMSC address based on a specified slot ID.
301   *
302   * @permission ohos.permission.GET_TELEPHONY_STATE
303   * @param { number } slotId - Indicates the ID of the slot holding the SIM card for sending SMS messages.
304   * @param { AsyncCallback<string> } callback - Indicates the callback for getting the SMSC address.
305   * @throws { BusinessError } 201 - Permission denied.
306   * @throws { BusinessError } 202 - Non-system applications use system APIs.
307   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
308   * Incorrect parameter types.
309   * @throws { BusinessError } 8300001 - Invalid parameter value.
310   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
311   * @throws { BusinessError } 8300003 - System internal error.
312   * @throws { BusinessError } 8300999 - Unknown error code.
313   * @syscap SystemCapability.Telephony.SmsMms
314   * @systemapi Hide this for inner system use.
315   * @since 7
316   */
317  function getSmscAddr(slotId: number, callback: AsyncCallback<string>): void;
318
319  /**
320   * Obtains the SMSC address based on a specified slot ID.
321   *
322   * @permission ohos.permission.GET_TELEPHONY_STATE
323   * @param { number } slotId - Indicates the ID of the slot holding the SIM card for sending SMS messages.
324   * @returns { Promise<string> } Returns the SMSC address.
325   * @throws { BusinessError } 201 - Permission denied.
326   * @throws { BusinessError } 202 - Non-system applications use system APIs.
327   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
328   * Incorrect parameter types.
329   * @throws { BusinessError } 8300001 - Invalid parameter value.
330   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
331   * @throws { BusinessError } 8300003 - System internal error.
332   * @throws { BusinessError } 8300999 - Unknown error code.
333   * @syscap SystemCapability.Telephony.SmsMms
334   * @systemapi Hide this for inner system use.
335   * @since 7
336   */
337  function getSmscAddr(slotId: number): Promise<string>;
338
339  /**
340   * Returns whether a device is capable of sending and receiving SMS messages.
341   *
342   * @returns { boolean } Returns {@code true} if the device is capable of sending and receiving SMS messages;
343   * Returns {@code false} otherwise.
344   * @syscap SystemCapability.Telephony.SmsMms
345   * @since 7
346   */
347  function hasSmsCapability(): boolean;
348
349  /**
350   * Add an SMS Message to SIM card.
351   *
352   * @permission ohos.permission.RECEIVE_SMS and ohos.permission.SEND_MESSAGES
353   * @param { SimMessageOptions } options - Indicates SIM message options.
354   * @param { AsyncCallback<void> } callback - The callback of addSimMessage.
355   * @throws { BusinessError } 201 - Permission denied.
356   * @throws { BusinessError } 202 - Non-system applications use system APIs.
357   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
358   * Incorrect parameter types. 3. Parameter verification failed.
359   * @throws { BusinessError } 8300001 - Invalid parameter value.
360   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
361   * @throws { BusinessError } 8300003 - System internal error.
362   * @throws { BusinessError } 8300999 - Unknown error code.
363   * @syscap SystemCapability.Telephony.SmsMms
364   * @systemapi Hide this for inner system use.
365   * @since 7
366   */
367  function addSimMessage(options: SimMessageOptions, callback: AsyncCallback<void>): void;
368
369  /**
370   * Add an SMS Message to SIM card.
371   *
372   * @permission ohos.permission.RECEIVE_SMS and ohos.permission.SEND_MESSAGES
373   * @param { SimMessageOptions } options - Indicates SIM message options.
374   * @returns { Promise<void> } The promise returned by the addSimMessage.
375   * @throws { BusinessError } 201 - Permission denied.
376   * @throws { BusinessError } 202 - Non-system applications use system APIs.
377   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
378   * Incorrect parameter types. 3. Parameter verification failed.
379   * @throws { BusinessError } 8300001 - Invalid parameter value.
380   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
381   * @throws { BusinessError } 8300003 - System internal error.
382   * @throws { BusinessError } 8300999 - Unknown error code.
383   * @syscap SystemCapability.Telephony.SmsMms
384   * @systemapi Hide this for inner system use.
385   * @since 7
386   */
387  function addSimMessage(options: SimMessageOptions): Promise<void>;
388
389  /**
390   * Delete an SMS Message from the SIM card.
391   *
392   * @permission ohos.permission.RECEIVE_SMS and ohos.permission.SEND_MESSAGES
393   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot index
394   * number supported by the device.
395   * @param { number } msgIndex - Indicates the message index.
396   * @param { AsyncCallback<void> } callback - The callback of delSimMessage.
397   * @throws { BusinessError } 201 - Permission denied.
398   * @throws { BusinessError } 202 - Non-system applications use system APIs.
399   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
400   * Incorrect parameter types.
401   * @throws { BusinessError } 8300001 - Invalid parameter value.
402   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
403   * @throws { BusinessError } 8300003 - System internal error.
404   * @throws { BusinessError } 8300999 - Unknown error code.
405   * @syscap SystemCapability.Telephony.SmsMms
406   * @systemapi Hide this for inner system use.
407   * @since 7
408   */
409  function delSimMessage(slotId: number, msgIndex: number, callback: AsyncCallback<void>): void;
410
411  /**
412   * Delete an SMS Message from the SIM card.
413   *
414   * @permission ohos.permission.RECEIVE_SMS and ohos.permission.SEND_MESSAGES
415   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot index
416   * number supported by the device.
417   * @param { number } msgIndex - Indicates the message index.
418   * @returns { Promise<void> } The promise returned by the delSimMessage.
419   * @throws { BusinessError } 201 - Permission denied.
420   * @throws { BusinessError } 202 - Non-system applications use system APIs.
421   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
422   * Incorrect parameter types.
423   * @throws { BusinessError } 8300001 - Invalid parameter value.
424   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
425   * @throws { BusinessError } 8300003 - System internal error.
426   * @throws { BusinessError } 8300999 - Unknown error code.
427   * @syscap SystemCapability.Telephony.SmsMms
428   * @systemapi Hide this for inner system use.
429   * @since 7
430   */
431  function delSimMessage(slotId: number, msgIndex: number): Promise<void>;
432
433  /**
434   * Update a SIM SMS of SIM card.
435   *
436   * @permission ohos.permission.RECEIVE_SMS and ohos.permission.SEND_MESSAGES
437   * @param { UpdateSimMessageOptions } options - Indicates update SIM message options.
438   * @param { AsyncCallback<void> } callback - The callback of updateSimMessage.
439   * @throws { BusinessError } 201 - Permission denied.
440   * @throws { BusinessError } 202 - Non-system applications use system APIs.
441   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
442   * Incorrect parameter types. 3. Parameter verification failed.
443   * @throws { BusinessError } 8300001 - Invalid parameter value.
444   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
445   * @throws { BusinessError } 8300003 - System internal error.
446   * @throws { BusinessError } 8300999 - Unknown error code.
447   * @syscap SystemCapability.Telephony.SmsMms
448   * @systemapi Hide this for inner system use.
449   * @since 7
450   */
451  function updateSimMessage(options: UpdateSimMessageOptions, callback: AsyncCallback<void>): void;
452
453  /**
454   * Update a SIM SMS of SIM card.
455   *
456   * @permission ohos.permission.RECEIVE_SMS and ohos.permission.SEND_MESSAGES
457   * @param { UpdateSimMessageOptions } options - Indicates update SIM message options.
458   * @returns { Promise<void> } The promise returned by the updateSimMessage.
459   * @throws { BusinessError } 201 - Permission denied.
460   * @throws { BusinessError } 202 - Non-system applications use system APIs.
461   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
462   * Incorrect parameter types. 3. Parameter verification failed.
463   * @throws { BusinessError } 8300001 - Invalid parameter value.
464   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
465   * @throws { BusinessError } 8300003 - System internal error.
466   * @throws { BusinessError } 8300999 - Unknown error code.
467   * @syscap SystemCapability.Telephony.SmsMms
468   * @systemapi Hide this for inner system use.
469   * @since 7
470   */
471  function updateSimMessage(options: UpdateSimMessageOptions): Promise<void>;
472
473  /**
474   * Get all SMS records in SIM.
475   *
476   * @permission ohos.permission.RECEIVE_SMS
477   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot index
478   * number supported by the device.
479   * @param { AsyncCallback<Array<SimShortMessage>> } callback - Indicates the callback for getting a
480   * {@code SimShortMessage} object.
481   * @throws { BusinessError } 201 - Permission denied.
482   * @throws { BusinessError } 202 - Non-system applications use system APIs.
483   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
484   * Incorrect parameter types.
485   * @throws { BusinessError } 8300001 - Invalid parameter value.
486   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
487   * @throws { BusinessError } 8300003 - System internal error.
488   * @throws { BusinessError } 8300999 - Unknown error code.
489   * @syscap SystemCapability.Telephony.SmsMms
490   * @systemapi Hide this for inner system use.
491   * @since 7
492   */
493  function getAllSimMessages(slotId: number, callback: AsyncCallback<Array<SimShortMessage>>): void;
494
495  /**
496   * Get all SMS records in SIM.
497   *
498   * @permission ohos.permission.RECEIVE_SMS
499   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot index
500   * number supported by the device.
501   * @returns { Promise<Array<SimShortMessage>> } Returns a {@code SimShortMessage} object.
502   * @throws { BusinessError } 201 - Permission denied.
503   * @throws { BusinessError } 202 - Non-system applications use system APIs.
504   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
505   * Incorrect parameter types.
506   * @throws { BusinessError } 8300001 - Invalid parameter value.
507   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
508   * @throws { BusinessError } 8300003 - System internal error.
509   * @throws { BusinessError } 8300999 - Unknown error code.
510   * @syscap SystemCapability.Telephony.SmsMms
511   * @systemapi Hide this for inner system use.
512   * @since 7
513   */
514  function getAllSimMessages(slotId: number): Promise<Array<SimShortMessage>>;
515
516  /**
517   * Turn on or off Cell BroadCast.
518   *
519   * @permission ohos.permission.RECEIVE_SMS
520   * @param { CBConfigOptions } options - Indicates cell broadcast configuration options.
521   * @param { AsyncCallback<void> } callback - The callback of setCBConfig.
522   * @throws { BusinessError } 201 - Permission denied.
523   * @throws { BusinessError } 202 - Non-system applications use system APIs.
524   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
525   * Incorrect parameter types.
526   * @throws { BusinessError } 8300001 - Invalid parameter value.
527   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
528   * @throws { BusinessError } 8300003 - System internal error.
529   * @throws { BusinessError } 8300999 - Unknown error code.
530   * @syscap SystemCapability.Telephony.SmsMms
531   * @systemapi Hide this for inner system use.
532   * @since 7
533   */
534  function setCBConfig(options: CBConfigOptions, callback: AsyncCallback<void>): void;
535
536  /**
537   * Turn on or off Cell BroadCast.
538   *
539   * @permission ohos.permission.RECEIVE_SMS
540   * @param { CBConfigOptions } options - Indicates cell broadcast configuration options.
541   * @returns { Promise<void> } The promise returned by the setCBConfig.
542   * @throws { BusinessError } 201 - Permission denied.
543   * @throws { BusinessError } 202 - Non-system applications use system APIs.
544   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
545   * Incorrect parameter types.
546   * @throws { BusinessError } 8300001 - Invalid parameter value.
547   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
548   * @throws { BusinessError } 8300003 - System internal error.
549   * @throws { BusinessError } 8300999 - Unknown error code.
550   * @syscap SystemCapability.Telephony.SmsMms
551   * @systemapi Hide this for inner system use.
552   * @since 7
553   */
554  function setCBConfig(options: CBConfigOptions): Promise<void>;
555
556  /**
557   * Get an SMS segment encode relation information.
558   *
559   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot index
560   * number supported by the device.
561   * @param { string } message - Indicates short message.
562   * @param { boolean } force7bit - Indicates whether to use 7 bit encoding.
563   * @param { AsyncCallback<SmsSegmentsInfo> } callback - Indicates the callback for getting a {@code SmsSegmentsInfo}
564   * object.
565   * @throws { BusinessError } 202 - Non-system applications use system APIs.
566   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
567   * Incorrect parameter types. 3. Parameter verification failed.
568   * @throws { BusinessError } 8300001 - Invalid parameter value.
569   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
570   * @throws { BusinessError } 8300003 - System internal error.
571   * @throws { BusinessError } 8300999 - Unknown error code.
572   * @syscap SystemCapability.Telephony.SmsMms
573   * @systemapi Hide this for inner system use.
574   * @since 8
575   */
576  function getSmsSegmentsInfo(slotId: number, message: string, force7bit: boolean, callback: AsyncCallback<SmsSegmentsInfo>): void;
577
578  /**
579   * Get an SMS segment encode relation information.
580   *
581   * @param { number } slotId - Indicates the card slot index number, ranging from 0 to the maximum card slot index
582   * number supported by the device.
583   * @param { string } message - Indicates short message.
584   * @param { boolean } force7bit - Indicates whether to use 7 bit encoding.
585   * @returns { Promise<SmsSegmentsInfo> } Returns a {@code SmsSegmentsInfo} object.
586   * @throws { BusinessError } 202 - Non-system applications use system APIs.
587   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
588   * Incorrect parameter types. 3. Parameter verification failed.
589   * @throws { BusinessError } 8300001 - Invalid parameter value.
590   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
591   * @throws { BusinessError } 8300003 - System internal error.
592   * @throws { BusinessError } 8300999 - Unknown error code.
593   * @syscap SystemCapability.Telephony.SmsMms
594   * @systemapi Hide this for inner system use.
595   * @since 8
596   */
597  function getSmsSegmentsInfo(slotId: number, message: string, force7bit: boolean): Promise<SmsSegmentsInfo>;
598
599  /**
600   * SMS over IMS is supported if IMS is registered and SMS is supported on IMS.
601   *
602   * @param { number } slotId - Indicates the default SIM card for Ims Sms. The value {@code 0} indicates card slot 1,
603   * and the value {@code 1} indicates card slot 2.
604   * @param { AsyncCallback<boolean> } callback - Indicates the callback of isImsSmsSupported.
605   * Returns {@code true} if SMS over IMS is supported, {@code false} otherwise.
606   * @throws { BusinessError } 202 - Non-system applications use system APIs.
607   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
608   * Incorrect parameter types.
609   * @throws { BusinessError } 8300001 - Invalid parameter value.
610   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
611   * @throws { BusinessError } 8300003 - System internal error.
612   * @throws { BusinessError } 8300999 - Unknown error code.
613   * @syscap SystemCapability.Telephony.SmsMms
614   * @systemapi Hide this for inner system use.
615   * @since 8
616   */
617  function isImsSmsSupported(slotId: number, callback: AsyncCallback<boolean>): void;
618
619  /**
620   * SMS over IMS is supported if IMS is registered and SMS is supported on IMS.
621   *
622   * @param { number } slotId - Indicates the default SIM card for Ims Sms. The value {@code 0} indicates card slot 1,
623   * and the value {@code 1} indicates card slot 2.
624   * @returns { Promise<boolean> } Returns {@code true} if SMS over IMS is supported, {@code false} otherwise.
625   * @throws { BusinessError } 202 - Non-system applications use system APIs.
626   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
627   * Incorrect parameter types.
628   * @throws { BusinessError } 8300001 - Invalid parameter value.
629   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
630   * @throws { BusinessError } 8300003 - System internal error.
631   * @throws { BusinessError } 8300999 - Unknown error code.
632   * @syscap SystemCapability.Telephony.SmsMms
633   * @systemapi Hide this for inner system use.
634   * @since 8
635   */
636  function isImsSmsSupported(slotId: number): Promise<boolean>;
637
638  /**
639   * Gets SMS format supported on IMS. SMS over IMS format is either 3GPP or 3GPP2.
640   *
641   * @param { AsyncCallback<string> } callback - Indicates the callback for getting format, 3gpp, 3gpp2 or unknown.
642   * @throws { BusinessError } 202 - Non-system applications use system APIs.
643   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
644   * Incorrect parameter types.
645   * @throws { BusinessError } 8300001 - Invalid parameter value.
646   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
647   * @throws { BusinessError } 8300003 - System internal error.
648   * @throws { BusinessError } 8300999 - Unknown error code.
649   * @syscap SystemCapability.Telephony.SmsMms
650   * @systemapi Hide this for inner system use.
651   * @since 8
652   */
653  function getImsShortMessageFormat(callback: AsyncCallback<string>): void;
654
655  /**
656   * Gets SMS format supported on IMS. SMS over IMS format is either 3GPP or 3GPP2.
657   *
658   * @returns { Promise<string> } Returns format, 3gpp, 3gpp2 or unknown.
659   * @throws { BusinessError } 202 - Non-system applications use system APIs.
660   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
661   * @throws { BusinessError } 8300003 - System internal error.
662   * @throws { BusinessError } 8300999 - Unknown error code.
663   * @syscap SystemCapability.Telephony.SmsMms
664   * @systemapi Hide this for inner system use.
665   * @since 8
666   */
667  function getImsShortMessageFormat(): Promise<string>;
668
669  /**
670   * Decode the message content.
671   *
672   * @param { string | Array<number> } mmsFilePathName - Indicates the path name of the multimedia message file.
673   * @param { AsyncCallback<MmsInformation> } callback - Indicates the callback for getting a {@code MmsInformation}
674   * object.
675   * @throws { BusinessError } 202 - Non-system applications use system APIs.
676   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
677   * Incorrect parameter types. 3. Parameter verification failed.
678   * @throws { BusinessError } 8300001 - Invalid parameter value.
679   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
680   * @throws { BusinessError } 8300003 - System internal error.
681   * @throws { BusinessError } 8300999 - Unknown error code.
682   * @syscap SystemCapability.Telephony.SmsMms
683   * @systemapi Hide this for inner system use.
684   * @since 8
685   */
686  function decodeMms(mmsFilePathName: string | Array<number>, callback: AsyncCallback<MmsInformation>): void;
687
688  /**
689   * Decode the message content.
690   *
691   * @param { string | Array<number> } mmsFilePathName - Indicates the path name of the multimedia message file.
692   * @returns { Promise<MmsInformation> } Returns a {@code MmsInformation} object.
693   * @throws { BusinessError } 202 - Non-system applications use system APIs.
694   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
695   * Incorrect parameter types. 3. Parameter verification failed.
696   * @throws { BusinessError } 8300001 - Invalid parameter value.
697   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
698   * @throws { BusinessError } 8300003 - System internal error.
699   * @throws { BusinessError } 8300999 - Unknown error code.
700   * @syscap SystemCapability.Telephony.SmsMms
701   * @systemapi Hide this for inner system use.
702   * @since 8
703   */
704  function decodeMms(mmsFilePathName: string | Array<number>): Promise<MmsInformation>;
705
706  /**
707   * Encode the message content.
708   *
709   * @param { MmsInformation } mms - Indicates MMS messages.
710   * @param { AsyncCallback<Array<number>> } callback - Indicates the callback for getting the result of MMS encoding.
711   * @throws { BusinessError } 202 - Non-system applications use system APIs.
712   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
713   * Incorrect parameter types. 3. Parameter verification failed.
714   * @throws { BusinessError } 8300001 - Invalid parameter value.
715   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
716   * @throws { BusinessError } 8300003 - System internal error.
717   * @throws { BusinessError } 8300999 - Unknown error code.
718   * @syscap SystemCapability.Telephony.SmsMms
719   * @systemapi Hide this for inner system use.
720   * @since 8
721   */
722  function encodeMms(mms: MmsInformation, callback: AsyncCallback<Array<number>>): void;
723
724  /**
725   * Encode the message content.
726   *
727   * @param { MmsInformation } mms - Indicates MMS messages.
728   * @returns { Promise<Array<number>> } Returns the result of MMS encoding.
729   * @throws { BusinessError } 202 - Non-system applications use system APIs.
730   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
731   * Incorrect parameter types. 3. Parameter verification failed.
732   * @throws { BusinessError } 8300001 - Invalid parameter value.
733   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
734   * @throws { BusinessError } 8300003 - System internal error.
735   * @throws { BusinessError } 8300999 - Unknown error code.
736   * @syscap SystemCapability.Telephony.SmsMms
737   * @systemapi Hide this for inner system use.
738   * @since 8
739   */
740  function encodeMms(mms: MmsInformation): Promise<Array<number>>;
741
742  /**
743   * Obtains the default SIM ID for sending SMS messages.
744   *
745   * @param { AsyncCallback<number> } callback - Returns the SIM ID of the default sms sim and
746   * SIM ID will increase from 1.
747   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
748   * Incorrect parameter types.
749   * @throws { BusinessError } 8300001 - Invalid parameter value.
750   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
751   * @throws { BusinessError } 8300003 - System internal error.
752   * @throws { BusinessError } 8300004 - Do not have sim card.
753   * @throws { BusinessError } 8300999 - Unknown error code.
754   * @throws { BusinessError } 8301001 - SIM card is not activated.
755   * @syscap SystemCapability.Telephony.SmsMms
756   * @since 10
757   */
758  function getDefaultSmsSimId(callback: AsyncCallback<number>): void;
759
760  /**
761   * Obtains the default SIM ID for sending SMS messages.
762   *
763   * @returns { Promise<number> } Returns the SIM ID of the default sms sim and
764   * SIM ID will increase from 1.
765   * @throws { BusinessError } 8300001 - Invalid parameter value.
766   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
767   * @throws { BusinessError } 8300003 - System internal error.
768   * @throws { BusinessError } 8300004 - Do not have sim card.
769   * @throws { BusinessError } 8300999 - Unknown error code.
770   * @throws { BusinessError } 8301001 - SIM card is not activated.
771   * @syscap SystemCapability.Telephony.SmsMms
772   * @since 10
773   */
774  function getDefaultSmsSimId(): Promise<number>;
775
776  /**
777   * Defines the MMS message information.
778   *
779   * @interface MmsInformation
780   * @syscap SystemCapability.Telephony.SmsMms
781   * @systemapi Hide this for inner system use.
782   * @since 8
783   */
784  export interface MmsInformation {
785    /**
786     * Indicates the message type for the MMS message.
787     *
788     * @type { MessageType }
789     * @syscap SystemCapability.Telephony.SmsMms
790     * @systemapi Hide this for inner system use.
791     * @since 8
792     */
793    messageType: MessageType;
794
795    /**
796     * Indicates the PDU header type for the MMS message.
797     *
798     * @type { MmsSendReq | MmsSendConf | MmsNotificationInd | MmsRespInd | MmsRetrieveConf | MmsAcknowledgeInd |
799     * MmsDeliveryInd | MmsReadOrigInd | MmsReadRecInd }
800     * @syscap SystemCapability.Telephony.SmsMms
801     * @systemapi Hide this for inner system use.
802     * @since 8
803     */
804    mmsType: MmsSendReq | MmsSendConf | MmsNotificationInd | MmsRespInd | MmsRetrieveConf | MmsAcknowledgeInd | MmsDeliveryInd | MmsReadOrigInd | MmsReadRecInd;
805
806    /**
807     * Indicates the attachment for the MMS message.
808     *
809     * @type { ?Array<MmsAttachment> }
810     * @syscap SystemCapability.Telephony.SmsMms
811     * @systemapi Hide this for inner system use.
812     * @since 8
813     */
814    attachment?: Array<MmsAttachment>;
815  }
816
817  /**
818   * Sends an MMS message.
819   *
820   * @permission ohos.permission.SEND_MESSAGES
821   * @param { Context } context - Indicates the context of application or capability.
822   * @param { MmsParams } mmsParams - Indicates the parameters of the MMS message.
823   * @param { AsyncCallback<void> } callback - The callback of sendMms. For error code, see MmsFailCode.
824   * @throws { BusinessError } 201 - Permission denied.
825   * @throws { BusinessError } 202 - Non-system applications use system APIs.
826   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
827   * Incorrect parameter types. 3. Parameter verification failed.
828   * @throws { BusinessError } 8300001 - Invalid parameter value.
829   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
830   * @throws { BusinessError } 8300003 - System internal error.
831   * @throws { BusinessError } 8300999 - Unknown error code.
832   * @syscap SystemCapability.Telephony.SmsMms
833   * @systemapi Hide this for inner system use.
834   * @since 11
835   */
836  function sendMms(context: Context, mmsParams: MmsParams, callback: AsyncCallback<void>): void;
837
838  /**
839   * Sends an MMS message.
840   *
841   * @permission ohos.permission.SEND_MESSAGES
842   * @param { Context } context - Indicates the context of application or capability.
843   * @param { MmsParams } mmsParams - Indicates the parameters of the MMS message.
844   * @returns { Promise<void> } The promise returned by the sendMms.
845   * @throws { BusinessError } 201 - Permission denied.
846   * @throws { BusinessError } 202 - Non-system applications use system APIs.
847   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
848   * Incorrect parameter types. 3. Parameter verification failed.
849   * @throws { BusinessError } 8300001 - Invalid parameter value.
850   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
851   * @throws { BusinessError } 8300003 - System internal error.
852   * @throws { BusinessError } 8300999 - Unknown error code.
853   * @syscap SystemCapability.Telephony.SmsMms
854   * @systemapi Hide this for inner system use.
855   * @since 11
856   */
857  function sendMms(context: Context, mmsParams: MmsParams): Promise<void>;
858
859  /**
860   * Downloads an MMS message.
861   *
862   * @permission ohos.permission.RECEIVE_MMS
863   * @param { Context } context - Indicates the context of application or capability.
864   * @param { MmsParams }  mmsParams - Indicates the parameters of the MMS message.
865   * @param { AsyncCallback<void> } callback - The callback of downloadMms. For error code, see MmsFailCode.
866   * @throws { BusinessError } 201 - Permission denied.
867   * @throws { BusinessError } 202 - Non-system applications use system APIs.
868   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
869   * Incorrect parameter types.
870   * @throws { BusinessError } 8300001 - Invalid parameter value.
871   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
872   * @throws { BusinessError } 8300003 - System internal error.
873   * @throws { BusinessError } 8300999 - Unknown error code.
874   * @syscap SystemCapability.Telephony.SmsMms
875   * @systemapi Hide this for inner system use.
876   * @since 11
877   */
878  function downloadMms(context: Context, mmsParams: MmsParams, callback: AsyncCallback<void>): void;
879
880  /**
881   * Downloads an MMS message.
882   *
883   * @permission ohos.permission.RECEIVE_MMS
884   * @param { Context } context - Indicates the context of application or capability.
885   * @param { MmsParams }  mmsParams - Indicates the parameters of the MMS message.
886   * @returns { Promise<void> } The promise returned by the downloadMms. For error code, see MmsFailCode.
887   * @throws { BusinessError } 201 - Permission denied.
888   * @throws { BusinessError } 202 - Non-system applications use system APIs.
889   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
890   * Incorrect parameter types.
891   * @throws { BusinessError } 8300001 - Invalid parameter value.
892   * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service.
893   * @throws { BusinessError } 8300003 - System internal error.
894   * @throws { BusinessError } 8300999 - Unknown error code.
895   * @syscap SystemCapability.Telephony.SmsMms
896   * @systemapi Hide this for inner system use.
897   * @since 11
898   */
899  function downloadMms(context: Context, mmsParams: MmsParams): Promise<void>;
900
901  /**
902   * Defines the MMS message param.
903   *
904   * @interface MmsParams
905   * @syscap SystemCapability.Telephony.SmsMms
906   * @systemapi Hide this for inner system use.
907   * @since 11
908   */
909  export interface MmsParams {
910    /**
911     * Indicates the ID of the SIM card slot used for sending the MMS message.
912     *
913     * @type { number }
914     * @syscap SystemCapability.Telephony.SmsMms
915     * @systemapi Hide this for inner system use.
916     * @since 11
917     */
918    slotId: number;
919
920    /**
921     * Indicates the MMSC used for sending the MMS message.
922     *
923     * @type { string }
924     * @syscap SystemCapability.Telephony.SmsMms
925     * @systemapi Hide this for inner system use.
926     * @since 11
927     */
928    mmsc: string;
929
930    /**
931     * Indicates the MMS pdu url used for sending the MMS message.
932     *
933     * @type { string }
934     * @syscap SystemCapability.Telephony.SmsMms
935     * @systemapi Hide this for inner system use.
936     * @since 11
937     */
938    data: string;
939
940    /**
941     * Indicates the MMS UA and MMS UaProf used for sending the MMS message.
942     *
943     * @type { ?MmsConfig }
944     * @syscap SystemCapability.Telephony.SmsMms
945     * @systemapi Hide this for inner system use.
946     * @since 11
947     */
948    mmsConfig?: MmsConfig;
949  }
950
951  /**
952   * Defines the MMS message config.
953   *
954   * @interface MmsConfig
955   * @syscap SystemCapability.Telephony.SmsMms
956   * @systemapi Hide this for inner system use.
957   * @since 11
958   */
959  export interface MmsConfig {
960    /**
961     * Indicates the user agent used for the MMS message.
962     *
963     * @type { string }
964     * @syscap SystemCapability.Telephony.SmsMms
965     * @systemapi Hide this for inner system use.
966     * @since 11
967     */
968    userAgent: string;
969
970    /**
971     * Indicates the user agent profile for the MMS message.
972     *
973     * @type { string }
974     * @syscap SystemCapability.Telephony.SmsMms
975     * @systemapi Hide this for inner system use.
976     * @since 11
977     */
978    userAgentProfile: string;
979  }
980
981  /**
982   * Defines an MMS message sending request.
983   *
984   * @interface MmsSendReq
985   * @syscap SystemCapability.Telephony.SmsMms
986   * @systemapi Hide this for inner system use.
987   * @since 8
988   */
989  export interface MmsSendReq {
990    /**
991     * Indicates the source address for the MMS message sending request.
992     *
993     * @type { MmsAddress }
994     * @syscap SystemCapability.Telephony.SmsMms
995     * @systemapi Hide this for inner system use.
996     * @since 8
997     */
998    from: MmsAddress;
999
1000    /**
1001     * Indicates the transaction ID for the MMS message sending request.
1002     *
1003     * @type { string }
1004     * @syscap SystemCapability.Telephony.SmsMms
1005     * @systemapi Hide this for inner system use.
1006     * @since 8
1007     */
1008    transactionId: string;
1009
1010    /**
1011     * Indicates the content type for the MMS message sending request.
1012     *
1013     * @type { string }
1014     * @syscap SystemCapability.Telephony.SmsMms
1015     * @systemapi Hide this for inner system use.
1016     * @since 8
1017     */
1018    contentType: string;
1019
1020    /**
1021     * Indicates the version for the MMS message sending request.
1022     *
1023     * @type { MmsVersionType }
1024     * @syscap SystemCapability.Telephony.SmsMms
1025     * @systemapi Hide this for inner system use.
1026     * @since 8
1027     */
1028    version: MmsVersionType;
1029
1030    /**
1031     * Indicates the destination address for the MMS message sending request.
1032     *
1033     * @type { ?Array<MmsAddress> }
1034     * @syscap SystemCapability.Telephony.SmsMms
1035     * @systemapi Hide this for inner system use.
1036     * @since 8
1037     */
1038    to?: Array<MmsAddress>;
1039
1040    /**
1041     * Indicates the date for the MMS message sending request.
1042     *
1043     * @type { ?number }
1044     * @syscap SystemCapability.Telephony.SmsMms
1045     * @systemapi Hide this for inner system use.
1046     * @since 8
1047     */
1048    date?: number;
1049
1050    /**
1051     * Indicates the carbon copy address for the MMS message sending request.
1052     *
1053     * @type { ?Array<MmsAddress> }
1054     * @syscap SystemCapability.Telephony.SmsMms
1055     * @systemapi Hide this for inner system use.
1056     * @since 8
1057     */
1058    cc?: Array<MmsAddress>;
1059
1060    /**
1061     * Indicates the blind carbon copy address for the MMS message sending request.
1062     *
1063     * @type { ?Array<MmsAddress> }
1064     * @syscap SystemCapability.Telephony.SmsMms
1065     * @systemapi Hide this for inner system use.
1066     * @since 8
1067     */
1068    bcc?: Array<MmsAddress>;
1069
1070    /**
1071     * Indicates the subject for the MMS message sending request.
1072     *
1073     * @type { ?string }
1074     * @syscap SystemCapability.Telephony.SmsMms
1075     * @systemapi Hide this for inner system use.
1076     * @since 8
1077     */
1078    subject?: string;
1079
1080    /**
1081     * Indicates the message class for the MMS message sending request.
1082     *
1083     * @type { ?number }
1084     * @syscap SystemCapability.Telephony.SmsMms
1085     * @systemapi Hide this for inner system use.
1086     * @since 8
1087     */
1088    messageClass?: number;
1089
1090    /**
1091     * Indicates the expiration for the MMS message sending request.
1092     *
1093     * @type { ?number }
1094     * @syscap SystemCapability.Telephony.SmsMms
1095     * @systemapi Hide this for inner system use.
1096     * @since 8
1097     */
1098    expiry?: number;
1099
1100    /**
1101     * Indicates the priority for the MMS message sending request.
1102     *
1103     * @type { ?MmsPriorityType }
1104     * @syscap SystemCapability.Telephony.SmsMms
1105     * @systemapi Hide this for inner system use.
1106     * @since 8
1107     */
1108    priority?: MmsPriorityType;
1109
1110    /**
1111     * Indicates the sender visibility for the MMS message sending request.
1112     *
1113     * @type { ?number }
1114     * @syscap SystemCapability.Telephony.SmsMms
1115     * @systemapi Hide this for inner system use.
1116     * @since 8
1117     */
1118    senderVisibility?: number;
1119
1120    /**
1121     * Indicates the delivery report for the MMS message sending request.
1122     *
1123     * @type { ?number }
1124     * @syscap SystemCapability.Telephony.SmsMms
1125     * @systemapi Hide this for inner system use.
1126     * @since 8
1127     */
1128    deliveryReport?: number;
1129
1130    /**
1131     * Indicates the read report for the MMS message sending request.
1132     *
1133     * @type { ?number }
1134     * @syscap SystemCapability.Telephony.SmsMms
1135     * @systemapi Hide this for inner system use.
1136     * @since 8
1137     */
1138    readReport?: number;
1139  }
1140
1141  /**
1142   * Defines the MMS message sending configuration.
1143   *
1144   * @interface MmsSendConf
1145   * @syscap SystemCapability.Telephony.SmsMms
1146   * @systemapi Hide this for inner system use.
1147   * @since 8
1148   */
1149  export interface MmsSendConf {
1150    /**
1151     * Indicates the response status for the MMS message sending configuration.
1152     *
1153     * @type { number }
1154     * @syscap SystemCapability.Telephony.SmsMms
1155     * @systemapi Hide this for inner system use.
1156     * @since 8
1157     */
1158    responseState: number;
1159
1160    /**
1161     * Indicates the transaction ID for the MMS message sending configuration.
1162     *
1163     * @type { string }
1164     * @syscap SystemCapability.Telephony.SmsMms
1165     * @systemapi Hide this for inner system use.
1166     * @since 8
1167     */
1168    transactionId: string;
1169
1170    /**
1171     * Indicates the version for the MMS message sending configuration.
1172     *
1173     * @type { MmsVersionType }
1174     * @syscap SystemCapability.Telephony.SmsMms
1175     * @systemapi Hide this for inner system use.
1176     * @since 8
1177     */
1178    version: MmsVersionType;
1179
1180    /**
1181     * Indicates the message ID for the MMS message sending configuration.
1182     *
1183     * @type { ?string }
1184     * @syscap SystemCapability.Telephony.SmsMms
1185     * @systemapi Hide this for inner system use.
1186     * @since 8
1187     */
1188    messageId?: string;
1189  }
1190
1191  /**
1192   * Defines an MMS notification indication.
1193   *
1194   * @interface MmsNotificationInd
1195   * @syscap SystemCapability.Telephony.SmsMms
1196   * @systemapi Hide this for inner system use.
1197   * @since 8
1198   */
1199  export interface MmsNotificationInd {
1200    /**
1201     * Indicates the transaction ID for the MMS notification indication.
1202     *
1203     * @type { string }
1204     * @syscap SystemCapability.Telephony.SmsMms
1205     * @systemapi Hide this for inner system use.
1206     * @since 8
1207     */
1208    transactionId: string;
1209
1210    /**
1211     * Indicates the message class for the MMS notification indication.
1212     *
1213     * @type { number }
1214     * @syscap SystemCapability.Telephony.SmsMms
1215     * @systemapi Hide this for inner system use.
1216     * @since 8
1217     */
1218    messageClass: number;
1219
1220    /**
1221     * Indicates the message size for the MMS notification indication.
1222     *
1223     * @type { number }
1224     * @syscap SystemCapability.Telephony.SmsMms
1225     * @systemapi Hide this for inner system use.
1226     * @since 8
1227     */
1228    messageSize: number;
1229
1230    /**
1231     * Indicates the expiration for the MMS notification indication.
1232     *
1233     * @type { number }
1234     * @syscap SystemCapability.Telephony.SmsMms
1235     * @systemapi Hide this for inner system use.
1236     * @since 8
1237     */
1238    expiry: number;
1239
1240    /**
1241     * Indicates the content location for the MMS notification indication.
1242     *
1243     * @type { string }
1244     * @syscap SystemCapability.Telephony.SmsMms
1245     * @systemapi Hide this for inner system use.
1246     * @since 8
1247     */
1248    contentLocation: string;
1249
1250    /**
1251     * Indicates the version for the MMS notification indication.
1252     *
1253     * @type { MmsVersionType }
1254     * @syscap SystemCapability.Telephony.SmsMms
1255     * @systemapi Hide this for inner system use.
1256     * @since 8
1257     */
1258    version: MmsVersionType;
1259
1260    /**
1261     * Indicates the source address for the MMS notification indication.
1262     *
1263     * @type { ?MmsAddress }
1264     * @syscap SystemCapability.Telephony.SmsMms
1265     * @systemapi Hide this for inner system use.
1266     * @since 8
1267     */
1268    from?: MmsAddress;
1269
1270    /**
1271     * Indicates the subject for the MMS notification indication.
1272     *
1273     * @type { ?string }
1274     * @syscap SystemCapability.Telephony.SmsMms
1275     * @systemapi Hide this for inner system use.
1276     * @since 8
1277     */
1278    subject?: string;
1279
1280    /**
1281     * Indicates the status report for the MMS notification indication.
1282     *
1283     * @type { ?number }
1284     * @syscap SystemCapability.Telephony.SmsMms
1285     * @systemapi Hide this for inner system use.
1286     * @since 8
1287     */
1288    deliveryReport?: number;
1289
1290    /**
1291     * Indicates the content class for the MMS notification indication.
1292     *
1293     * @type { ?number }
1294     * @syscap SystemCapability.Telephony.SmsMms
1295     * @systemapi Hide this for inner system use.
1296     * @since 8
1297     */
1298    contentClass?: number;
1299  }
1300
1301  /**
1302   * Defines an MMS response indication.
1303   *
1304   * @interface MmsRespInd
1305   * @syscap SystemCapability.Telephony.SmsMms
1306   * @systemapi Hide this for inner system use.
1307   * @since 8
1308   */
1309  export interface MmsRespInd {
1310    /**
1311     * Indicates the event ID for the MMS response indication.
1312     *
1313     * @type { string }
1314     * @syscap SystemCapability.Telephony.SmsMms
1315     * @systemapi Hide this for inner system use.
1316     * @since 8
1317     */
1318    transactionId: string;
1319
1320    /**
1321     * Indicates the status for the MMS response indication.
1322     *
1323     * @type { number }
1324     * @syscap SystemCapability.Telephony.SmsMms
1325     * @systemapi Hide this for inner system use.
1326     * @since 8
1327     */
1328    status: number;
1329
1330    /**
1331     * Indicates the version for the MMS response indication.
1332     *
1333     * @type { MmsVersionType }
1334     * @syscap SystemCapability.Telephony.SmsMms
1335     * @systemapi Hide this for inner system use.
1336     * @since 8
1337     */
1338    version: MmsVersionType;
1339
1340    /**
1341     * Indicates the report allowed for the MMS response indication.
1342     *
1343     * @type { ?ReportType }
1344     * @syscap SystemCapability.Telephony.SmsMms
1345     * @systemapi Hide this for inner system use.
1346     * @since 8
1347     */
1348    reportAllowed?: ReportType;
1349  }
1350
1351  /**
1352   * Defines the MMS message retrieval configuration.
1353   *
1354   * @interface MmsRetrieveConf
1355   * @syscap SystemCapability.Telephony.SmsMms
1356   * @systemapi Hide this for inner system use.
1357   * @since 8
1358   */
1359  export interface MmsRetrieveConf {
1360    /**
1361     * Indicates the transaction ID for the MMS message retrieval configuration.
1362     *
1363     * @type { string }
1364     * @syscap SystemCapability.Telephony.SmsMms
1365     * @systemapi Hide this for inner system use.
1366     * @since 8
1367     */
1368    transactionId: string;
1369
1370    /**
1371     * Indicates the message ID for the MMS message retrieval configuration.
1372     *
1373     * @type { string }
1374     * @syscap SystemCapability.Telephony.SmsMms
1375     * @systemapi Hide this for inner system use.
1376     * @since 8
1377     */
1378    messageId: string;
1379
1380    /**
1381     * Indicates the date for the MMS message retrieval configuration.
1382     *
1383     * @type { number }
1384     * @syscap SystemCapability.Telephony.SmsMms
1385     * @systemapi Hide this for inner system use.
1386     * @since 8
1387     */
1388    date: number;
1389
1390    /**
1391     * Indicates the content type for the MMS message retrieval configuration.
1392     *
1393     * @type { string }
1394     * @syscap SystemCapability.Telephony.SmsMms
1395     * @systemapi Hide this for inner system use.
1396     * @since 8
1397     */
1398    contentType: string;
1399
1400    /**
1401     * Indicates the destination address for the MMS message retrieval configuration.
1402     *
1403     * @type { Array<MmsAddress> }
1404     * @syscap SystemCapability.Telephony.SmsMms
1405     * @systemapi Hide this for inner system use.
1406     * @since 8
1407     */
1408    to: Array<MmsAddress>;
1409
1410    /**
1411     * Indicates the version for the MMS message retrieval configuration.
1412     *
1413     * @type { MmsVersionType }
1414     * @syscap SystemCapability.Telephony.SmsMms
1415     * @systemapi Hide this for inner system use.
1416     * @since 8
1417     */
1418    version: MmsVersionType;
1419
1420    /**
1421     * Indicates the source address for the MMS message retrieval configuration.
1422     *
1423     * @type { ?MmsAddress }
1424     * @syscap SystemCapability.Telephony.SmsMms
1425     * @systemapi Hide this for inner system use.
1426     * @since 8
1427     */
1428    from?: MmsAddress;
1429
1430    /**
1431     * Indicates the carbon copy address for the MMS message retrieval configuration.
1432     *
1433     * @type { ?Array<MmsAddress> }
1434     * @syscap SystemCapability.Telephony.SmsMms
1435     * @systemapi Hide this for inner system use.
1436     * @since 8
1437     */
1438    cc?: Array<MmsAddress>;
1439
1440    /**
1441     * Indicates the subject for the MMS message retrieval configuration.
1442     *
1443     * @type { ?string }
1444     * @syscap SystemCapability.Telephony.SmsMms
1445     * @systemapi Hide this for inner system use.
1446     * @since 8
1447     */
1448    subject?: string;
1449
1450    /**
1451     * Indicates the priority for the MMS message retrieval configuration.
1452     *
1453     * @type { ?MmsPriorityType }
1454     * @syscap SystemCapability.Telephony.SmsMms
1455     * @systemapi Hide this for inner system use.
1456     * @since 8
1457     */
1458    priority?: MmsPriorityType;
1459
1460    /**
1461     * Indicates the status report for the MMS message retrieval configuration.
1462     *
1463     * @type { ?number }
1464     * @syscap SystemCapability.Telephony.SmsMms
1465     * @systemapi Hide this for inner system use.
1466     * @since 8
1467     */
1468    deliveryReport?: number;
1469
1470    /**
1471     * Indicates the read report for the MMS message retrieval configuration.
1472     *
1473     * @type { ?number }
1474     * @syscap SystemCapability.Telephony.SmsMms
1475     * @systemapi Hide this for inner system use.
1476     * @since 8
1477     */
1478    readReport?: number;
1479
1480    /**
1481     * Indicates the retrieval status for the MMS message retrieval configuration.
1482     *
1483     * @type { ?number }
1484     * @syscap SystemCapability.Telephony.SmsMms
1485     * @systemapi Hide this for inner system use.
1486     * @since 8
1487     */
1488    retrieveStatus?: number;
1489
1490    /**
1491     * Indicates the retrieval text for the MMS message retrieval configuration.
1492     *
1493     * @type { ?string }
1494     * @syscap SystemCapability.Telephony.SmsMms
1495     * @systemapi Hide this for inner system use.
1496     * @since 8
1497     */
1498    retrieveText?: string;
1499  }
1500
1501  /**
1502   * Defines an MMS confirmation indication.
1503   *
1504   * @interface MmsAcknowledgeInd
1505   * @syscap SystemCapability.Telephony.SmsMms
1506   * @systemapi Hide this for inner system use.
1507   * @since 8
1508   */
1509  export interface MmsAcknowledgeInd {
1510    /**
1511     * Indicates the transaction ID for the MMS confirmation indication.
1512     *
1513     * @type { string }
1514     * @syscap SystemCapability.Telephony.SmsMms
1515     * @systemapi Hide this for inner system use.
1516     * @since 8
1517     */
1518    transactionId: string;
1519
1520    /**
1521     * Indicates the version for the MMS confirmation indication.
1522     *
1523     * @type { MmsVersionType }
1524     * @syscap SystemCapability.Telephony.SmsMms
1525     * @systemapi Hide this for inner system use.
1526     * @since 8
1527     */
1528    version: MmsVersionType;
1529
1530    /**
1531     * Indicates the report allowed for the MMS confirmation indication.
1532     *
1533     * @type { ?ReportType }
1534     * @syscap SystemCapability.Telephony.SmsMms
1535     * @systemapi Hide this for inner system use.
1536     * @since 8
1537     */
1538    reportAllowed?: ReportType;
1539  }
1540
1541  /**
1542   * Defines an MMS message delivery indication.
1543   *
1544   * @interface MmsDeliveryInd
1545   * @syscap SystemCapability.Telephony.SmsMms
1546   * @systemapi Hide this for inner system use.
1547   * @since 8
1548   */
1549  export interface MmsDeliveryInd {
1550    /**
1551     * Indicates the message ID for the MMS message delivery indication.
1552     *
1553     * @type { string }
1554     * @syscap SystemCapability.Telephony.SmsMms
1555     * @systemapi Hide this for inner system use.
1556     * @since 8
1557     */
1558    messageId: string;
1559
1560    /**
1561     * Indicates the date for the MMS message delivery indication.
1562     *
1563     * @type { number }
1564     * @syscap SystemCapability.Telephony.SmsMms
1565     * @systemapi Hide this for inner system use.
1566     * @since 8
1567     */
1568    date: number;
1569
1570    /**
1571     * Indicates the destination address for the MMS message delivery indication.
1572     *
1573     * @type { Array<MmsAddress> }
1574     * @syscap SystemCapability.Telephony.SmsMms
1575     * @systemapi Hide this for inner system use.
1576     * @since 8
1577     */
1578    to: Array<MmsAddress>;
1579
1580    /**
1581     * Indicates the status for the MMS message delivery indication.
1582     *
1583     * @type { number }
1584     * @syscap SystemCapability.Telephony.SmsMms
1585     * @systemapi Hide this for inner system use.
1586     * @since 8
1587     */
1588    status: number;
1589
1590    /**
1591     * Indicates the version for the MMS message delivery indication.
1592     *
1593     * @type { MmsVersionType }
1594     * @syscap SystemCapability.Telephony.SmsMms
1595     * @systemapi Hide this for inner system use.
1596     * @since 8
1597     */
1598    version: MmsVersionType;
1599  }
1600
1601  /**
1602   * Defines the original MMS message reading indication.
1603   *
1604   * @interface MmsReadOrigInd
1605   * @syscap SystemCapability.Telephony.SmsMms
1606   * @systemapi Hide this for inner system use.
1607   * @since 8
1608   */
1609  export interface MmsReadOrigInd {
1610    /**
1611     * Indicates the version for the original MMS message reading indication.
1612     *
1613     * @type { MmsVersionType }
1614     * @syscap SystemCapability.Telephony.SmsMms
1615     * @systemapi Hide this for inner system use.
1616     * @since 8
1617     */
1618    version: MmsVersionType;
1619
1620    /**
1621     * Indicates the message ID for the original MMS message reading indication.
1622     *
1623     * @type { string }
1624     * @syscap SystemCapability.Telephony.SmsMms
1625     * @systemapi Hide this for inner system use.
1626     * @since 8
1627     */
1628    messageId: string;
1629
1630    /**
1631     * Indicates the destination address for the original MMS message reading indication.
1632     *
1633     * @type { Array<MmsAddress> }
1634     * @syscap SystemCapability.Telephony.SmsMms
1635     * @systemapi Hide this for inner system use.
1636     * @since 8
1637     */
1638    to: Array<MmsAddress>;
1639
1640    /**
1641     * Indicates the source address for the original MMS message reading indication.
1642     *
1643     * @type { MmsAddress }
1644     * @syscap SystemCapability.Telephony.SmsMms
1645     * @systemapi Hide this for inner system use.
1646     * @since 8
1647     */
1648    from: MmsAddress;
1649
1650    /**
1651     * Indicates the date for the original MMS message reading indication.
1652     *
1653     * @type { number }
1654     * @syscap SystemCapability.Telephony.SmsMms
1655     * @systemapi Hide this for inner system use.
1656     * @since 8
1657     */
1658    date: number;
1659
1660    /**
1661     * Indicates the read status for the original MMS message reading indication.
1662     *
1663     * @type { number }
1664     * @syscap SystemCapability.Telephony.SmsMms
1665     * @systemapi Hide this for inner system use.
1666     * @since 8
1667     */
1668    readStatus: number;
1669  }
1670
1671  /**
1672   * Defines the MMS message reading indication.
1673   *
1674   * @interface MmsReadRecInd
1675   * @syscap SystemCapability.Telephony.SmsMms
1676   * @systemapi Hide this for inner system use.
1677   * @since 8
1678   */
1679  export interface MmsReadRecInd {
1680    /**
1681     * Indicates the version for the MMS message reading indication.
1682     *
1683     * @type { MmsVersionType }
1684     * @syscap SystemCapability.Telephony.SmsMms
1685     * @systemapi Hide this for inner system use.
1686     * @since 8
1687     */
1688    version: MmsVersionType;
1689
1690    /**
1691     * Indicates the message ID for the MMS message reading indication.
1692     *
1693     * @type { string }
1694     * @syscap SystemCapability.Telephony.SmsMms
1695     * @systemapi Hide this for inner system use.
1696     * @since 8
1697     */
1698    messageId: string;
1699
1700    /**
1701     * Indicates the destination address for the MMS message reading indication.
1702     *
1703     * @type { Array<MmsAddress> }
1704     * @syscap SystemCapability.Telephony.SmsMms
1705     * @systemapi Hide this for inner system use.
1706     * @since 8
1707     */
1708    to: Array<MmsAddress>;
1709
1710    /**
1711     * Indicates the source address for the MMS message reading indication.
1712     *
1713     * @type { MmsAddress }
1714     * @syscap SystemCapability.Telephony.SmsMms
1715     * @systemapi Hide this for inner system use.
1716     * @since 8
1717     */
1718    from: MmsAddress;
1719
1720    /**
1721     * Indicates the read status for the MMS message reading indication.
1722     *
1723     * @type { number }
1724     * @syscap SystemCapability.Telephony.SmsMms
1725     * @systemapi Hide this for inner system use.
1726     * @since 8
1727     */
1728    readStatus: number;
1729
1730    /**
1731     * Indicates the date for the MMS message reading indication.
1732     *
1733     * @type { ?number }
1734     * @syscap SystemCapability.Telephony.SmsMms
1735     * @systemapi Hide this for inner system use.
1736     * @since 8
1737     */
1738    date?: number;
1739  }
1740
1741  /**
1742   * Defines the attachment of an MMS message.
1743   *
1744   * @interface MmsAttachment
1745   * @syscap SystemCapability.Telephony.SmsMms
1746   * @systemapi Hide this for inner system use.
1747   * @since 8
1748   */
1749  export interface MmsAttachment {
1750    /**
1751     * Indicates the content ID for the attachment.
1752     *
1753     * @type { string }
1754     * @syscap SystemCapability.Telephony.SmsMms
1755     * @systemapi Hide this for inner system use.
1756     * @since 8
1757     */
1758    contentId: string;
1759
1760    /**
1761     * Indicates the content location.
1762     *
1763     * @type { string }
1764     * @syscap SystemCapability.Telephony.SmsMms
1765     * @systemapi Hide this for inner system use.
1766     * @since 8
1767     */
1768    contentLocation: string;
1769
1770    /**
1771     * Indicates the content disposition for the attachment.
1772     *
1773     * @type { DispositionType }
1774     * @syscap SystemCapability.Telephony.SmsMms
1775     * @systemapi Hide this for inner system use.
1776     * @since 8
1777     */
1778    contentDisposition: DispositionType;
1779
1780    /**
1781     * Indicates the encoding for content transfer.
1782     *
1783     * @type { string }
1784     * @syscap SystemCapability.Telephony.SmsMms
1785     * @systemapi Hide this for inner system use.
1786     * @since 8
1787     */
1788    contentTransferEncoding: string;
1789
1790    /**
1791     * Indicates the content type for the attachment.
1792     *
1793     * @type { string }
1794     * @syscap SystemCapability.Telephony.SmsMms
1795     * @systemapi Hide this for inner system use.
1796     * @since 8
1797     */
1798    contentType: string;
1799
1800    /**
1801     * Indicates whether the synchronized multimedia integration language is used.
1802     *
1803     * @type { boolean }
1804     * @syscap SystemCapability.Telephony.SmsMms
1805     * @systemapi Hide this for inner system use.
1806     * @since 8
1807     */
1808    isSmil: boolean;
1809
1810    /**
1811     * Indicates the path for the attachment.
1812     *
1813     * @type { ?string }
1814     * @syscap SystemCapability.Telephony.SmsMms
1815     * @systemapi Hide this for inner system use.
1816     * @since 8
1817     */
1818    path?: string;
1819
1820    /**
1821     * Indicates whether the message is in the buffer.
1822     *
1823     * @type { ?Array<number> }
1824     * @syscap SystemCapability.Telephony.SmsMms
1825     * @systemapi Hide this for inner system use.
1826     * @since 8
1827     */
1828    inBuff?: Array<number>;
1829
1830    /**
1831     * Indicates the file name for the attachment.
1832     *
1833     * @type { ?string }
1834     * @syscap SystemCapability.Telephony.SmsMms
1835     * @systemapi Hide this for inner system use.
1836     * @since 8
1837     */
1838    fileName?: string;
1839
1840    /**
1841     * Indicates the character set for the attachment.
1842     *
1843     * @type { ?MmsCharSets }
1844     * @syscap SystemCapability.Telephony.SmsMms
1845     * @systemapi Hide this for inner system use.
1846     * @since 8
1847     */
1848    charset?: MmsCharSets;
1849  }
1850
1851  /**
1852   * Defines an MMSC address.
1853   *
1854   * @interface MmsAddress
1855   * @syscap SystemCapability.Telephony.SmsMms
1856   * @systemapi Hide this for inner system use.
1857   * @since 8
1858   */
1859  export interface MmsAddress {
1860    /**
1861     * Indicates the network address for the MMSC address.
1862     *
1863     * @type { string }
1864     * @syscap SystemCapability.Telephony.SmsMms
1865     * @systemapi Hide this for inner system use.
1866     * @since 8
1867     */
1868    address: string;
1869
1870    /**
1871     * Indicates the character set for the MMSC address.
1872     *
1873     * @type { MmsCharSets }
1874     * @syscap SystemCapability.Telephony.SmsMms
1875     * @systemapi Hide this for inner system use.
1876     * @since 8
1877     */
1878    charset: MmsCharSets;
1879  }
1880
1881  /**
1882   * Enumerates message type.
1883   *
1884   * @enum { number }
1885   * @syscap SystemCapability.Telephony.SmsMms
1886   * @systemapi Hide this for inner system use.
1887   * @since 8
1888   */
1889  export enum MessageType {
1890    /**
1891     * Indicates an MMS message sending request.
1892     *
1893     * @syscap SystemCapability.Telephony.SmsMms
1894     * @systemapi Hide this for inner system use.
1895     * @since 8
1896     */
1897    TYPE_MMS_SEND_REQ = 128,
1898
1899    /**
1900     * Indicates an MMS message sending configuration.
1901     *
1902     * @syscap SystemCapability.Telephony.SmsMms
1903     * @systemapi Hide this for inner system use.
1904     * @since 8
1905     */
1906    TYPE_MMS_SEND_CONF,
1907
1908    /**
1909     * Indicates an MMS notification.
1910     *
1911     * @syscap SystemCapability.Telephony.SmsMms
1912     * @systemapi Hide this for inner system use.
1913     * @since 8
1914     */
1915    TYPE_MMS_NOTIFICATION_IND,
1916
1917    /**
1918     * Indicates an MMS message response.
1919     *
1920     * @syscap SystemCapability.Telephony.SmsMms
1921     * @systemapi Hide this for inner system use.
1922     * @since 8
1923     */
1924    TYPE_MMS_RESP_IND,
1925
1926    /**
1927     * Indicates an MMS message retrieval configuration.
1928     *
1929     * @syscap SystemCapability.Telephony.SmsMms
1930     * @systemapi Hide this for inner system use.
1931     * @since 8
1932     */
1933    TYPE_MMS_RETRIEVE_CONF,
1934
1935    /**
1936     * Indicates the type of multimedia message confirmation index.
1937     *
1938     * @syscap SystemCapability.Telephony.SmsMms
1939     * @systemapi Hide this for inner system use.
1940     * @since 8
1941     */
1942    TYPE_MMS_ACKNOWLEDGE_IND,
1943
1944    /**
1945     * Indicates an MMS message delivery.
1946     *
1947     * @syscap SystemCapability.Telephony.SmsMms
1948     * @systemapi Hide this for inner system use.
1949     * @since 8
1950     */
1951    TYPE_MMS_DELIVERY_IND,
1952
1953    /**
1954     * Indicates an MMS message read report on the recipient side.
1955     *
1956     * @syscap SystemCapability.Telephony.SmsMms
1957     * @systemapi Hide this for inner system use.
1958     * @since 8
1959     */
1960    TYPE_MMS_READ_REC_IND,
1961
1962    /**
1963     * Indicates an original MMS message read report on the originating side.
1964     *
1965     * @syscap SystemCapability.Telephony.SmsMms
1966     * @systemapi Hide this for inner system use.
1967     * @since 8
1968     */
1969    TYPE_MMS_READ_ORIG_IND,
1970  }
1971
1972  /**
1973   * Enumerates MMS message priorities.
1974   *
1975   * @enum { number }
1976   * @syscap SystemCapability.Telephony.SmsMms
1977   * @systemapi Hide this for inner system use.
1978   * @since 8
1979   */
1980  export enum MmsPriorityType {
1981    /**
1982     * Indicates low priority.
1983     *
1984     * @syscap SystemCapability.Telephony.SmsMms
1985     * @systemapi Hide this for inner system use.
1986     * @since 8
1987     */
1988    MMS_LOW = 128,
1989
1990    /**
1991     * Indicates normal priority.
1992     *
1993     * @syscap SystemCapability.Telephony.SmsMms
1994     * @systemapi Hide this for inner system use.
1995     * @since 8
1996     */
1997    MMS_NORMAL,
1998
1999    /**
2000     * Indicates high priority.
2001     *
2002     * @syscap SystemCapability.Telephony.SmsMms
2003     * @systemapi Hide this for inner system use.
2004     * @since 8
2005     */
2006    MMS_HIGH,
2007  }
2008
2009  /**
2010   * Enumerates MMS versions.
2011   *
2012   * @enum { number }
2013   * @syscap SystemCapability.Telephony.SmsMms
2014   * @systemapi Hide this for inner system use.
2015   * @since 8
2016   */
2017  export enum MmsVersionType {
2018    /**
2019     * Indicates MMS version 1_0.
2020     *
2021     * @syscap SystemCapability.Telephony.SmsMms
2022     * @systemapi Hide this for inner system use.
2023     * @since 8
2024     */
2025    MMS_VERSION_1_0 = 0x10,
2026
2027    /**
2028     * Indicates MMS version 1_1.
2029     *
2030     * @syscap SystemCapability.Telephony.SmsMms
2031     * @systemapi Hide this for inner system use.
2032     * @since 8
2033     */
2034    MMS_VERSION_1_1,
2035
2036    /**
2037     * Indicates MMS version 1_2.
2038     *
2039     * @syscap SystemCapability.Telephony.SmsMms
2040     * @systemapi Hide this for inner system use.
2041     * @since 8
2042     */
2043    MMS_VERSION_1_2,
2044
2045    /**
2046     * Indicates MMS version 1_3.
2047     *
2048     * @syscap SystemCapability.Telephony.SmsMms
2049     * @systemapi Hide this for inner system use.
2050     * @since 8
2051     */
2052    MMS_VERSION_1_3,
2053  }
2054
2055  /**
2056   * Enumerates MMS character sets.
2057   *
2058   * @enum { number }
2059   * @syscap SystemCapability.Telephony.SmsMms
2060   * @systemapi Hide this for inner system use.
2061   * @since 8
2062   */
2063  export enum MmsCharSets {
2064    /**
2065     * Indicates the BIG5 format.
2066     *
2067     * @syscap SystemCapability.Telephony.SmsMms
2068     * @systemapi Hide this for inner system use.
2069     * @since 8
2070     */
2071    BIG5 = 0X07EA,
2072
2073    /**
2074     * Indicates the ISO_10646_UCS_2 format.
2075     *
2076     * @syscap SystemCapability.Telephony.SmsMms
2077     * @systemapi Hide this for inner system use.
2078     * @since 8
2079     */
2080    ISO_10646_UCS_2 = 0X03E8,
2081
2082    /**
2083     * Indicates the ISO_8859_1 format.
2084     *
2085     * @syscap SystemCapability.Telephony.SmsMms
2086     * @systemapi Hide this for inner system use.
2087     * @since 8
2088     */
2089    ISO_8859_1 = 0X04,
2090
2091    /**
2092     * Indicates the ISO_8859_2 format.
2093     *
2094     * @syscap SystemCapability.Telephony.SmsMms
2095     * @systemapi Hide this for inner system use.
2096     * @since 8
2097     */
2098    ISO_8859_2,
2099
2100    /**
2101     * Indicates the ISO_8859_3 format.
2102     *
2103     * @syscap SystemCapability.Telephony.SmsMms
2104     * @systemapi Hide this for inner system use.
2105     * @since 8
2106     */
2107    ISO_8859_3,
2108
2109    /**
2110     * Indicates the ISO_8859_4 format.
2111     *
2112     * @syscap SystemCapability.Telephony.SmsMms
2113     * @systemapi Hide this for inner system use.
2114     * @since 8
2115     */
2116    ISO_8859_4,
2117
2118    /**
2119     * Indicates the ISO_8859_5 format.
2120     *
2121     * @syscap SystemCapability.Telephony.SmsMms
2122     * @systemapi Hide this for inner system use.
2123     * @since 8
2124     */
2125    ISO_8859_5,
2126
2127    /**
2128     * Indicates the ISO_8859_6 format.
2129     *
2130     * @syscap SystemCapability.Telephony.SmsMms
2131     * @systemapi Hide this for inner system use.
2132     * @since 8
2133     */
2134    ISO_8859_6,
2135
2136    /**
2137     * Indicates the ISO_8859_7 format.
2138     *
2139     * @syscap SystemCapability.Telephony.SmsMms
2140     * @systemapi Hide this for inner system use.
2141     * @since 8
2142     */
2143    ISO_8859_7,
2144
2145    /**
2146     * Indicates the ISO_8859_8 format.
2147     *
2148     * @syscap SystemCapability.Telephony.SmsMms
2149     * @systemapi Hide this for inner system use.
2150     * @since 8
2151     */
2152    ISO_8859_8,
2153
2154    /**
2155     * Indicates the ISO_8859_9 format.
2156     *
2157     * @syscap SystemCapability.Telephony.SmsMms
2158     * @systemapi Hide this for inner system use.
2159     * @since 8
2160     */
2161    ISO_8859_9,
2162
2163    /**
2164     * Indicates the SHIFT_JIS format.
2165     *
2166     * @syscap SystemCapability.Telephony.SmsMms
2167     * @systemapi Hide this for inner system use.
2168     * @since 8
2169     */
2170    SHIFT_JIS = 0X11,
2171
2172    /**
2173     * Indicates the US_ASCII format.
2174     *
2175     * @syscap SystemCapability.Telephony.SmsMms
2176     * @systemapi Hide this for inner system use.
2177     * @since 8
2178     */
2179    US_ASCII = 0X03,
2180
2181    /**
2182     * Indicates the UTF_8 format.
2183     *
2184     * @syscap SystemCapability.Telephony.SmsMms
2185     * @systemapi Hide this for inner system use.
2186     * @since 8
2187     */
2188    UTF_8 = 0X6A,
2189  }
2190
2191  /**
2192   * Enumerates disposition types.
2193   *
2194   * @enum { number }
2195   * @syscap SystemCapability.Telephony.SmsMms
2196   * @systemapi Hide this for inner system use.
2197   * @since 8
2198   */
2199  export enum DispositionType {
2200    /**
2201     * Indicates the data source type.
2202     *
2203     * @syscap SystemCapability.Telephony.SmsMms
2204     * @systemapi Hide this for inner system use.
2205     * @since 8
2206     */
2207    FROM_DATA = 0,
2208
2209    /**
2210     * Indicates the attachment type.
2211     *
2212     * @syscap SystemCapability.Telephony.SmsMms
2213     * @systemapi Hide this for inner system use.
2214     * @since 8
2215     */
2216    ATTACHMENT,
2217
2218    /**
2219     * Indicates the inlining type.
2220     *
2221     * @syscap SystemCapability.Telephony.SmsMms
2222     * @systemapi Hide this for inner system use.
2223     * @since 8
2224     */
2225    INLINE,
2226  }
2227
2228  /**
2229   * Enumerates report types.
2230   *
2231   * @enum { number }
2232   * @syscap SystemCapability.Telephony.SmsMms
2233   * @systemapi Hide this for inner system use.
2234   * @since 8
2235   */
2236  export enum ReportType {
2237    /**
2238     * Indicates that a report is required.
2239     *
2240     * @syscap SystemCapability.Telephony.SmsMms
2241     * @systemapi Hide this for inner system use.
2242     * @since 8
2243     */
2244    MMS_YES = 128,
2245
2246    /**
2247     * Indicates that a report is not required.
2248     *
2249     * @syscap SystemCapability.Telephony.SmsMms
2250     * @systemapi Hide this for inner system use.
2251     * @since 8
2252     */
2253    MMS_NO,
2254  }
2255
2256  /**
2257   * Defines the cell broadcast configuration options.
2258   *
2259   * @interface CBConfigOptions
2260   * @syscap SystemCapability.Telephony.SmsMms
2261   * @systemapi Hide this for inner system use.
2262   * @since 7
2263   */
2264  export interface CBConfigOptions {
2265    /**
2266     * Indicates the card slot ID for the cell broadcast configuration options.
2267     *
2268     * @type { number }
2269     * @syscap SystemCapability.Telephony.SmsMms
2270     * @systemapi Hide this for inner system use.
2271     * @since 7
2272     */
2273    slotId: number;
2274
2275    /**
2276     * Indicates whether to enable cell broadcast.
2277     *
2278     * @type { boolean }
2279     * @syscap SystemCapability.Telephony.SmsMms
2280     * @systemapi Hide this for inner system use.
2281     * @since 7
2282     */
2283    enable: boolean;
2284
2285    /**
2286     * Indicates the start message ID for the cell broadcast configuration options.
2287     *
2288     * @type { number }
2289     * @syscap SystemCapability.Telephony.SmsMms
2290     * @systemapi Hide this for inner system use.
2291     * @since 7
2292     */
2293    startMessageId: number;
2294
2295    /**
2296     * Indicates the end message ID for the cell broadcast configuration options.
2297     *
2298     * @type { number }
2299     * @syscap SystemCapability.Telephony.SmsMms
2300     * @systemapi Hide this for inner system use.
2301     * @since 7
2302     */
2303    endMessageId: number;
2304
2305    /**
2306     * Indicates the RAN type for the cell broadcast configuration options.
2307     *
2308     * @type { RanType }
2309     * @syscap SystemCapability.Telephony.SmsMms
2310     * @systemapi Hide this for inner system use.
2311     * @since 7
2312     */
2313    ranType: RanType;
2314  }
2315
2316  /**
2317   * Defines the SIM message options.
2318   *
2319   * @interface SimMessageOptions
2320   * @syscap SystemCapability.Telephony.SmsMms
2321   * @systemapi Hide this for inner system use.
2322   * @since 7
2323   */
2324  export interface SimMessageOptions {
2325    /**
2326     * Indicates the card slot ID for the SIM message options.
2327     *
2328     * @type { number }
2329     * @syscap SystemCapability.Telephony.SmsMms
2330     * @systemapi Hide this for inner system use.
2331     * @since 7
2332     */
2333    slotId: number;
2334
2335    /**
2336     * Indicates the short message service center for the SIM message options.
2337     *
2338     * @type { string }
2339     * @syscap SystemCapability.Telephony.SmsMms
2340     * @systemapi Hide this for inner system use.
2341     * @since 7
2342     */
2343    smsc: string;
2344
2345    /**
2346     * Indicates the protocol data unit for the SIM message options.
2347     *
2348     * @type { string }
2349     * @syscap SystemCapability.Telephony.SmsMms
2350     * @systemapi Hide this for inner system use.
2351     * @since 7
2352     */
2353    pdu: string;
2354
2355    /**
2356     * Indicates the status for the SIM message options.
2357     *
2358     * @type { SimMessageStatus }
2359     * @syscap SystemCapability.Telephony.SmsMms
2360     * @systemapi Hide this for inner system use.
2361     * @since 7
2362     */
2363    status: SimMessageStatus;
2364  }
2365
2366  /**
2367   * Defines the updating SIM message options.
2368   *
2369   * @interface UpdateSimMessageOptions
2370   * @syscap SystemCapability.Telephony.SmsMms
2371   * @systemapi Hide this for inner system use.
2372   * @since 7
2373   */
2374  export interface UpdateSimMessageOptions {
2375    /**
2376     * Indicates the card slot ID for the updating SIM message options.
2377     *
2378     * @type { number }
2379     * @syscap SystemCapability.Telephony.SmsMms
2380     * @systemapi Hide this for inner system use.
2381     * @since 7
2382     */
2383    slotId: number;
2384
2385    /**
2386     * Indicates the message index for the updating SIM message options.
2387     *
2388     * @type { number }
2389     * @syscap SystemCapability.Telephony.SmsMms
2390     * @systemapi Hide this for inner system use.
2391     * @since 7
2392     */
2393    msgIndex: number;
2394
2395    /**
2396     * Indicates the new status for the updating SIM message options.
2397     *
2398     * @type { SimMessageStatus }
2399     * @syscap SystemCapability.Telephony.SmsMms
2400     * @systemapi Hide this for inner system use.
2401     * @since 7
2402     */
2403    newStatus: SimMessageStatus;
2404
2405    /**
2406     * Indicates the protocol data unit for the updating SIM message options.
2407     *
2408     * @type { string }
2409     * @syscap SystemCapability.Telephony.SmsMms
2410     * @systemapi Hide this for inner system use.
2411     * @since 7
2412     */
2413    pdu: string;
2414
2415    /**
2416     * Indicates the short message service center for the updating SIM message options.
2417     *
2418     * @type { string }
2419     * @syscap SystemCapability.Telephony.SmsMms
2420     * @systemapi Hide this for inner system use.
2421     * @since 7
2422     */
2423    smsc: string;
2424  }
2425
2426  /**
2427   * Defines an SMS message instance.
2428   *
2429   * @interface ShortMessage
2430   * @syscap SystemCapability.Telephony.SmsMms
2431   * @since 6
2432   */
2433  export interface ShortMessage {
2434    /**
2435     * Indicates the SMS message body.
2436     *
2437     * @type { string }
2438     * @syscap SystemCapability.Telephony.SmsMms
2439     * @since 6
2440     */
2441    visibleMessageBody: string;
2442
2443    /**
2444     * Indicates the address of the sender, which is to be displayed on the UI.
2445     *
2446     * @type { string }
2447     * @syscap SystemCapability.Telephony.SmsMms
2448     * @since 6
2449     */
2450    visibleRawAddress: string;
2451
2452    /**
2453     * Indicates the SMS type.
2454     *
2455     * @type { ShortMessageClass }
2456     * @syscap SystemCapability.Telephony.SmsMms
2457     * @since 6
2458     */
2459    messageClass: ShortMessageClass;
2460
2461    /**
2462     * Indicates the protocol identifier.
2463     *
2464     * @type { number }
2465     * @syscap SystemCapability.Telephony.SmsMms
2466     * @since 6
2467     */
2468    protocolId: number;
2469
2470    /**
2471     * Indicates the short message service center (SMSC) address.
2472     *
2473     * @type { string }
2474     * @syscap SystemCapability.Telephony.SmsMms
2475     * @since 6
2476     */
2477    scAddress: string;
2478
2479    /**
2480     * Indicates the SMSC timestamp.
2481     *
2482     * @type { number }
2483     * @syscap SystemCapability.Telephony.SmsMms
2484     * @since 6
2485     */
2486    scTimestamp: number;
2487
2488    /**
2489     * Indicates whether the received SMS is a "replace short message".
2490     *
2491     * @type { boolean }
2492     * @syscap SystemCapability.Telephony.SmsMms
2493     * @since 6
2494     */
2495    isReplaceMessage: boolean;
2496
2497    /**
2498     * Indicates whether the received SMS contains "TP-Reply-Path".
2499     *
2500     * @type { boolean }
2501     * @syscap SystemCapability.Telephony.SmsMms
2502     * @since 6
2503     */
2504    hasReplyPath: boolean;
2505
2506    /**
2507     * Indicates Protocol Data Units (PDUs) from an SMS message.
2508     *
2509     * @type { Array<number> }
2510     * @syscap SystemCapability.Telephony.SmsMms
2511     * @since 6
2512     */
2513    pdu: Array<number>;
2514
2515    /**
2516     * Indicates the SMS message status from the SMS-STATUS-REPORT message sent by the
2517     * Short Message Service Center (SMSC).
2518     *
2519     * @type { number }
2520     * @syscap SystemCapability.Telephony.SmsMms
2521     * @since 6
2522     */
2523    status: number;
2524
2525    /**
2526     * Indicates whether the current message is SMS-STATUS-REPORT.
2527     *
2528     * @type { boolean }
2529     * @syscap SystemCapability.Telephony.SmsMms
2530     * @since 6
2531     */
2532    isSmsStatusReportMessage: boolean;
2533  }
2534
2535  /**
2536   * Defines a SIM message.
2537   *
2538   * @interface SimShortMessage
2539   * @syscap SystemCapability.Telephony.SmsMms
2540   * @systemapi Hide this for inner system use.
2541   * @since 7
2542   */
2543  export interface SimShortMessage {
2544    /**
2545     * Indicates the SMS message in the SIM.
2546     *
2547     * @type { ShortMessage }
2548     * @syscap SystemCapability.Telephony.SmsMms
2549     * @systemapi Hide this for inner system use.
2550     * @since 7
2551     */
2552    shortMessage: ShortMessage;
2553
2554    /**
2555     * Indicates the storage status of SMS messages in the SIM.
2556     *
2557     * @type { SimMessageStatus }
2558     * @syscap SystemCapability.Telephony.SmsMms
2559     * @systemapi Hide this for inner system use.
2560     * @since 7
2561     */
2562    simMessageStatus: SimMessageStatus;
2563
2564    /**
2565     * Indicates the index of SMS messages in the SIM.
2566     *
2567     * @type { number }
2568     * @syscap SystemCapability.Telephony.SmsMms
2569     * @systemapi Hide this for inner system use.
2570     * @since 7
2571     */
2572    indexOnSim: number;
2573  }
2574
2575  /**
2576   * Defines the SIM message status.
2577   *
2578   * @enum { number }
2579   * @syscap SystemCapability.Telephony.SmsMms
2580   * @systemapi Hide this for inner system use.
2581   * @since 7
2582   */
2583  export enum SimMessageStatus {
2584    /**
2585     * Status free space on SIM.
2586     *
2587     * @syscap SystemCapability.Telephony.SmsMms
2588     * @systemapi Hide this for inner system use.
2589     * @since 7
2590     */
2591    SIM_MESSAGE_STATUS_FREE = 0,
2592
2593    /**
2594     * Indicates a read message.
2595     *
2596     * @syscap SystemCapability.Telephony.SmsMms
2597     * @systemapi Hide this for inner system use.
2598     * @since 7
2599     */
2600    SIM_MESSAGE_STATUS_READ = 1,
2601
2602    /**
2603     * Indicates an unread message.
2604     *
2605     * @syscap SystemCapability.Telephony.SmsMms
2606     * @systemapi Hide this for inner system use.
2607     * @since 7
2608     */
2609    SIM_MESSAGE_STATUS_UNREAD = 3,
2610
2611    /**
2612     * Indicates a sent message (only applicable to SMS).
2613     *
2614     * @syscap SystemCapability.Telephony.SmsMms
2615     * @systemapi Hide this for inner system use.
2616     * @since 7
2617     */
2618    SIM_MESSAGE_STATUS_SENT = 5,
2619
2620    /**
2621     * Indicates an unsent message (only applicable to SMS).
2622     *
2623     * @syscap SystemCapability.Telephony.SmsMms
2624     * @systemapi Hide this for inner system use.
2625     * @since 7
2626     */
2627    SIM_MESSAGE_STATUS_UNSENT = 7,
2628  }
2629
2630  /**
2631   * Enumerates SMS message types.
2632   *
2633   * @enum { number }
2634   * @syscap SystemCapability.Telephony.SmsMms
2635   * @since 6
2636   */
2637  export enum ShortMessageClass {
2638    /**
2639     * Indicates an unknown type.
2640     *
2641     * @syscap SystemCapability.Telephony.SmsMms
2642     * @since 6
2643     */
2644    UNKNOWN,
2645
2646    /**
2647     * Indicates an instant message, which is displayed immediately after being received.
2648     *
2649     * @syscap SystemCapability.Telephony.SmsMms
2650     * @since 6
2651     */
2652    INSTANT_MESSAGE,
2653
2654    /**
2655     * Indicates an SMS message that can be stored on the device or SIM card based on the storage status.
2656     *
2657     * @syscap SystemCapability.Telephony.SmsMms
2658     * @since 6
2659     */
2660    OPTIONAL_MESSAGE,
2661
2662    /**
2663     * Indicates an SMS message containing SIM card information, which is to be stored in a SIM card.
2664     *
2665     * @syscap SystemCapability.Telephony.SmsMms
2666     * @since 6
2667     */
2668    SIM_MESSAGE,
2669
2670    /**
2671     * Indicates an SMS message to be forwarded to another device.
2672     *
2673     * @syscap SystemCapability.Telephony.SmsMms
2674     * @since 6
2675     */
2676    FORWARD_MESSAGE
2677  }
2678
2679  /**
2680   * Provides the options (including callbacks) for sending an SMS message.
2681   *
2682   * @interface SendMessageOptions
2683   * @syscap SystemCapability.Telephony.SmsMms
2684   * @since 6
2685   */
2686  export interface SendMessageOptions {
2687    /**
2688     * Indicates the ID of the SIM card slot used for sending the SMS message.
2689     *
2690     * @type { number }
2691     * @syscap SystemCapability.Telephony.SmsMms
2692     * @since 6
2693     */
2694    slotId: number;
2695
2696    /**
2697     * Indicates the address to which the SMS message is sent.
2698     *
2699     * @type { string }
2700     * @syscap SystemCapability.Telephony.SmsMms
2701     * @since 6
2702     */
2703    destinationHost: string;
2704
2705    /**
2706     * Indicates the SMSC address. If the value is {@code null}, the default SMSC address of the SIM card.
2707     *
2708     * @type { ?string }
2709     * @syscap SystemCapability.Telephony.SmsMms
2710     * @since 6
2711     */
2712    serviceCenter?: string;
2713
2714    /**
2715     * If the content is a string, this is a short message. If the content is a byte array, this is a data message.
2716     *
2717     * @type { string | Array<number> }
2718     * @syscap SystemCapability.Telephony.SmsMms
2719     * @since 6
2720     */
2721    content: string | Array<number>;
2722
2723    /**
2724     * If send data message, destinationPort is mandatory. Otherwise is optional.
2725     *
2726     * @type { ?number }
2727     * @syscap SystemCapability.Telephony.SmsMms
2728     * @since 6
2729     */
2730    destinationPort?: number;
2731
2732    /**
2733     * Indicates the callback invoked after the SMS message is sent.
2734     *
2735     * @type { ?AsyncCallback<ISendShortMessageCallback> }
2736     * @syscap SystemCapability.Telephony.SmsMms
2737     * @since 6
2738     */
2739    sendCallback?: AsyncCallback<ISendShortMessageCallback>;
2740
2741    /**
2742     * Indicates the callback invoked after the SMS message is delivered.
2743     *
2744     * @type { ?AsyncCallback<IDeliveryShortMessageCallback> }
2745     * @syscap SystemCapability.Telephony.SmsMms
2746     * @since 6
2747     */
2748    deliveryCallback?: AsyncCallback<IDeliveryShortMessageCallback>;
2749  }
2750
2751  /**
2752   * Provides the callback for the SMS message sending result.
2753   *
2754   * @interface ISendShortMessageCallback
2755   * @syscap SystemCapability.Telephony.SmsMms
2756   * @since 6
2757   */
2758  export interface ISendShortMessageCallback {
2759    /**
2760     * Indicates the SMS message sending result.
2761     *
2762     * @type { SendSmsResult }
2763     * @syscap SystemCapability.Telephony.SmsMms
2764     * @since 6
2765     */
2766    result: SendSmsResult;
2767
2768    /**
2769     * Indicates the URI to store the sent SMS message.
2770     *
2771     * @type { string }
2772     * @syscap SystemCapability.Telephony.SmsMms
2773     * @since 6
2774     */
2775    url: string;
2776
2777    /**
2778     * Specifies whether this is the last part of a multi-part SMS message.
2779     *
2780     * @type { boolean }
2781     * @syscap SystemCapability.Telephony.SmsMms
2782     * @since 6
2783     */
2784    isLastPart: boolean;
2785  }
2786
2787  /**
2788   * Provides the callback for the SMS message delivery report.
2789   *
2790   * @interface IDeliveryShortMessageCallback
2791   * @syscap SystemCapability.Telephony.SmsMms
2792   * @since 6
2793   */
2794  export interface IDeliveryShortMessageCallback {
2795    /**
2796     * Indicates the SMS delivery report.
2797     *
2798     * @type { Array<number> }
2799     * @syscap SystemCapability.Telephony.SmsMms
2800     * @since 6
2801     */
2802    pdu: Array<number>;
2803  }
2804
2805  /**
2806   * Enumerates SMS message sending results.
2807   *
2808   * @enum { number }
2809   * @syscap SystemCapability.Telephony.SmsMms
2810   * @since 6
2811   */
2812  export enum SendSmsResult {
2813    /**
2814     * Indicates that the SMS message is successfully sent.
2815     *
2816     * @syscap SystemCapability.Telephony.SmsMms
2817     * @since 6
2818     */
2819    SEND_SMS_SUCCESS = 0,
2820
2821    /**
2822     * Indicates that sending the SMS message fails due to an unknown reason.
2823     *
2824     * @syscap SystemCapability.Telephony.SmsMms
2825     * @since 6
2826     */
2827    SEND_SMS_FAILURE_UNKNOWN = 1,
2828
2829    /**
2830     * Indicates that sending the SMS fails because the modem is powered off.
2831     *
2832     * @syscap SystemCapability.Telephony.SmsMms
2833     * @since 6
2834     */
2835    SEND_SMS_FAILURE_RADIO_OFF = 2,
2836
2837    /**
2838     * Indicates that sending the SMS message fails because the network is unavailable
2839     * or does not support sending or reception of SMS messages.
2840     *
2841     * @syscap SystemCapability.Telephony.SmsMms
2842     * @since 6
2843     */
2844    SEND_SMS_FAILURE_SERVICE_UNAVAILABLE = 3
2845  }
2846
2847  /**
2848   * Enumerates RAN type.
2849   *
2850   * @enum { number }
2851   * @syscap SystemCapability.Telephony.SmsMms
2852   * @systemapi Hide this for inner system use.
2853   * @since 7
2854   */
2855  export enum RanType {
2856    /**
2857     * Indicates GSM type.
2858     *
2859     * @syscap SystemCapability.Telephony.SmsMms
2860     * @systemapi Hide this for inner system use.
2861     * @since 7
2862     */
2863    TYPE_GSM = 1,
2864
2865    /**
2866     * Indicates CDMA type.
2867     *
2868     * @syscap SystemCapability.Telephony.SmsMms
2869     * @systemapi Hide this for inner system use.
2870     * @since 7
2871     */
2872    TYPE_CDMA = 2,
2873  }
2874
2875  /**
2876   * Defines the SMS message segment information.
2877   *
2878   * @interface SmsSegmentsInfo
2879   * @syscap SystemCapability.Telephony.SmsMms
2880   * @systemapi Hide this for inner system use.
2881   * @since 8
2882   */
2883  export interface SmsSegmentsInfo {
2884    /**
2885     * Indicates the split count for the SMS message segment information.
2886     *
2887     * @type { number }
2888     * @syscap SystemCapability.Telephony.SmsMms
2889     * @systemapi Hide this for inner system use.
2890     * @since 8
2891     */
2892    splitCount: number;
2893
2894    /**
2895     * Indicates the encoding count for the SMS message segment information.
2896     *
2897     * @type { number }
2898     * @syscap SystemCapability.Telephony.SmsMms
2899     * @systemapi Hide this for inner system use.
2900     * @since 8
2901     */
2902    encodeCount: number;
2903
2904    /**
2905     * Indicates the remaining encoding count for the SMS message segment information.
2906     *
2907     * @type { number }
2908     * @syscap SystemCapability.Telephony.SmsMms
2909     * @systemapi Hide this for inner system use.
2910     * @since 8
2911     */
2912    encodeCountRemaining: number;
2913
2914    /**
2915     * Indicates the encoding scheme for the SMS message segment information.
2916     *
2917     * @type { SmsEncodingScheme }
2918     * @syscap SystemCapability.Telephony.SmsMms
2919     * @systemapi Hide this for inner system use.
2920     * @since 8
2921     */
2922    scheme: SmsEncodingScheme;
2923  }
2924
2925  /**
2926   * Enumerates SMS encoding schemes.
2927   *
2928   * @enum { number }
2929   * @syscap SystemCapability.Telephony.SmsMms
2930   * @systemapi Hide this for inner system use.
2931   * @since 8
2932   */
2933  export enum SmsEncodingScheme {
2934    /**
2935     * Indicates an unknown encoding schemes.
2936     *
2937     * @syscap SystemCapability.Telephony.SmsMms
2938     * @systemapi Hide this for inner system use.
2939     * @since 8
2940     */
2941    SMS_ENCODING_UNKNOWN = 0,
2942
2943    /**
2944     * Indicates that the encoding schemes is 7-digit.
2945     *
2946     * @syscap SystemCapability.Telephony.SmsMms
2947     * @systemapi Hide this for inner system use.
2948     * @since 8
2949     */
2950    SMS_ENCODING_7BIT,
2951
2952    /**
2953     * Indicates that the encoding schemes is 8-digit.
2954     *
2955     * @syscap SystemCapability.Telephony.SmsMms
2956     * @systemapi Hide this for inner system use.
2957     * @since 8
2958     */
2959    SMS_ENCODING_8BIT,
2960
2961    /**
2962     * Indicates that the encoding schemes is 16-digit.
2963     *
2964     * @syscap SystemCapability.Telephony.SmsMms
2965     * @systemapi Hide this for inner system use.
2966     * @since 8
2967     */
2968    SMS_ENCODING_16BIT,
2969  }
2970}
2971
2972export default sms;
2973