2012-05-17 23:42:38 +04:00
|
|
|
/* 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/. */
|
2011-11-21 02:59:46 +04:00
|
|
|
|
2012-01-10 23:19:56 +04:00
|
|
|
#include "nsISupports.idl"
|
2011-11-21 02:59:46 +04:00
|
|
|
|
2012-01-10 23:19:56 +04:00
|
|
|
%{C++
|
|
|
|
#define SMS_DATABASE_SERVICE_CID \
|
2012-01-17 22:43:08 +04:00
|
|
|
{ 0x2454c2a1, 0xefdd, 0x4d96, \
|
|
|
|
{ 0x83, 0xbd, 0x51, 0xa2, 0x9a, 0x21, 0xf5, 0xab } }
|
2012-01-10 23:19:56 +04:00
|
|
|
#define SMS_DATABASE_SERVICE_CONTRACTID "@mozilla.org/sms/smsdatabaseservice;1"
|
|
|
|
%}
|
2011-11-21 02:59:46 +04:00
|
|
|
|
2012-01-17 22:42:05 +04:00
|
|
|
interface nsIDOMMozSmsFilter;
|
2012-11-07 01:29:30 +04:00
|
|
|
interface nsISmsRequest;
|
2012-01-17 22:42:05 +04:00
|
|
|
|
2012-11-14 02:44:18 +04:00
|
|
|
[scriptable, uuid(6ad55465-6937-4491-93ca-29dad9775d46)]
|
2012-01-10 23:19:56 +04:00
|
|
|
interface nsISmsDatabaseService : nsISupports
|
2011-11-21 02:59:46 +04:00
|
|
|
{
|
2012-02-22 12:55:01 +04:00
|
|
|
// Takes some information required to save the message and returns its id.
|
2012-10-31 13:10:44 +04:00
|
|
|
long saveReceivedMessage(in DOMString aSender, in DOMString aBody, in DOMString aMessageClass, in unsigned long long aDate);
|
2012-01-13 17:25:47 +04:00
|
|
|
// Takes some information required to save the message and returns its id.
|
|
|
|
long saveSentMessage(in DOMString aReceiver, in DOMString aBody, in unsigned long long aDate);
|
2012-10-30 14:53:24 +04:00
|
|
|
void setMessageDeliveryStatus(in long aMessageId, in DOMString aDeliveryStatus);
|
2011-12-20 19:58:58 +04:00
|
|
|
|
2012-11-07 01:29:30 +04:00
|
|
|
[binaryname(GetMessageMoz)]
|
|
|
|
void getMessage(in long messageId, in nsISmsRequest request);
|
|
|
|
void deleteMessage(in long messageId, in nsISmsRequest request);
|
|
|
|
void createMessageList(in nsIDOMMozSmsFilter filter, in boolean reverse, in nsISmsRequest request);
|
|
|
|
void getNextMessageInList(in long listId, in nsISmsRequest request);
|
2012-01-17 22:43:08 +04:00
|
|
|
void clearMessageList(in long listId);
|
2012-11-07 01:29:30 +04:00
|
|
|
void markMessageRead(in long messageId, in boolean value, in nsISmsRequest request);
|
2011-11-21 02:59:46 +04:00
|
|
|
};
|