Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIWeakReference.idl
3 : */
4 :
5 : #ifndef __gen_nsIWeakReference_h__
6 : #define __gen_nsIWeakReference_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : /* For IDL files that don't want to include root IDL files. */
14 : #ifndef NS_NO_VTABLE
15 : #define NS_NO_VTABLE
16 : #endif
17 : #include "mozilla/MemoryReporting.h"
18 :
19 : /* starting interface: nsIWeakReference */
20 : #define NS_IWEAKREFERENCE_IID_STR "9188bc85-f92e-11d2-81ef-0060083a0bcf"
21 :
22 : #define NS_IWEAKREFERENCE_IID \
23 : {0x9188bc85, 0xf92e, 0x11d2, \
24 : { 0x81, 0xef, 0x00, 0x60, 0x08, 0x3a, 0x0b, 0xcf }}
25 :
26 490 : class nsIWeakReference : public nsISupports {
27 : public:
28 :
29 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWEAKREFERENCE_IID)
30 :
31 : /* void QueryReferent (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
32 : NS_IMETHOD QueryReferent(const nsIID & uuid, void **result) = 0;
33 :
34 : virtual size_t SizeOfOnlyThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
35 : /**
36 : * Returns true if the referring object is alive. Otherwise, false.
37 : */
38 : virtual bool IsAlive() const = 0;
39 : };
40 :
41 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIWeakReference, NS_IWEAKREFERENCE_IID)
42 :
43 : /* Use this macro when declaring classes that implement this interface. */
44 : #define NS_DECL_NSIWEAKREFERENCE \
45 : NS_IMETHOD QueryReferent(const nsIID & uuid, void **result) override; \
46 :
47 : /* Use this macro when declaring the members of this interface when the
48 : class doesn't implement the interface. This is useful for forwarding. */
49 : #define NS_DECL_NON_VIRTUAL_NSIWEAKREFERENCE \
50 : nsresult QueryReferent(const nsIID & uuid, void **result); \
51 :
52 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
53 : #define NS_FORWARD_NSIWEAKREFERENCE(_to) \
54 : NS_IMETHOD QueryReferent(const nsIID & uuid, void **result) override { return _to QueryReferent(uuid, result); } \
55 :
56 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
57 : #define NS_FORWARD_SAFE_NSIWEAKREFERENCE(_to) \
58 : NS_IMETHOD QueryReferent(const nsIID & uuid, void **result) override { return !_to ? NS_ERROR_NULL_POINTER : _to->QueryReferent(uuid, result); } \
59 :
60 : #if 0
61 : /* Use the code below as a template for the implementation class for this interface. */
62 :
63 : /* Header file */
64 : class nsWeakReference : public nsIWeakReference
65 : {
66 : public:
67 : NS_DECL_ISUPPORTS
68 : NS_DECL_NSIWEAKREFERENCE
69 :
70 : nsWeakReference();
71 :
72 : private:
73 : ~nsWeakReference();
74 :
75 : protected:
76 : /* additional members */
77 : };
78 :
79 : /* Implementation file */
80 : NS_IMPL_ISUPPORTS(nsWeakReference, nsIWeakReference)
81 :
82 : nsWeakReference::nsWeakReference()
83 : {
84 : /* member initializers and constructor code */
85 : }
86 :
87 : nsWeakReference::~nsWeakReference()
88 : {
89 : /* destructor code */
90 : }
91 :
92 : /* void QueryReferent (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
93 : NS_IMETHODIMP nsWeakReference::QueryReferent(const nsIID & uuid, void **result)
94 : {
95 : return NS_ERROR_NOT_IMPLEMENTED;
96 : }
97 :
98 : /* End of implementation class template. */
99 : #endif
100 :
101 :
102 : /* starting interface: nsISupportsWeakReference */
103 : #define NS_ISUPPORTSWEAKREFERENCE_IID_STR "9188bc86-f92e-11d2-81ef-0060083a0bcf"
104 :
105 : #define NS_ISUPPORTSWEAKREFERENCE_IID \
106 : {0x9188bc86, 0xf92e, 0x11d2, \
107 : { 0x81, 0xef, 0x00, 0x60, 0x08, 0x3a, 0x0b, 0xcf }}
108 :
109 2206 : class NS_NO_VTABLE nsISupportsWeakReference : public nsISupports {
110 : public:
111 :
112 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISUPPORTSWEAKREFERENCE_IID)
113 :
114 : /* nsIWeakReference GetWeakReference (); */
115 : NS_IMETHOD GetWeakReference(nsIWeakReference * *_retval) = 0;
116 :
117 : };
118 :
119 : NS_DEFINE_STATIC_IID_ACCESSOR(nsISupportsWeakReference, NS_ISUPPORTSWEAKREFERENCE_IID)
120 :
121 : /* Use this macro when declaring classes that implement this interface. */
122 : #define NS_DECL_NSISUPPORTSWEAKREFERENCE \
123 : NS_IMETHOD GetWeakReference(nsIWeakReference * *_retval) override;
124 :
125 : /* Use this macro when declaring the members of this interface when the
126 : class doesn't implement the interface. This is useful for forwarding. */
127 : #define NS_DECL_NON_VIRTUAL_NSISUPPORTSWEAKREFERENCE \
128 : nsresult GetWeakReference(nsIWeakReference * *_retval);
129 :
130 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
131 : #define NS_FORWARD_NSISUPPORTSWEAKREFERENCE(_to) \
132 : NS_IMETHOD GetWeakReference(nsIWeakReference * *_retval) override { return _to GetWeakReference(_retval); }
133 :
134 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
135 : #define NS_FORWARD_SAFE_NSISUPPORTSWEAKREFERENCE(_to) \
136 : NS_IMETHOD GetWeakReference(nsIWeakReference * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWeakReference(_retval); }
137 :
138 : #if 0
139 : /* Use the code below as a template for the implementation class for this interface. */
140 :
141 : /* Header file */
142 : class nsSupportsWeakReference : public nsISupportsWeakReference
143 : {
144 : public:
145 : NS_DECL_ISUPPORTS
146 : NS_DECL_NSISUPPORTSWEAKREFERENCE
147 :
148 : nsSupportsWeakReference();
149 :
150 : private:
151 : ~nsSupportsWeakReference();
152 :
153 : protected:
154 : /* additional members */
155 : };
156 :
157 : /* Implementation file */
158 : NS_IMPL_ISUPPORTS(nsSupportsWeakReference, nsISupportsWeakReference)
159 :
160 : nsSupportsWeakReference::nsSupportsWeakReference()
161 : {
162 : /* member initializers and constructor code */
163 : }
164 :
165 : nsSupportsWeakReference::~nsSupportsWeakReference()
166 : {
167 : /* destructor code */
168 : }
169 :
170 : /* nsIWeakReference GetWeakReference (); */
171 : NS_IMETHODIMP nsSupportsWeakReference::GetWeakReference(nsIWeakReference * *_retval)
172 : {
173 : return NS_ERROR_NOT_IMPLEMENTED;
174 : }
175 :
176 : /* End of implementation class template. */
177 : #endif
178 :
179 : #ifdef MOZILLA_INTERNAL_API
180 : #include "nsIWeakReferenceUtils.h"
181 : #endif
182 :
183 : #endif /* __gen_nsIWeakReference_h__ */
|