1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/base/nsInterfaceRequestorAgg.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,36 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef nsInterfaceRequestorAgg_h__ 1.9 +#define nsInterfaceRequestorAgg_h__ 1.10 + 1.11 +#include "nsError.h" 1.12 + 1.13 +class nsIEventTarget; 1.14 +class nsIInterfaceRequestor; 1.15 + 1.16 +/** 1.17 + * This function returns an instance of nsIInterfaceRequestor that aggregates 1.18 + * two nsIInterfaceRequestor instances. Its GetInterface method queries 1.19 + * aFirst for the requested interface and will query aSecond only if aFirst 1.20 + * failed to supply the requested interface. Both aFirst and aSecond may 1.21 + * be null, and will be released on the main thread when the aggregator is 1.22 + * destroyed. 1.23 + */ 1.24 +extern nsresult 1.25 +NS_NewInterfaceRequestorAggregation(nsIInterfaceRequestor *aFirst, 1.26 + nsIInterfaceRequestor *aSecond, 1.27 + nsIInterfaceRequestor **aResult); 1.28 + 1.29 +/** 1.30 + * Like the previous method, but aFirst and aSecond will be released on the 1.31 + * provided target thread. 1.32 + */ 1.33 +extern nsresult 1.34 +NS_NewInterfaceRequestorAggregation(nsIInterfaceRequestor *aFirst, 1.35 + nsIInterfaceRequestor *aSecond, 1.36 + nsIEventTarget *aTarget, 1.37 + nsIInterfaceRequestor **aResult); 1.38 + 1.39 +#endif // !defined( nsInterfaceRequestorAgg_h__ )