2014-06-30 19:39:45 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04: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/. */
|
2004-11-15 23:16:52 +03:00
|
|
|
|
|
|
|
#ifndef nsInterfaceRequestorAgg_h__
|
|
|
|
#define nsInterfaceRequestorAgg_h__
|
|
|
|
|
2013-09-19 22:29:31 +04:00
|
|
|
#include "nsError.h"
|
2004-11-15 23:16:52 +03:00
|
|
|
|
2012-11-14 20:00:44 +04:00
|
|
|
class nsIEventTarget;
|
2013-09-19 22:29:31 +04:00
|
|
|
class nsIInterfaceRequestor;
|
2012-11-14 20:00:44 +04:00
|
|
|
|
2004-11-15 23:16:52 +03:00
|
|
|
/**
|
|
|
|
* This function returns an instance of nsIInterfaceRequestor that aggregates
|
2008-10-02 10:49:45 +04:00
|
|
|
* two nsIInterfaceRequestor instances. Its GetInterface method queries
|
2004-11-15 23:16:52 +03: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 20:00:44 +04:00
|
|
|
* be null, and will be released on the main thread when the aggregator is
|
|
|
|
* destroyed.
|
|
|
|
*/
|
|
|
|
extern nsresult
|
2014-05-13 21:41:38 +04:00
|
|
|
NS_NewInterfaceRequestorAggregation(nsIInterfaceRequestor* aFirst,
|
|
|
|
nsIInterfaceRequestor* aSecond,
|
|
|
|
nsIInterfaceRequestor** aResult);
|
2012-11-14 20:00:44 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Like the previous method, but aFirst and aSecond will be released on the
|
|
|
|
* provided target thread.
|
2004-11-15 23:16:52 +03:00
|
|
|
*/
|
2011-08-18 17:46:39 +04:00
|
|
|
extern nsresult
|
2014-05-13 21:41:38 +04:00
|
|
|
NS_NewInterfaceRequestorAggregation(nsIInterfaceRequestor* aFirst,
|
|
|
|
nsIInterfaceRequestor* aSecond,
|
|
|
|
nsIEventTarget* aTarget,
|
|
|
|
nsIInterfaceRequestor** aResult);
|
2004-11-15 23:16:52 +03:00
|
|
|
|
|
|
|
#endif // !defined( nsInterfaceRequestorAgg_h__ )
|