/*
 * BEGIN FLOCK GPL
 *
 * Copyright Flock Inc. 2005-2009
 * http://flock.com
 *
 * This file may be used under the terms of the
 * GNU General Public License Version 2 or later (the "GPL"),
 * http://www.gnu.org/licenses/gpl.html
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * END FLOCK GPL
 */

#include "nsISupports.idl"

interface nsIURI;
interface nsIDOMDocument;

interface flockIListener;

/**
 * Any service can add an icon to the bottom of each news feed article
 * by implementing this interface and registering itself in the category
 * manager under "flockReaderExtension" with its contract id as value
 */

[scriptable, uuid(0fff463c-75a0-4deb-a5ca-fd144a3c51e3)]
interface flockIReaderExtension: nsISupports {
  /**
   * The chrome URL to the CSS file to be added to the stream reader,
   * to render what will be added in the footer of each article
   */
  readonly attribute AString styleSheetUrl;

  /**
   * Return the DOM node to be added to the footer of the article
   * @param aDocument: the document in which the element is to be inserted
   * @param aURI: the URI corresponding to the permalink to the articl
   * @param aFlockListener: the listener through which a nsIDOMElement will be
   * returned.
   *
   * @return the DOM element to be inserted
   */
  void createFooterElement(in nsIDOMDocument aDocument,
                           in nsIURI aURI,
                           in flockIListener aFlockListener);
};
