dom/mobilemessage/interfaces/nsIMobileMessageCallback.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/mobilemessage/interfaces/nsIMobileMessageCallback.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,56 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsISupports.idl"
     1.9 +#include "nsIDOMSmsSegmentInfo.idl"
    1.10 +
    1.11 +[scriptable, uuid(41db87b0-b0a1-11e3-a04f-cf487d837ee3)]
    1.12 +interface nsIMobileMessageCallback : nsISupports
    1.13 +{
    1.14 +  /**
    1.15 +   * All SMS related errors.
    1.16 +   * Make sure to keep this list in sync with the list in:
    1.17 +   * embedding/android/GeckoSmsManager.java
    1.18 +   */
    1.19 +  const unsigned short SUCCESS_NO_ERROR          = 0;
    1.20 +  const unsigned short NO_SIGNAL_ERROR           = 1;
    1.21 +  const unsigned short NOT_FOUND_ERROR           = 2;
    1.22 +  const unsigned short UNKNOWN_ERROR             = 3;
    1.23 +  const unsigned short INTERNAL_ERROR            = 4;
    1.24 +  const unsigned short NO_SIM_CARD_ERROR         = 5;
    1.25 +  const unsigned short RADIO_DISABLED_ERROR      = 6;
    1.26 +  const unsigned short INVALID_ADDRESS_ERROR     = 7;
    1.27 +  const unsigned short FDN_CHECK_ERROR           = 8;
    1.28 +  const unsigned short NON_ACTIVE_SIM_CARD_ERROR = 9;
    1.29 +  const unsigned short STORAGE_FULL_ERROR        = 10;
    1.30 +  const unsigned short SIM_NOT_MATCHED_ERROR     = 11;
    1.31 +
    1.32 +  /**
    1.33 +   * |message| can be nsIDOMMoz{Mms,Sms}Message.
    1.34 +   */
    1.35 +  void notifyMessageSent(in nsISupports message);
    1.36 +  void notifySendMessageFailed(in long error);
    1.37 +
    1.38 +  /**
    1.39 +   * |message| can be nsIDOMMoz{Mms,Sms}Message.
    1.40 +   */
    1.41 +  void notifyMessageGot(in nsISupports message);
    1.42 +  void notifyGetMessageFailed(in long error);
    1.43 +
    1.44 +  void notifyMessageDeleted([array, size_is(count)] in boolean deleted,
    1.45 +                            in uint32_t count);
    1.46 +  void notifyDeleteMessageFailed(in long error);
    1.47 +
    1.48 +  void notifyMessageMarkedRead(in boolean read);
    1.49 +  void notifyMarkMessageReadFailed(in long error);
    1.50 +
    1.51 +  void notifySegmentInfoForTextGot(in nsIDOMMozSmsSegmentInfo info);
    1.52 +  void notifyGetSegmentInfoForTextFailed(in long error);
    1.53 +
    1.54 +  /**
    1.55 +   *  SMSC Address get/set result
    1.56 +   */
    1.57 +  void notifyGetSmscAddress(in DOMString aSmscAddress);
    1.58 +  void notifyGetSmscAddressFailed(in long error);
    1.59 +};

mercurial