author Patrick Cloke <>
Fri, 13 Sep 2019 11:26:06 -0400
changeset 78827 a3a6442dde2fa53d263a561a8dc4845718f14318
parent 25865 af60f4d05eaa5cfd339b8f88de0bcd34a9d33388
child 78939 6f78a5f43bcd37506a93e56090d1de412c4fc6bc
permissions -rw-r--r--
Bug 1557506 - Remove [array] use in xpidl from chat/. r=mkmelin

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

#include "nsISupports.idl"
#include "nsIRunnable.idl"
#include "prplIConversation.idl"

 * An action that the user may perform in relation to a particular message.
[scriptable, uuid(7e470f0e-d948-4d9a-b8dc-4beecf6554b9)]
interface prplIMessageAction: nsIRunnable
  /* The protocol plugins need to provide a localized label suitable
     for being shown in the user interface (for example as a context
     menu item). */
  readonly attribute AUTF8String label;

[scriptable, uuid(d6accb66-cdd2-4a91-8854-1156e65d5a43)]
interface prplIMessage: nsISupports {
  /* The uniqueness of the message id is only guaranteed across
     messages of a conversation, not across all messages created
     during the execution of the application. */
  readonly attribute unsigned long id;
  readonly attribute AUTF8String who;
  readonly attribute AUTF8String alias;
  readonly attribute AUTF8String originalMessage;
           attribute AUTF8String message;
  readonly attribute AUTF8String iconURL;
  // Value in seconds.
  readonly attribute PRTime time;
  readonly attribute prplIConversation conversation;

  /*  PURPLE_MESSAGE_SEND        = 0x0001, /**< Outgoing message. */
  readonly attribute boolean outgoing;
  /*  PURPLE_MESSAGE_RECV        = 0x0002, /**< Incoming message. */
  readonly attribute boolean incoming;
  /*  PURPLE_MESSAGE_SYSTEM      = 0x0004, /**< System message.   */
  readonly attribute boolean system;
  /*  PURPLE_MESSAGE_AUTO_RESP   = 0x0008, /**< Auto response.    */
  readonly attribute boolean autoResponse;
  /*  PURPLE_MESSAGE_ACTIVE_ONLY = 0x0010, /**< Hint to the UI that this
                                                message should not be
                                                shown in conversations
                                                which are only open for
                                                internal UI purposes
                                                (e.g. for contact-aware
                                                 conversions).           */
  /*  PURPLE_MESSAGE_NICK        = 0x0020, /**< Contains your nick.      */
  readonly attribute boolean containsNick;
  /*  PURPLE_MESSAGE_NO_LOG      = 0x0040, /**< Do not log.              */
  readonly attribute boolean noLog;
  /*  PURPLE_MESSAGE_ERROR       = 0x0200, /**< Error message.           */
  readonly attribute boolean error;
  /*  PURPLE_MESSAGE_DELAYED     = 0x0400, /**< Delayed message.         */
  readonly attribute boolean delayed;
  /*  PURPLE_MESSAGE_RAW         = 0x0800, /**< "Raw" message - don't
                                                apply formatting         */
  readonly attribute boolean noFormat;
  /*  PURPLE_MESSAGE_IMAGES      = 0x1000, /**< Message contains images  */
  readonly attribute boolean containsImages;
  /*  PURPLE_MESSAGE_NOTIFY      = 0x2000, /**< Message is a notification */
  readonly attribute boolean notification;
  /*  PURPLE_MESSAGE_NO_LINKIFY  = 0x4000  /**< Message should not be auto-linkified */
  readonly attribute boolean noLinkification;

  /* An array of actions the user may perform on this message.
     The first action will be the 'default' and may be performed
     automatically when the message is double clicked.
     'Reply' is usually a good default action. */
  Array<prplIMessageAction> getActions();