michael@0: /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * 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: /** michael@0: * The nsIInterfaceRequestor interface defines a generic interface for michael@0: * requesting interfaces that a given object might provide access to. michael@0: * This is very similar to QueryInterface found in nsISupports. michael@0: * The main difference is that interfaces returned from GetInterface() michael@0: * are not required to provide a way back to the object implementing this michael@0: * interface. The semantics of QI() dictate that given an interface A that michael@0: * you QI() on to get to interface B, you must be able to QI on B to get back michael@0: * to A. This interface however allows you to obtain an interface C from A michael@0: * that may or most likely will not have the ability to get back to A. michael@0: */ michael@0: michael@0: [scriptable, uuid(033A1470-8B2A-11d3-AF88-00A024FFC08C)] michael@0: interface nsIInterfaceRequestor : nsISupports michael@0: { michael@0: /** michael@0: * Retrieves the specified interface pointer. michael@0: * michael@0: * @param uuid The IID of the interface being requested. michael@0: * @param result [out] The interface pointer to be filled in if michael@0: * the interface is accessible. michael@0: * @throws NS_NOINTERFACE - interface not accessible. michael@0: * @throws NS_ERROR* - method failure. michael@0: */ michael@0: void getInterface(in nsIIDRef uuid, michael@0: [iid_is(uuid),retval] out nsQIResult result); michael@0: }; michael@0: