author aleth <>
Thu, 11 Aug 2016 14:32:01 +0200
changeset 19871 50bcb56180491a4ae898c29cb72a30102457809d
parent 17564 376a64a1f6759b4237705b0e4db0d0fd021bf139
child 34124 d0af6cc5fe02dd6e5b27ec24322c02491d8d7990
permissions -rw-r--r--
Bug 1294260 - Allow compiler warnings in ldap. r=jorgk,r=aceman, a=jorgk CLOSED TREE DONTBUILD

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 "MailNewsTypes2.idl"

interface nsINNTPNewsgroupPost;

typedef long nsNewsAction;

 * Represents specific attributes to a URL for news usage.
 * Note that the urls represented by this interface can be one of five schemes:
 * [s]news, nntp[s], or news-message. Any URI that is valid under RFC 5538 will
 * be accepted. However, it is possible for some queries to be invalid. There
 * are also a few important things to note:
 * - Missing authorities in [s]news: URIs cause nsIMsgMailNewsUrl::server and
 *   nsIMsgMessageUrl::folder to be null.
 * - nsIMsgMailNewsUrl::server and nsIMsgMessageUrl::folder will be null if the
 *   specified server does not actually exist. In addition, the folder is null
 *   if the group is not currently subscribed on that server.
 * - Although news-message URIs are parsable, there is no protocol handler
 *   associated with this url. To run these, you should convert these to the
 *   corresponding [s]news or nntp URL, and set the original one in
 *   nsIMsgMessageUrl::uri and ::originalSpec.
 * - A URI that results in an ActionUnknown will not be run.
 * - Cancel URIs require the original spec to also be set, so it can find both
 *   the message ID and the group/key combination.
 * * Some actions require either a group or a message id. Since actions can be
 *   set after the fact, these conditions are not verified.
[scriptable, uuid(ef920ca3-9c46-48b8-9fa3-cb430d3681ea)]
interface nsINntpUrl : nsISupports {
  /// For ActionPostArticle URIs, the message to be posted.
  attribute nsINNTPNewsgroupPost messageToPost;

   * The action that this URL will take when run.
   * Most actions can be automatically determined from the URL spec as follows:
   * 1. The query string is searched for the appropriate action.
   * 2. A non-empty message ID or key is found (sets ActionFetchArticle).
   * 3. A non-empty group is found (ActionGetNewNews or ActionListGroups).
  attribute nsNewsAction newsAction;

  /// For ActionGetNewNews URIs, whether or not to get older messages.
  attribute boolean getOldMessages;

   * The group portion of the URI, if one is present.
   * This group name is fully unescaped; if you need to construct news URLs with
   * this value, be sure to escape it first.
  readonly attribute ACString group;

  /// The message ID portion of the URI, if one is present
  readonly attribute ACString messageID;

  /// The message key portion of the URI or nsMsgKey_None if not present
  readonly attribute nsMsgKey key;

  /// The action of this news URI could not be determined
  const nsNewsAction ActionUnknown = 0;
  /// Fetch the contents of an article
  const nsNewsAction ActionFetchArticle = 1;
  /// Fetch the part of an article (requires ?part=)
  const nsNewsAction ActionFetchPart = 2;
  /// Save the contents of an article to disk
  const nsNewsAction ActionSaveMessageToDisk = 3;
  /// Cancel the article (requires ?cancel)
  const nsNewsAction ActionCancelArticle = 4;
  /// Post an article
  const nsNewsAction ActionPostArticle = 5;
  /// List the non-expired ids in the newsgroup (requires ?list-ids)
  const nsNewsAction ActionListIds = 6;
  /// Do an online newsgroup search (requires ?search)
  const nsNewsAction ActionSearch = 7;
  /// Retrieve new messages from the server
  const nsNewsAction ActionGetNewNews = 8;
  /// List groups for subscribe
  const nsNewsAction ActionListGroups = 9;
  /// List new groups for subscribe (requires ?new-groups)
  const nsNewsAction ActionListNewGroups = 10;

  /// Constant for the default NNTP over ssl port number
  const int32_t DEFAULT_NNTP_PORT = 119;

  /// Constant for the default NNTP over ssl port number
  const int32_t DEFAULT_NNTPS_PORT = 563;