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