/work/obj-fuzz/dist/include/nsIAsyncInputStream.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * DO NOT EDIT. THIS FILE IS GENERATED FROM /src/mozilla-central/xpcom/io/nsIAsyncInputStream.idl |
3 | | */ |
4 | | |
5 | | #ifndef __gen_nsIAsyncInputStream_h__ |
6 | | #define __gen_nsIAsyncInputStream_h__ |
7 | | |
8 | | |
9 | | #ifndef __gen_nsIInputStream_h__ |
10 | | #include "nsIInputStream.h" |
11 | | #endif |
12 | | |
13 | | #include "js/GCAnnotations.h" |
14 | | |
15 | | /* For IDL files that don't want to include root IDL files. */ |
16 | | #ifndef NS_NO_VTABLE |
17 | | #define NS_NO_VTABLE |
18 | | #endif |
19 | | class nsIInputStreamCallback; /* forward declaration */ |
20 | | |
21 | | class nsIEventTarget; /* forward declaration */ |
22 | | |
23 | | |
24 | | /* starting interface: nsIAsyncInputStream */ |
25 | | #define NS_IASYNCINPUTSTREAM_IID_STR "a5f255ab-4801-4161-8816-277ac92f6ad1" |
26 | | |
27 | | #define NS_IASYNCINPUTSTREAM_IID \ |
28 | | {0xa5f255ab, 0x4801, 0x4161, \ |
29 | | { 0x88, 0x16, 0x27, 0x7a, 0xc9, 0x2f, 0x6a, 0xd1 }} |
30 | | |
31 | | class NS_NO_VTABLE nsIAsyncInputStream : public nsIInputStream { |
32 | | public: |
33 | | |
34 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IASYNCINPUTSTREAM_IID) |
35 | | |
36 | | /* void closeWithStatus (in nsresult aStatus); */ |
37 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CloseWithStatus(nsresult aStatus) = 0; |
38 | | |
39 | | /* void asyncWait (in nsIInputStreamCallback aCallback, in unsigned long aFlags, in unsigned long aRequestedCount, in nsIEventTarget aEventTarget); */ |
40 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AsyncWait(nsIInputStreamCallback *aCallback, uint32_t aFlags, uint32_t aRequestedCount, nsIEventTarget *aEventTarget) = 0; |
41 | | |
42 | | enum { |
43 | | WAIT_CLOSURE_ONLY = 1U |
44 | | }; |
45 | | |
46 | | }; |
47 | | |
48 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIAsyncInputStream, NS_IASYNCINPUTSTREAM_IID) |
49 | | |
50 | | /* Use this macro when declaring classes that implement this interface. */ |
51 | | #define NS_DECL_NSIASYNCINPUTSTREAM \ |
52 | | NS_IMETHOD CloseWithStatus(nsresult aStatus) override; \ |
53 | | NS_IMETHOD AsyncWait(nsIInputStreamCallback *aCallback, uint32_t aFlags, uint32_t aRequestedCount, nsIEventTarget *aEventTarget) override; \ |
54 | | |
55 | | /* Use this macro when declaring the members of this interface when the |
56 | | class doesn't implement the interface. This is useful for forwarding. */ |
57 | | #define NS_DECL_NON_VIRTUAL_NSIASYNCINPUTSTREAM \ |
58 | | nsresult CloseWithStatus(nsresult aStatus); \ |
59 | | nsresult AsyncWait(nsIInputStreamCallback *aCallback, uint32_t aFlags, uint32_t aRequestedCount, nsIEventTarget *aEventTarget); \ |
60 | | |
61 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
62 | | #define NS_FORWARD_NSIASYNCINPUTSTREAM(_to) \ |
63 | 0 | NS_IMETHOD CloseWithStatus(nsresult aStatus) override { return _to CloseWithStatus(aStatus); } \ |
64 | 0 | NS_IMETHOD AsyncWait(nsIInputStreamCallback *aCallback, uint32_t aFlags, uint32_t aRequestedCount, nsIEventTarget *aEventTarget) override { return _to AsyncWait(aCallback, aFlags, aRequestedCount, aEventTarget); } \ |
65 | | |
66 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
67 | | #define NS_FORWARD_SAFE_NSIASYNCINPUTSTREAM(_to) \ |
68 | | NS_IMETHOD CloseWithStatus(nsresult aStatus) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CloseWithStatus(aStatus); } \ |
69 | | NS_IMETHOD AsyncWait(nsIInputStreamCallback *aCallback, uint32_t aFlags, uint32_t aRequestedCount, nsIEventTarget *aEventTarget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncWait(aCallback, aFlags, aRequestedCount, aEventTarget); } \ |
70 | | |
71 | | |
72 | | /* starting interface: nsIInputStreamCallback */ |
73 | | #define NS_IINPUTSTREAMCALLBACK_IID_STR "d1f28e94-3a6e-4050-a5f5-2e81b1fc2a43" |
74 | | |
75 | | #define NS_IINPUTSTREAMCALLBACK_IID \ |
76 | | {0xd1f28e94, 0x3a6e, 0x4050, \ |
77 | | { 0xa5, 0xf5, 0x2e, 0x81, 0xb1, 0xfc, 0x2a, 0x43 }} |
78 | | |
79 | | class NS_NO_VTABLE nsIInputStreamCallback : public nsISupports { |
80 | | public: |
81 | | |
82 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IINPUTSTREAMCALLBACK_IID) |
83 | | |
84 | | /* void onInputStreamReady (in nsIAsyncInputStream aStream); */ |
85 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnInputStreamReady(nsIAsyncInputStream *aStream) = 0; |
86 | | |
87 | | }; |
88 | | |
89 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIInputStreamCallback, NS_IINPUTSTREAMCALLBACK_IID) |
90 | | |
91 | | /* Use this macro when declaring classes that implement this interface. */ |
92 | | #define NS_DECL_NSIINPUTSTREAMCALLBACK \ |
93 | | NS_IMETHOD OnInputStreamReady(nsIAsyncInputStream *aStream) override; |
94 | | |
95 | | /* Use this macro when declaring the members of this interface when the |
96 | | class doesn't implement the interface. This is useful for forwarding. */ |
97 | | #define NS_DECL_NON_VIRTUAL_NSIINPUTSTREAMCALLBACK \ |
98 | | nsresult OnInputStreamReady(nsIAsyncInputStream *aStream); |
99 | | |
100 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
101 | | #define NS_FORWARD_NSIINPUTSTREAMCALLBACK(_to) \ |
102 | | NS_IMETHOD OnInputStreamReady(nsIAsyncInputStream *aStream) override { return _to OnInputStreamReady(aStream); } |
103 | | |
104 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
105 | | #define NS_FORWARD_SAFE_NSIINPUTSTREAMCALLBACK(_to) \ |
106 | | NS_IMETHOD OnInputStreamReady(nsIAsyncInputStream *aStream) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnInputStreamReady(aStream); } |
107 | | |
108 | | |
109 | | #endif /* __gen_nsIAsyncInputStream_h__ */ |