2012-11-07 01:29:30 +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/. */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2015-08-10 04:08:23 +03:00
|
|
|
[scriptable, uuid(19b24f93-7c02-4acf-addd-2f53bbb4e3fd)]
|
2013-03-09 11:22:02 +04:00
|
|
|
interface nsIMobileMessageCallback : nsISupports
|
2012-11-07 01:29:30 +04:00
|
|
|
{
|
|
|
|
/**
|
2013-04-09 06:22:15 +04:00
|
|
|
* All SMS related errors.
|
2012-11-07 01:29:30 +04:00
|
|
|
* Make sure to keep this list in sync with the list in:
|
2015-08-07 01:59:00 +03:00
|
|
|
* mobile/android/base/GeckoSmsManager.java
|
2012-11-07 01:29:30 +04:00
|
|
|
*/
|
2013-06-18 08:06:32 +04: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;
|
|
|
|
const unsigned short NO_SIM_CARD_ERROR = 5;
|
|
|
|
const unsigned short RADIO_DISABLED_ERROR = 6;
|
2013-07-11 07:23:49 +04:00
|
|
|
const unsigned short INVALID_ADDRESS_ERROR = 7;
|
2013-09-09 17:48:07 +04:00
|
|
|
const unsigned short FDN_CHECK_ERROR = 8;
|
2013-11-05 13:21:56 +04:00
|
|
|
const unsigned short NON_ACTIVE_SIM_CARD_ERROR = 9;
|
2014-02-20 08:17:47 +04:00
|
|
|
const unsigned short STORAGE_FULL_ERROR = 10;
|
2014-03-21 06:52:05 +04:00
|
|
|
const unsigned short SIM_NOT_MATCHED_ERROR = 11;
|
2015-08-10 04:08:23 +03:00
|
|
|
const unsigned short NETWORK_PROBLEMS_ERROR = 12;
|
|
|
|
const unsigned short GENERAL_PROBLEMS_ERROR = 13;
|
|
|
|
const unsigned short SERVICE_NOT_AVAILABLE_ERROR = 14;
|
|
|
|
const unsigned short MESSAGE_TOO_LONG_FOR_NETWORK_ERROR = 15;
|
|
|
|
const unsigned short SERVICE_NOT_SUPPORTED_ERROR = 16;
|
|
|
|
const unsigned short RETRY_REQUIRED_ERROR = 17;
|
2012-11-07 01:29:30 +04:00
|
|
|
|
2013-03-09 11:22:10 +04:00
|
|
|
/**
|
2015-10-21 14:10:04 +03:00
|
|
|
* |message| can be nsI{Mms,Sms}Message.
|
2013-03-09 11:22:10 +04:00
|
|
|
*/
|
|
|
|
void notifyMessageSent(in nsISupports message);
|
2014-04-28 08:33:10 +04:00
|
|
|
void notifySendMessageFailed(in long error, in nsISupports message);
|
2012-11-07 01:29:30 +04:00
|
|
|
|
2013-03-08 07:46:16 +04:00
|
|
|
/**
|
2015-10-21 14:10:04 +03:00
|
|
|
* |message| can be nsI{Mms,Sms}Message.
|
2013-03-08 07:46:16 +04:00
|
|
|
*/
|
|
|
|
void notifyMessageGot(in nsISupports message);
|
2012-11-07 01:29:30 +04:00
|
|
|
void notifyGetMessageFailed(in long error);
|
|
|
|
|
2013-04-29 13:50:55 +04:00
|
|
|
void notifyMessageDeleted([array, size_is(count)] in boolean deleted,
|
|
|
|
in uint32_t count);
|
2012-11-07 01:29:30 +04:00
|
|
|
void notifyDeleteMessageFailed(in long error);
|
|
|
|
|
|
|
|
void notifyMessageMarkedRead(in boolean read);
|
|
|
|
void notifyMarkMessageReadFailed(in long error);
|
2013-08-09 17:25:53 +04:00
|
|
|
|
2014-08-04 13:01:36 +04:00
|
|
|
void notifySegmentInfoForTextGot(in long segments,
|
|
|
|
in long charsPerSegment,
|
|
|
|
in long charsAvailableInLastSegment);
|
2013-08-09 17:25:53 +04:00
|
|
|
void notifyGetSegmentInfoForTextFailed(in long error);
|
2013-09-16 06:12:38 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* SMSC Address get/set result
|
|
|
|
*/
|
2015-07-14 09:57:33 +03:00
|
|
|
void notifyGetSmscAddress(in DOMString aSmscAddress,
|
|
|
|
in unsigned long aTypeOfNumber,
|
|
|
|
in unsigned long aNumberPlanIdentification);
|
2013-09-16 06:12:38 +04:00
|
|
|
void notifyGetSmscAddressFailed(in long error);
|
2015-04-29 05:58:16 +03:00
|
|
|
void notifySetSmscAddress();
|
|
|
|
void notifySetSmscAddressFailed(in long error);
|
2012-11-07 01:29:30 +04:00
|
|
|
};
|