gecko/dom/mobilemessage/interfaces/nsISmsMessenger.idl

70 lines
2.7 KiB
Plaintext

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "domstubs.idl"
#include "nsISupports.idl"
[scriptable, uuid(f77ad4d4-68a9-11e4-920f-0b26b7a5e713)]
interface nsISmsMessenger : nsISupports
{
/* 'sms-received' system message */
const unsigned short NOTIFICATION_TYPE_RECEIVED = 0;
/* 'sms-sent' system message */
const unsigned short NOTIFICATION_TYPE_SENT = 1;
/* 'sms-delivery-success' system message */
const unsigned short NOTIFICATION_TYPE_DELIVERY_SUCCESS = 2;
/**
* To broadcast 'sms-received', 'sms-delivery-success', 'sms-sent' system message
*
* Note: Except aNotificationType, all parameters are the attributes of the
* nsIDOMMozSmsMessage generated by nsIMobileMessageService.createSmsMessage().
*
* @param aNotificationType
* A predefined constant of nsISmsMessenger.NOTIFICATION_TYPE_*.
* @param aId
* The unique identity of this message.
* @param aThreadId
* The unique identity of the thread this message belongs to.
* @param aIccId
* Integrated Circuit Card Identifier. null if ICC is not available.
* @param aDelivery
* A predefined constant of nsISmsService.DELIVERY_TYPE_*.
* @param aDeliveryStatus
* A predefined constant of nsISmsService.DELIVERY_STATUS_TYPE_*.
* @param aSender
* Sender address. null if not available.
* @param aReceiver
* Receiver address. null if not available.
* @param aBody
* Text message body. null if not available.
* @param aMessageClass
* A predefined constant of nsISmsService.MESSAGE_CLASS_TYPE_*.
* @param aTimestamp
* The device system time when creating or saving this message.
* @param aSentTimestamp
* The SMSC timestamp of the incoming message.
* 0 if not available.
* @param aDeliveryTimestamp
* The delivery timestamp to the remote party of the sent message.
* 0 if not available.
* @param aRead
* True if the message was read.
*/
void notifySms(in unsigned short aNotificationType,
in long aId,
in unsigned long long aThreadId,
in DOMString aIccId,
in unsigned long aDelivery,
in unsigned long aDeliveryStatus,
in DOMString aSender,
in DOMString aReceiver,
in DOMString aBody,
in unsigned long aMessageClass,
in DOMTimeStamp aTimestamp,
in DOMTimeStamp aSentTimestamp,
in DOMTimeStamp aDeliveryTimestamp,
in boolean aRead);
};