nsIFeedResultService.idl 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #include "nsISupports.idl"
  6. interface nsIURI;
  7. interface nsIRequest;
  8. interface nsIFeedResult;
  9. /**
  10. * nsIFeedResultService provides a globally-accessible object for retrieving
  11. * the results of feed processing.
  12. */
  13. [scriptable, uuid(950a829e-c20e-4dc3-b447-f8b753ae54da)]
  14. interface nsIFeedResultService : nsISupports
  15. {
  16. /**
  17. * When set to true, forces the preview page to be displayed, regardless
  18. * of the user's preferences.
  19. */
  20. attribute boolean forcePreviewPage;
  21. /**
  22. * Adds a URI to the user's specified external feed handler, or live
  23. * bookmarks.
  24. * @param uri
  25. * The uri of the feed to add.
  26. * @param title
  27. * The title of the feed to add.
  28. * @param subtitle
  29. * The subtitle of the feed to add.
  30. * @param feedType
  31. * The nsIFeed type of the feed. See nsIFeed.idl
  32. */
  33. void addToClientReader(in AUTF8String uri,
  34. in AString title,
  35. in AString subtitle,
  36. in unsigned long feedType);
  37. /**
  38. * Registers a Feed Result object with a globally accessible service
  39. * so that it can be accessed by a singleton method outside the usual
  40. * flow of control in document loading.
  41. *
  42. * @param feedResult
  43. * An object implementing nsIFeedResult representing the feed.
  44. */
  45. void addFeedResult(in nsIFeedResult feedResult);
  46. /**
  47. * Gets a Feed Handler object registered using addFeedResult.
  48. *
  49. * @param uri
  50. * The URI of the feed a handler is being requested for
  51. */
  52. nsIFeedResult getFeedResult(in nsIURI uri);
  53. /**
  54. * Unregisters a Feed Handler object registered using addFeedResult.
  55. * @param uri
  56. * The feed URI the handler was registered under. This must be
  57. * the same *instance* the feed was registered under.
  58. */
  59. void removeFeedResult(in nsIURI uri);
  60. };