michael@0: /* -*- Mode: IDL; tab-width: 2; 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: michael@0: interface nsIWebNavigation; michael@0: michael@0: /** michael@0: * The nsIWebNavigationInfo interface exposes a way to get information michael@0: * on the capabilities of Gecko webnavigation objects. michael@0: */ michael@0: [scriptable, uuid(62a93afb-93a1-465c-84c8-0432264229de)] michael@0: interface nsIWebNavigationInfo : nsISupports michael@0: { michael@0: /** michael@0: * Returned by isTypeSupported to indicate lack of support for a type. michael@0: * @note this is guaranteed not to change, so that boolean tests can be done michael@0: * on the return value if isTypeSupported to detect whether a type is michael@0: * supported at all. michael@0: */ michael@0: const unsigned long UNSUPPORTED = 0; michael@0: michael@0: /** michael@0: * Returned by isTypeSupported to indicate that a type is supported as an michael@0: * image. michael@0: */ michael@0: const unsigned long IMAGE = 1; michael@0: michael@0: /** michael@0: * Returned by isTypeSupported to indicate that a type is supported via an michael@0: * NPAPI ("Netscape 4 API") plug-in. This is not the value returned for michael@0: * "XPCOM plug-ins". michael@0: */ michael@0: const unsigned long PLUGIN = 2; michael@0: michael@0: /** michael@0: * @note Other return types may be added here in the future as they become michael@0: * relevant. michael@0: */ michael@0: michael@0: /** michael@0: * Returned by isTypeSupported to indicate that a type is supported via some michael@0: * other means. michael@0: */ michael@0: const unsigned long OTHER = 1 << 15; michael@0: michael@0: /** michael@0: * Query whether aType is supported. michael@0: * @param aType the MIME type in question. michael@0: * @param aWebNav the nsIWebNavigation object for which the request michael@0: * is being made. This is allowed to be null. If it is non-null, michael@0: * the return value of this method may depend on the exact state of michael@0: * aWebNav and the values set through nsIWebBrowserSetup; otherwise michael@0: * the method will assume that the caller is interested in information michael@0: * about nsIWebNavigation objects in their default state. michael@0: * @return an enum value indicating whether and how aType is supported. michael@0: * @note This method may rescan plugins to ensure that they're properly michael@0: * registered for the types they support. michael@0: */ michael@0: unsigned long isTypeSupported(in ACString aType, in nsIWebNavigation aWebNav); michael@0: };