nsIWebNavigationInfo.idl 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* -*- Mode: IDL; tab-width: 2; 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 nsIWebNavigation;
  7. /**
  8. * The nsIWebNavigationInfo interface exposes a way to get information
  9. * on the capabilities of Gecko webnavigation objects.
  10. */
  11. [scriptable, uuid(62a93afb-93a1-465c-84c8-0432264229de)]
  12. interface nsIWebNavigationInfo : nsISupports
  13. {
  14. /**
  15. * Returned by isTypeSupported to indicate lack of support for a type.
  16. * @note this is guaranteed not to change, so that boolean tests can be done
  17. * on the return value if isTypeSupported to detect whether a type is
  18. * supported at all.
  19. */
  20. const unsigned long UNSUPPORTED = 0;
  21. /**
  22. * Returned by isTypeSupported to indicate that a type is supported as an
  23. * image.
  24. */
  25. const unsigned long IMAGE = 1;
  26. /**
  27. * Returned by isTypeSupported to indicate that a type is supported via an
  28. * NPAPI ("Netscape 4 API") plug-in. This is not the value returned for
  29. * "XPCOM plug-ins".
  30. */
  31. const unsigned long PLUGIN = 2;
  32. /**
  33. * @note Other return types may be added here in the future as they become
  34. * relevant.
  35. */
  36. /**
  37. * Returned by isTypeSupported to indicate that a type is supported via some
  38. * other means.
  39. */
  40. const unsigned long OTHER = 1 << 15;
  41. /**
  42. * Query whether aType is supported.
  43. * @param aType the MIME type in question.
  44. * @param aWebNav the nsIWebNavigation object for which the request
  45. * is being made. This is allowed to be null. If it is non-null,
  46. * the return value of this method may depend on the exact state of
  47. * aWebNav and the values set through nsIWebBrowserSetup; otherwise
  48. * the method will assume that the caller is interested in information
  49. * about nsIWebNavigation objects in their default state.
  50. * @return an enum value indicating whether and how aType is supported.
  51. * @note This method may rescan plugins to ensure that they're properly
  52. * registered for the types they support.
  53. */
  54. unsigned long isTypeSupported(in ACString aType, in nsIWebNavigation aWebNav);
  55. };