Your IP : 216.73.216.48


Current Path : /usr/X11R6/share/idl/seamonkey-2.40/
Upload File :
Current File : //usr/X11R6/share/idl/seamonkey-2.40/nsIMobileMessageCallback.idl

/* 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"

[scriptable, uuid(19b24f93-7c02-4acf-addd-2f53bbb4e3fd)]
interface nsIMobileMessageCallback : nsISupports
{
  /**
   * All SMS related errors.
   * Make sure to keep this list in sync with the list in:
   * mobile/android/base/GeckoSmsManager.java
   */
  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;
  const unsigned short INVALID_ADDRESS_ERROR     = 7;
  const unsigned short FDN_CHECK_ERROR           = 8;
  const unsigned short NON_ACTIVE_SIM_CARD_ERROR = 9;
  const unsigned short STORAGE_FULL_ERROR        = 10;
  const unsigned short SIM_NOT_MATCHED_ERROR     = 11;
  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;

  /**
   * |message| can be nsIDOMMoz{Mms,Sms}Message.
   */
  void notifyMessageSent(in nsISupports message);
  void notifySendMessageFailed(in long error, in nsISupports message);

  /**
   * |message| can be nsIDOMMoz{Mms,Sms}Message.
   */
  void notifyMessageGot(in nsISupports message);
  void notifyGetMessageFailed(in long error);

  void notifyMessageDeleted([array, size_is(count)] in boolean deleted,
                            in uint32_t count);
  void notifyDeleteMessageFailed(in long error);

  void notifyMessageMarkedRead(in boolean read);
  void notifyMarkMessageReadFailed(in long error);

  void notifySegmentInfoForTextGot(in long segments,
                                   in long charsPerSegment,
                                   in long charsAvailableInLastSegment);
  void notifyGetSegmentInfoForTextFailed(in long error);

  /**
   *  SMSC Address get/set result
   */
  void notifyGetSmscAddress(in DOMString aSmscAddress,
                            in unsigned long aTypeOfNumber,
                            in unsigned long aNumberPlanIdentification);
  void notifyGetSmscAddressFailed(in long error);
  void notifySetSmscAddress();
  void notifySetSmscAddressFailed(in long error);
};