1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include
"nsISupports.idl"
10 * The nsIInterfaceRequestor interface defines a generic interface for
11 * requesting interfaces that a given object might provide access to.
12 * This is very similar to QueryInterface found in nsISupports.
13 * The main difference is that interfaces returned from GetInterface()
14 * are not required to provide a way back to the object implementing this
15 * interface. The semantics of QI() dictate that given an interface A that
16 * you QI() on to get to interface B, you must be able to QI on B to get back
17 * to A. This interface however allows you to obtain an interface C from A
18 * that may or most likely will not have the ability to get back to A.
21 [scriptable
, uuid(033A1470
-8B2A
-11d3
-AF88
-00A024FFC08C
)]
22 interface nsIInterfaceRequestor
: nsISupports
25 * Retrieves the specified interface pointer.
27 * @param uuid The IID of the interface being requested.
28 * @param result [out] The interface pointer to be filled in if
29 * the interface is accessible.
30 * @throws NS_NOINTERFACE - interface not accessible.
31 * @throws NS_ERROR* - method failure.
33 void getInterface
(in nsIIDRef
uuid,
34 [iid_is(uuid),retval] out nsQIResult result
);