michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: #include "nsIDOMSmsSegmentInfo.idl" michael@0: michael@0: [scriptable, uuid(41db87b0-b0a1-11e3-a04f-cf487d837ee3)] michael@0: interface nsIMobileMessageCallback : nsISupports michael@0: { michael@0: /** michael@0: * All SMS related errors. michael@0: * Make sure to keep this list in sync with the list in: michael@0: * embedding/android/GeckoSmsManager.java michael@0: */ michael@0: const unsigned short SUCCESS_NO_ERROR = 0; michael@0: const unsigned short NO_SIGNAL_ERROR = 1; michael@0: const unsigned short NOT_FOUND_ERROR = 2; michael@0: const unsigned short UNKNOWN_ERROR = 3; michael@0: const unsigned short INTERNAL_ERROR = 4; michael@0: const unsigned short NO_SIM_CARD_ERROR = 5; michael@0: const unsigned short RADIO_DISABLED_ERROR = 6; michael@0: const unsigned short INVALID_ADDRESS_ERROR = 7; michael@0: const unsigned short FDN_CHECK_ERROR = 8; michael@0: const unsigned short NON_ACTIVE_SIM_CARD_ERROR = 9; michael@0: const unsigned short STORAGE_FULL_ERROR = 10; michael@0: const unsigned short SIM_NOT_MATCHED_ERROR = 11; michael@0: michael@0: /** michael@0: * |message| can be nsIDOMMoz{Mms,Sms}Message. michael@0: */ michael@0: void notifyMessageSent(in nsISupports message); michael@0: void notifySendMessageFailed(in long error); michael@0: michael@0: /** michael@0: * |message| can be nsIDOMMoz{Mms,Sms}Message. michael@0: */ michael@0: void notifyMessageGot(in nsISupports message); michael@0: void notifyGetMessageFailed(in long error); michael@0: michael@0: void notifyMessageDeleted([array, size_is(count)] in boolean deleted, michael@0: in uint32_t count); michael@0: void notifyDeleteMessageFailed(in long error); michael@0: michael@0: void notifyMessageMarkedRead(in boolean read); michael@0: void notifyMarkMessageReadFailed(in long error); michael@0: michael@0: void notifySegmentInfoForTextGot(in nsIDOMMozSmsSegmentInfo info); michael@0: void notifyGetSegmentInfoForTextFailed(in long error); michael@0: michael@0: /** michael@0: * SMSC Address get/set result michael@0: */ michael@0: void notifyGetSmscAddress(in DOMString aSmscAddress); michael@0: void notifyGetSmscAddressFailed(in long error); michael@0: };