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__
|
|
|
|
|
|
|
|
#include "nsIInterfaceRequestor.h"
|
|
|
|
|
2012-11-14 08:00:44 -08:00
|
|
|
class nsIEventTarget;
|
|
|
|
|
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
|
|
|
|
NS_NewInterfaceRequestorAggregation(nsIInterfaceRequestor *aFirst,
|
|
|
|
nsIInterfaceRequestor *aSecond,
|
|
|
|
nsIInterfaceRequestor **aResult);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_NewInterfaceRequestorAggregation(nsIInterfaceRequestor *aFirst,
|
|
|
|
nsIInterfaceRequestor *aSecond,
|
2012-11-14 08:00:44 -08:00
|
|
|
nsIEventTarget *aTarget,
|
2007-03-22 10:30:00 -07:00
|
|
|
nsIInterfaceRequestor **aResult);
|
|
|
|
|
|
|
|
#endif // !defined( nsInterfaceRequestorAgg_h__ )
|