michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: interface nsIURI; michael@0: interface nsIRequest; michael@0: interface nsIFeedResult; michael@0: michael@0: /** michael@0: * nsIFeedResultService provides a globally-accessible object for retrieving michael@0: * the results of feed processing. michael@0: */ michael@0: [scriptable, uuid(950a829e-c20e-4dc3-b447-f8b753ae54da)] michael@0: interface nsIFeedResultService : nsISupports michael@0: { michael@0: /** michael@0: * When set to true, forces the preview page to be displayed, regardless michael@0: * of the user's preferences. michael@0: */ michael@0: attribute boolean forcePreviewPage; michael@0: michael@0: /** michael@0: * Adds a URI to the user's specified external feed handler, or live michael@0: * bookmarks. michael@0: * @param uri michael@0: * The uri of the feed to add. michael@0: * @param title michael@0: * The title of the feed to add. michael@0: * @param subtitle michael@0: * The subtitle of the feed to add. michael@0: * @param feedType michael@0: * The nsIFeed type of the feed. See nsIFeed.idl michael@0: */ michael@0: void addToClientReader(in AUTF8String uri, michael@0: in AString title, michael@0: in AString subtitle, michael@0: in unsigned long feedType); michael@0: michael@0: /** michael@0: * Registers a Feed Result object with a globally accessible service michael@0: * so that it can be accessed by a singleton method outside the usual michael@0: * flow of control in document loading. michael@0: * michael@0: * @param feedResult michael@0: * An object implementing nsIFeedResult representing the feed. michael@0: */ michael@0: void addFeedResult(in nsIFeedResult feedResult); michael@0: michael@0: /** michael@0: * Gets a Feed Handler object registered using addFeedResult. michael@0: * michael@0: * @param uri michael@0: * The URI of the feed a handler is being requested for michael@0: */ michael@0: nsIFeedResult getFeedResult(in nsIURI uri); michael@0: michael@0: /** michael@0: * Unregisters a Feed Handler object registered using addFeedResult. michael@0: * @param uri michael@0: * The feed URI the handler was registered under. This must be michael@0: * the same *instance* the feed was registered under. michael@0: */ michael@0: void removeFeedResult(in nsIURI uri); michael@0: };