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