2012-11-06 13:29:30 -08: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/. */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2012-11-14 11:49:56 -08:00
|
|
|
dictionary SmsThreadListItem
|
|
|
|
{
|
2013-04-05 05:15:44 -07:00
|
|
|
unsigned long long id;
|
2012-11-14 11:49:56 -08:00
|
|
|
DOMString senderOrReceiver;
|
|
|
|
unsigned long long timestamp;
|
|
|
|
DOMString body;
|
|
|
|
unsigned long long unreadCount;
|
|
|
|
};
|
|
|
|
|
2013-04-29 02:50:55 -07:00
|
|
|
[scriptable, builtinclass, uuid(6e20c451-8bae-4b36-be3c-da166fdd10ba)]
|
2013-03-08 23:22:02 -08:00
|
|
|
interface nsIMobileMessageCallback : nsISupports
|
2012-11-06 13:29:30 -08:00
|
|
|
{
|
|
|
|
/**
|
2013-04-08 19:22:15 -07:00
|
|
|
* All SMS related errors.
|
2012-11-06 13:29:30 -08:00
|
|
|
* Make sure to keep this list in sync with the list in:
|
2013-03-07 09:55:49 -08:00
|
|
|
* mobile/android/GeckoSmsManager.java
|
2012-11-06 13:29:30 -08:00
|
|
|
*/
|
|
|
|
const unsigned short SUCCESS_NO_ERROR = 0;
|
|
|
|
const unsigned short NO_SIGNAL_ERROR = 1;
|
|
|
|
const unsigned short NOT_FOUND_ERROR = 2;
|
|
|
|
const unsigned short UNKNOWN_ERROR = 3;
|
|
|
|
const unsigned short INTERNAL_ERROR = 4;
|
|
|
|
|
2013-03-08 23:22:10 -08:00
|
|
|
/**
|
2013-03-07 19:46:16 -08:00
|
|
|
* |message| can be nsIDOMMoz{Mms,Sms}Message.
|
2013-03-08 23:22:10 -08:00
|
|
|
*/
|
|
|
|
void notifyMessageSent(in nsISupports message);
|
2012-11-06 13:29:30 -08:00
|
|
|
void notifySendMessageFailed(in long error);
|
|
|
|
|
2013-03-07 19:46:16 -08:00
|
|
|
/**
|
|
|
|
* |message| can be nsIDOMMoz{Mms,Sms}Message.
|
|
|
|
*/
|
|
|
|
void notifyMessageGot(in nsISupports message);
|
2012-11-06 13:29:30 -08:00
|
|
|
void notifyGetMessageFailed(in long error);
|
|
|
|
|
2013-04-29 02:50:55 -07:00
|
|
|
void notifyMessageDeleted([array, size_is(count)] in boolean deleted,
|
|
|
|
in uint32_t count);
|
2012-11-06 13:29:30 -08:00
|
|
|
void notifyDeleteMessageFailed(in long error);
|
|
|
|
|
|
|
|
void notifyMessageMarkedRead(in boolean read);
|
|
|
|
void notifyMarkMessageReadFailed(in long error);
|
|
|
|
};
|