gecko/dom/mobilemessage/interfaces/nsIRilMobileMessageDatabaseService.idl

55 lines
2.3 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"
#include "nsIMobileMessageDatabaseService.idl"
[scriptable, function, uuid(0bffae74-71db-11e2-962a-73cf64d6393e)]
interface nsIRilMobileMessageDatabaseCallback : nsISupports
{
/**
* |aRecord| Object: the mobile-message database record
*/
void notify(in nsresult aRv, in jsval aRecord);
};
[scriptable, uuid(a31b1716-8631-11e2-afaa-2fbd087f426e)]
interface nsIRilMobileMessageDatabaseService : nsIMobileMessageDatabaseService
{
/**
* |aMessage| Object: should contain the following properties for internal use:
* - |type| DOMString: "sms" or "mms"
* - |sender| DOMString: the phone number of sender
* - |timestamp| Number: the timestamp of received message
* - |messageClass| DOMString: the message class of received message
*/
long saveReceivedMessage(in jsval aMessage,
[optional] in nsIRilMobileMessageDatabaseCallback aCallback);
/**
* |aMessage| Object: should contain the following properties for internal use:
* - |type| DOMString: "sms" or "mms"
* - |receiver| DOMString: the phone number of receiver (needed if type = "sms")
* - |receivers| DOMString: the phone numbers of receivers (needed if type = "mms")
* - |timestamp| Number: the timestamp of sending message
* - |deliveryStatusRequested| Bool: true when the delivery report is requested.
*/
long saveSendingMessage(in jsval aMessage,
[optional] in nsIRilMobileMessageDatabaseCallback aCallback);
/**
* |aMessageId| Number: the message's DB record ID.
* |aReceiver| DOMString: the phone number of receiver (for MMS; can be null).
* |aDelivery| DOMString: the new delivery value to update (can be null).
* |aDeliveryStatus| DOMString: the new delivery status to update (can be null).
* |aCallback| nsIRilMobileMessageDatabaseCallback: an optional callback.
*/
void setMessageDelivery(in long aMessageId,
in DOMString aReceiver,
in DOMString aDelivery,
in DOMString aDeliveryStatus,
[optional] in nsIRilMobileMessageDatabaseCallback aCallback);
};