2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsInterfaceRequestorAgg_h__
|
|
|
|
#define nsInterfaceRequestorAgg_h__
|
|
|
|
|
2013-09-19 11:29:31 -07:00
|
|
|
#include "nsError.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-11-14 08:00:44 -08:00
|
|
|
class nsIEventTarget;
|
2013-09-19 11:29:31 -07:00
|
|
|
class nsIInterfaceRequestor;
|
2012-11-14 08:00:44 -08:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* This function returns an instance of nsIInterfaceRequestor that aggregates
|
2008-10-01 23:49:45 -07:00
|
|
|
* two nsIInterfaceRequestor instances. Its GetInterface method queries
|
2007-03-22 10:30:00 -07:00
|
|
|
* aFirst for the requested interface and will query aSecond only if aFirst
|
|
|
|
* failed to supply the requested interface. Both aFirst and aSecond may
|
2012-11-14 08:00:44 -08:00
|
|
|
* be null, and will be released on the main thread when the aggregator is
|
|
|
|
* destroyed.
|
|
|
|
*/
|
|
|
|
extern nsresult
|
2014-05-13 10:41:38 -07:00
|
|
|
NS_NewInterfaceRequestorAggregation(nsIInterfaceRequestor* aFirst,
|
|
|
|
nsIInterfaceRequestor* aSecond,
|
|
|
|
nsIInterfaceRequestor** aResult);
|
2012-11-14 08:00:44 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Like the previous method, but aFirst and aSecond will be released on the
|
|
|
|
* provided target thread.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2011-08-18 06:46:39 -07:00
|
|
|
extern nsresult
|
2014-05-13 10:41:38 -07:00
|
|
|
NS_NewInterfaceRequestorAggregation(nsIInterfaceRequestor* aFirst,
|
|
|
|
nsIInterfaceRequestor* aSecond,
|
|
|
|
nsIEventTarget* aTarget,
|
|
|
|
nsIInterfaceRequestor** aResult);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#endif // !defined( nsInterfaceRequestorAgg_h__ )
|