Bug 1867190 - Add prefs for PHC probablities r=glandium
[gecko.git] / xpcom / base / nsISupports.idl
blob45c6c5d589da716355cd293948d57a81d88df32e
1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /**
7 * The mother of all xpcom interfaces.
8 */
10 #include "nsrootidl.idl"
12 /**
13 * Basic component object model interface. Objects which implement
14 * this interface support runtime interface discovery (QueryInterface)
15 * and a reference counted memory model (AddRef/Release). This is
16 * modelled after the win32 IUnknown API.
18 * Historically, nsISupports needed to be binary compatible with COM's
19 * IUnknown, so the IID of nsISupports is the same as it. That is no
20 * longer a goal, and hopefully nobody depends on it. We may break
21 * this compatibility at any time.
23 [scriptable, uuid(00000000-0000-0000-c000-000000000046)]
24 interface nsISupports {
26 /**
27 * A run time mechanism for interface discovery.
28 * @param aIID [in] A requested interface IID
29 * @param aInstancePtr [out] A pointer to an interface pointer to
30 * receive the result.
31 * @return <b>NS_OK</b> if the interface is supported by the associated
32 * instance, <b>NS_NOINTERFACE</b> if it is not.
34 * aInstancePtr must not be null.
36 void QueryInterface(in nsIIDRef aIID,
37 [iid_is(aIID), retval] out nsQIResult aInstancePtr);
39 /**
40 * Increases the reference count for this interface.
41 * The associated instance will not be deleted unless
42 * the reference count is returned to zero.
44 * @return The resulting reference count.
46 [noscript, notxpcom] MozExternalRefCountType AddRef();
48 /**
49 * Decreases the reference count for this interface.
50 * Generally, if the reference count returns to zero,
51 * the associated instance is deleted.
53 * @return The resulting reference count.
55 [noscript, notxpcom] MozExternalRefCountType Release();
58 %{C++
59 #include "nsISupportsUtils.h"