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: #ifndef nsInterfaceRequestorAgg_h__ michael@0: #define nsInterfaceRequestorAgg_h__ michael@0: michael@0: #include "nsError.h" michael@0: michael@0: class nsIEventTarget; michael@0: class nsIInterfaceRequestor; michael@0: michael@0: /** michael@0: * This function returns an instance of nsIInterfaceRequestor that aggregates michael@0: * two nsIInterfaceRequestor instances. Its GetInterface method queries michael@0: * aFirst for the requested interface and will query aSecond only if aFirst michael@0: * failed to supply the requested interface. Both aFirst and aSecond may michael@0: * be null, and will be released on the main thread when the aggregator is michael@0: * destroyed. michael@0: */ michael@0: extern nsresult michael@0: NS_NewInterfaceRequestorAggregation(nsIInterfaceRequestor *aFirst, michael@0: nsIInterfaceRequestor *aSecond, michael@0: nsIInterfaceRequestor **aResult); michael@0: michael@0: /** michael@0: * Like the previous method, but aFirst and aSecond will be released on the michael@0: * provided target thread. michael@0: */ michael@0: extern nsresult michael@0: NS_NewInterfaceRequestorAggregation(nsIInterfaceRequestor *aFirst, michael@0: nsIInterfaceRequestor *aSecond, michael@0: nsIEventTarget *aTarget, michael@0: nsIInterfaceRequestor **aResult); michael@0: michael@0: #endif // !defined( nsInterfaceRequestorAgg_h__ )