2012-05-17 12:42:38 -07: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-20 14:59:46 -08:00
|
|
|
|
2012-01-10 11:19:56 -08:00
|
|
|
#include "nsISupports.idl"
|
2011-11-20 14:59:46 -08:00
|
|
|
|
2012-01-10 11:19:56 -08:00
|
|
|
%{C++
|
|
|
|
#define SMS_DATABASE_SERVICE_CID \
|
2012-01-17 10:43:08 -08:00
|
|
|
{ 0x2454c2a1, 0xefdd, 0x4d96, \
|
|
|
|
{ 0x83, 0xbd, 0x51, 0xa2, 0x9a, 0x21, 0xf5, 0xab } }
|
2012-01-10 11:19:56 -08:00
|
|
|
#define SMS_DATABASE_SERVICE_CONTRACTID "@mozilla.org/sms/smsdatabaseservice;1"
|
|
|
|
%}
|
2011-11-20 14:59:46 -08:00
|
|
|
|
2012-01-17 10:42:05 -08:00
|
|
|
interface nsIDOMMozSmsFilter;
|
|
|
|
|
2012-05-17 12:42:38 -07:00
|
|
|
[scriptable, uuid(30e8cdfb-155d-44c7-8fb3-6bcd9c1c3f99)]
|
2012-01-10 11:19:56 -08:00
|
|
|
interface nsISmsDatabaseService : nsISupports
|
2011-11-20 14:59:46 -08:00
|
|
|
{
|
2012-02-22 00:55:01 -08:00
|
|
|
// Takes some information required to save the message and returns its id.
|
|
|
|
long saveReceivedMessage(in DOMString aSender, in DOMString aBody, in unsigned long long aDate);
|
2012-01-13 05:25:47 -08: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);
|
2011-12-20 07:58:58 -08:00
|
|
|
|
|
|
|
[binaryname(GetMessageMoz)] void getMessage(in long messageId, in long requestId, [optional] in unsigned long long processId);
|
2012-01-17 10:41:22 -08:00
|
|
|
void deleteMessage(in long messageId, in long requestId, [optional] in unsigned long long processId);
|
2012-01-17 10:42:05 -08:00
|
|
|
|
|
|
|
void createMessageList(in nsIDOMMozSmsFilter filter, in boolean reverse, in long requestId, [optional] in unsigned long long processId);
|
2012-03-12 16:44:28 -07:00
|
|
|
void getNextMessageInList(in long listId, in long requestId, [optional] in unsigned long long processId);
|
2012-01-17 10:43:08 -08:00
|
|
|
void clearMessageList(in long listId);
|
2012-05-17 12:42:38 -07:00
|
|
|
void markMessageRead(in long messageId, in boolean value, in long requestId, [optional] in unsigned long long processId);
|
2011-11-20 14:59:46 -08:00
|
|
|
};
|