gecko-dev/dom/mobilemessage/interfaces/nsISmsMessenger.idl

75 lines
3.0 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(3be7c6ac-e27d-11e4-b6da-7bbe0e4cd4ec)]
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;
/* 'sms-failed' system message */
const unsigned short NOTIFICATION_TYPE_SENT_FAILED = 3;
/* 'sms-delivery-error' system message */
const unsigned short NOTIFICATION_TYPE_DELIVERY_ERROR = 4;
/**
* To broadcast system messages of 'sms-received', 'sms-delivery-success',
* 'sms-sent', 'sms-failed' and 'sms-delivery-error'.
*
* Note: Except aNotificationType, all parameters are the attributes of the
* nsISmsMessage 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);
};