Bug 1854550 - pt 12. Allow inlining between mozjemalloc and PHC r=glandium
[gecko.git] / xpcom / base / nsInterfaceRequestorAgg.h
blob06c6b3d3a3b598bd8394eb16d559817c206ab8c7
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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 #ifndef nsInterfaceRequestorAgg_h__
8 #define nsInterfaceRequestorAgg_h__
10 #include "nsError.h"
12 class nsIEventTarget;
13 class nsIInterfaceRequestor;
15 /**
16 * This function returns an instance of nsIInterfaceRequestor that aggregates
17 * two nsIInterfaceRequestor instances. Its GetInterface method queries
18 * aFirst for the requested interface and will query aSecond only if aFirst
19 * failed to supply the requested interface. Both aFirst and aSecond may
20 * be null, and will be released on the main thread when the aggregator is
21 * destroyed.
23 extern nsresult NS_NewInterfaceRequestorAggregation(
24 nsIInterfaceRequestor* aFirst, nsIInterfaceRequestor* aSecond,
25 nsIInterfaceRequestor** aResult);
27 /**
28 * Like the previous method, but aFirst and aSecond will be released on the
29 * provided target thread.
31 extern nsresult NS_NewInterfaceRequestorAggregation(
32 nsIInterfaceRequestor* aFirst, nsIInterfaceRequestor* aSecond,
33 nsIEventTarget* aTarget, nsIInterfaceRequestor** aResult);
35 #endif // !defined( nsInterfaceRequestorAgg_h__ )