/work/obj-fuzz/dist/include/nsIArray.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * DO NOT EDIT. THIS FILE IS GENERATED FROM /src/mozilla-central/xpcom/ds/nsIArray.idl |
3 | | */ |
4 | | |
5 | | #ifndef __gen_nsIArray_h__ |
6 | | #define __gen_nsIArray_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 | | class nsIJSIID; /* forward declaration */ |
18 | | |
19 | | class nsISimpleEnumerator; /* forward declaration */ |
20 | | |
21 | | |
22 | | /* starting interface: nsIArray */ |
23 | | #define NS_IARRAY_IID_STR "114744d9-c369-456e-b55a-52fe52880d2d" |
24 | | |
25 | | #define NS_IARRAY_IID \ |
26 | | {0x114744d9, 0xc369, 0x456e, \ |
27 | | { 0xb5, 0x5a, 0x52, 0xfe, 0x52, 0x88, 0x0d, 0x2d }} |
28 | | |
29 | | class nsIArray : public nsISupports { |
30 | | public: |
31 | | |
32 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IARRAY_IID) |
33 | | |
34 | | /* readonly attribute unsigned long length; */ |
35 | | NS_IMETHOD GetLength(uint32_t *aLength) = 0; |
36 | | |
37 | | /* void queryElementAt (in unsigned long index, in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */ |
38 | | NS_IMETHOD QueryElementAt(uint32_t index, const nsIID & uuid, void * * result) = 0; |
39 | | |
40 | | /* unsigned long indexOf (in unsigned long startIndex, in nsISupports element); */ |
41 | | NS_IMETHOD IndexOf(uint32_t startIndex, nsISupports *element, uint32_t *_retval) = 0; |
42 | | |
43 | | /* [binaryname(ScriptedEnumerate),optional_argc] nsISimpleEnumerator enumerate ([optional] in nsIJSIID aElemIID); */ |
44 | | NS_IMETHOD ScriptedEnumerate(nsIJSIID *aElemIID, uint8_t _argc, nsISimpleEnumerator **_retval) = 0; |
45 | | |
46 | | /* [noscript] nsISimpleEnumerator enumerateImpl (in nsIDRef aElemIID); */ |
47 | | NS_IMETHOD EnumerateImpl(const nsID & aElemIID, nsISimpleEnumerator **_retval) = 0; |
48 | | |
49 | | nsresult |
50 | | Enumerate(nsISimpleEnumerator** aRetVal, const nsID& aElemIID = NS_GET_IID(nsISupports)) |
51 | 0 | { |
52 | 0 | return EnumerateImpl(aElemIID, aRetVal); |
53 | 0 | } |
54 | | }; |
55 | | |
56 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIArray, NS_IARRAY_IID) |
57 | | |
58 | | /* Use this macro when declaring classes that implement this interface. */ |
59 | | #define NS_DECL_NSIARRAY \ |
60 | | NS_IMETHOD GetLength(uint32_t *aLength) override; \ |
61 | | NS_IMETHOD QueryElementAt(uint32_t index, const nsIID & uuid, void * * result) override; \ |
62 | | NS_IMETHOD IndexOf(uint32_t startIndex, nsISupports *element, uint32_t *_retval) override; \ |
63 | | NS_IMETHOD ScriptedEnumerate(nsIJSIID *aElemIID, uint8_t _argc, nsISimpleEnumerator **_retval) override; \ |
64 | | NS_IMETHOD EnumerateImpl(const nsID & aElemIID, nsISimpleEnumerator **_retval) override; \ |
65 | | |
66 | | /* Use this macro when declaring the members of this interface when the |
67 | | class doesn't implement the interface. This is useful for forwarding. */ |
68 | | #define NS_DECL_NON_VIRTUAL_NSIARRAY \ |
69 | | nsresult GetLength(uint32_t *aLength); \ |
70 | | nsresult QueryElementAt(uint32_t index, const nsIID & uuid, void * * result); \ |
71 | | nsresult IndexOf(uint32_t startIndex, nsISupports *element, uint32_t *_retval); \ |
72 | | nsresult ScriptedEnumerate(nsIJSIID *aElemIID, uint8_t _argc, nsISimpleEnumerator **_retval); \ |
73 | | nsresult EnumerateImpl(const nsID & aElemIID, nsISimpleEnumerator **_retval); \ |
74 | | |
75 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
76 | | #define NS_FORWARD_NSIARRAY(_to) \ |
77 | | NS_IMETHOD GetLength(uint32_t *aLength) override { return _to GetLength(aLength); } \ |
78 | | NS_IMETHOD QueryElementAt(uint32_t index, const nsIID & uuid, void * * result) override { return _to QueryElementAt(index, uuid, result); } \ |
79 | | NS_IMETHOD IndexOf(uint32_t startIndex, nsISupports *element, uint32_t *_retval) override { return _to IndexOf(startIndex, element, _retval); } \ |
80 | | NS_IMETHOD ScriptedEnumerate(nsIJSIID *aElemIID, uint8_t _argc, nsISimpleEnumerator **_retval) override { return _to ScriptedEnumerate(aElemIID, _argc, _retval); } \ |
81 | | NS_IMETHOD EnumerateImpl(const nsID & aElemIID, nsISimpleEnumerator **_retval) override { return _to EnumerateImpl(aElemIID, _retval); } \ |
82 | | |
83 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
84 | | #define NS_FORWARD_SAFE_NSIARRAY(_to) \ |
85 | | NS_IMETHOD GetLength(uint32_t *aLength) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \ |
86 | | NS_IMETHOD QueryElementAt(uint32_t index, const nsIID & uuid, void * * result) override { return !_to ? NS_ERROR_NULL_POINTER : _to->QueryElementAt(index, uuid, result); } \ |
87 | | NS_IMETHOD IndexOf(uint32_t startIndex, nsISupports *element, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IndexOf(startIndex, element, _retval); } \ |
88 | | NS_IMETHOD ScriptedEnumerate(nsIJSIID *aElemIID, uint8_t _argc, nsISimpleEnumerator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ScriptedEnumerate(aElemIID, _argc, _retval); } \ |
89 | | NS_IMETHOD EnumerateImpl(const nsID & aElemIID, nsISimpleEnumerator **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateImpl(aElemIID, _retval); } \ |
90 | | |
91 | | |
92 | | #endif /* __gen_nsIArray_h__ */ |