Source code

Revision control

Other Tools

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