From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- xpcom/base/nsISupports.idl | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 xpcom/base/nsISupports.idl (limited to 'xpcom/base/nsISupports.idl') diff --git a/xpcom/base/nsISupports.idl b/xpcom/base/nsISupports.idl new file mode 100644 index 0000000000..45c6c5d589 --- /dev/null +++ b/xpcom/base/nsISupports.idl @@ -0,0 +1,60 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* 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/. */ + +/** + * The mother of all xpcom interfaces. + */ + +#include "nsrootidl.idl" + +/** + * Basic component object model interface. Objects which implement + * this interface support runtime interface discovery (QueryInterface) + * and a reference counted memory model (AddRef/Release). This is + * modelled after the win32 IUnknown API. + * + * Historically, nsISupports needed to be binary compatible with COM's + * IUnknown, so the IID of nsISupports is the same as it. That is no + * longer a goal, and hopefully nobody depends on it. We may break + * this compatibility at any time. + */ +[scriptable, uuid(00000000-0000-0000-c000-000000000046)] +interface nsISupports { + + /** + * A run time mechanism for interface discovery. + * @param aIID [in] A requested interface IID + * @param aInstancePtr [out] A pointer to an interface pointer to + * receive the result. + * @return NS_OK if the interface is supported by the associated + * instance, NS_NOINTERFACE if it is not. + * + * aInstancePtr must not be null. + */ + void QueryInterface(in nsIIDRef aIID, + [iid_is(aIID), retval] out nsQIResult aInstancePtr); + + /** + * Increases the reference count for this interface. + * The associated instance will not be deleted unless + * the reference count is returned to zero. + * + * @return The resulting reference count. + */ + [noscript, notxpcom] MozExternalRefCountType AddRef(); + + /** + * Decreases the reference count for this interface. + * Generally, if the reference count returns to zero, + * the associated instance is deleted. + * + * @return The resulting reference count. + */ + [noscript, notxpcom] MozExternalRefCountType Release(); +}; + +%{C++ +#include "nsISupportsUtils.h" +%} -- cgit v1.2.3