1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/components/feeds/public/nsIFeedResultService.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,66 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsISupports.idl" 1.10 +interface nsIURI; 1.11 +interface nsIRequest; 1.12 +interface nsIFeedResult; 1.13 + 1.14 +/** 1.15 + * nsIFeedResultService provides a globally-accessible object for retrieving 1.16 + * the results of feed processing. 1.17 + */ 1.18 +[scriptable, uuid(950a829e-c20e-4dc3-b447-f8b753ae54da)] 1.19 +interface nsIFeedResultService : nsISupports 1.20 +{ 1.21 + /** 1.22 + * When set to true, forces the preview page to be displayed, regardless 1.23 + * of the user's preferences. 1.24 + */ 1.25 + attribute boolean forcePreviewPage; 1.26 + 1.27 + /** 1.28 + * Adds a URI to the user's specified external feed handler, or live 1.29 + * bookmarks. 1.30 + * @param uri 1.31 + * The uri of the feed to add. 1.32 + * @param title 1.33 + * The title of the feed to add. 1.34 + * @param subtitle 1.35 + * The subtitle of the feed to add. 1.36 + * @param feedType 1.37 + * The nsIFeed type of the feed. See nsIFeed.idl 1.38 + */ 1.39 + void addToClientReader(in AUTF8String uri, 1.40 + in AString title, 1.41 + in AString subtitle, 1.42 + in unsigned long feedType); 1.43 + 1.44 + /** 1.45 + * Registers a Feed Result object with a globally accessible service 1.46 + * so that it can be accessed by a singleton method outside the usual 1.47 + * flow of control in document loading. 1.48 + * 1.49 + * @param feedResult 1.50 + * An object implementing nsIFeedResult representing the feed. 1.51 + */ 1.52 + void addFeedResult(in nsIFeedResult feedResult); 1.53 + 1.54 + /** 1.55 + * Gets a Feed Handler object registered using addFeedResult. 1.56 + * 1.57 + * @param uri 1.58 + * The URI of the feed a handler is being requested for 1.59 + */ 1.60 + nsIFeedResult getFeedResult(in nsIURI uri); 1.61 + 1.62 + /** 1.63 + * Unregisters a Feed Handler object registered using addFeedResult. 1.64 + * @param uri 1.65 + * The feed URI the handler was registered under. This must be 1.66 + * the same *instance* the feed was registered under. 1.67 + */ 1.68 + void removeFeedResult(in nsIURI uri); 1.69 +};