/work/obj-fuzz/dist/include/nsIAsyncOutputStream.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * DO NOT EDIT. THIS FILE IS GENERATED FROM /src/mozilla-central/xpcom/io/nsIAsyncOutputStream.idl |
3 | | */ |
4 | | |
5 | | #ifndef __gen_nsIAsyncOutputStream_h__ |
6 | | #define __gen_nsIAsyncOutputStream_h__ |
7 | | |
8 | | |
9 | | #ifndef __gen_nsIOutputStream_h__ |
10 | | #include "nsIOutputStream.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 nsIOutputStreamCallback; /* forward declaration */ |
20 | | |
21 | | class nsIEventTarget; /* forward declaration */ |
22 | | |
23 | | |
24 | | /* starting interface: nsIAsyncOutputStream */ |
25 | | #define NS_IASYNCOUTPUTSTREAM_IID_STR "beb632d3-d77a-4e90-9134-f9ece69e8200" |
26 | | |
27 | | #define NS_IASYNCOUTPUTSTREAM_IID \ |
28 | | {0xbeb632d3, 0xd77a, 0x4e90, \ |
29 | | { 0x91, 0x34, 0xf9, 0xec, 0xe6, 0x9e, 0x82, 0x00 }} |
30 | | |
31 | | class NS_NO_VTABLE nsIAsyncOutputStream : public nsIOutputStream { |
32 | | public: |
33 | | |
34 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IASYNCOUTPUTSTREAM_IID) |
35 | | |
36 | | /* void closeWithStatus (in nsresult reason); */ |
37 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CloseWithStatus(nsresult reason) = 0; |
38 | | |
39 | | /* void asyncWait (in nsIOutputStreamCallback aCallback, in unsigned long aFlags, in unsigned long aRequestedCount, in nsIEventTarget aEventTarget); */ |
40 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AsyncWait(nsIOutputStreamCallback *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(nsIAsyncOutputStream, NS_IASYNCOUTPUTSTREAM_IID) |
49 | | |
50 | | /* Use this macro when declaring classes that implement this interface. */ |
51 | | #define NS_DECL_NSIASYNCOUTPUTSTREAM \ |
52 | | NS_IMETHOD CloseWithStatus(nsresult reason) override; \ |
53 | | NS_IMETHOD AsyncWait(nsIOutputStreamCallback *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_NSIASYNCOUTPUTSTREAM \ |
58 | | nsresult CloseWithStatus(nsresult reason); \ |
59 | | nsresult AsyncWait(nsIOutputStreamCallback *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_NSIASYNCOUTPUTSTREAM(_to) \ |
63 | 0 | NS_IMETHOD CloseWithStatus(nsresult reason) override { return _to CloseWithStatus(reason); } \ |
64 | 0 | NS_IMETHOD AsyncWait(nsIOutputStreamCallback *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_NSIASYNCOUTPUTSTREAM(_to) \ |
68 | | NS_IMETHOD CloseWithStatus(nsresult reason) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CloseWithStatus(reason); } \ |
69 | | NS_IMETHOD AsyncWait(nsIOutputStreamCallback *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: nsIOutputStreamCallback */ |
73 | | #define NS_IOUTPUTSTREAMCALLBACK_IID_STR "40dbcdff-9053-42c5-a57c-3ec910d0f148" |
74 | | |
75 | | #define NS_IOUTPUTSTREAMCALLBACK_IID \ |
76 | | {0x40dbcdff, 0x9053, 0x42c5, \ |
77 | | { 0xa5, 0x7c, 0x3e, 0xc9, 0x10, 0xd0, 0xf1, 0x48 }} |
78 | | |
79 | | class NS_NO_VTABLE nsIOutputStreamCallback : public nsISupports { |
80 | | public: |
81 | | |
82 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOUTPUTSTREAMCALLBACK_IID) |
83 | | |
84 | | /* void onOutputStreamReady (in nsIAsyncOutputStream aStream); */ |
85 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnOutputStreamReady(nsIAsyncOutputStream *aStream) = 0; |
86 | | |
87 | | }; |
88 | | |
89 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIOutputStreamCallback, NS_IOUTPUTSTREAMCALLBACK_IID) |
90 | | |
91 | | /* Use this macro when declaring classes that implement this interface. */ |
92 | | #define NS_DECL_NSIOUTPUTSTREAMCALLBACK \ |
93 | | NS_IMETHOD OnOutputStreamReady(nsIAsyncOutputStream *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_NSIOUTPUTSTREAMCALLBACK \ |
98 | | nsresult OnOutputStreamReady(nsIAsyncOutputStream *aStream); |
99 | | |
100 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
101 | | #define NS_FORWARD_NSIOUTPUTSTREAMCALLBACK(_to) \ |
102 | | NS_IMETHOD OnOutputStreamReady(nsIAsyncOutputStream *aStream) override { return _to OnOutputStreamReady(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_NSIOUTPUTSTREAMCALLBACK(_to) \ |
106 | | NS_IMETHOD OnOutputStreamReady(nsIAsyncOutputStream *aStream) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnOutputStreamReady(aStream); } |
107 | | |
108 | | |
109 | | #endif /* __gen_nsIAsyncOutputStream_h__ */ |