Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIAsyncStreamCopier.idl
3 : */
4 :
5 : #ifndef __gen_nsIAsyncStreamCopier_h__
6 : #define __gen_nsIAsyncStreamCopier_h__
7 :
8 :
9 : #ifndef __gen_nsIRequest_h__
10 : #include "nsIRequest.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 nsIInputStream; /* forward declaration */
18 :
19 : class nsIOutputStream; /* forward declaration */
20 :
21 : class nsIRequestObserver; /* forward declaration */
22 :
23 : class nsIEventTarget; /* forward declaration */
24 :
25 :
26 : /* starting interface: nsIAsyncStreamCopier */
27 : #define NS_IASYNCSTREAMCOPIER_IID_STR "5a19ca27-e041-4aca-8287-eb248d4c50c0"
28 :
29 : #define NS_IASYNCSTREAMCOPIER_IID \
30 : {0x5a19ca27, 0xe041, 0x4aca, \
31 : { 0x82, 0x87, 0xeb, 0x24, 0x8d, 0x4c, 0x50, 0xc0 }}
32 :
33 0 : class NS_NO_VTABLE nsIAsyncStreamCopier : public nsIRequest {
34 : public:
35 :
36 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IASYNCSTREAMCOPIER_IID)
37 :
38 : /* void init (in nsIInputStream aSource, in nsIOutputStream aSink, in nsIEventTarget aTarget, in boolean aSourceBuffered, in boolean aSinkBuffered, in unsigned long aChunkSize, in boolean aCloseSource, in boolean aCloseSink); */
39 : NS_IMETHOD Init(nsIInputStream *aSource, nsIOutputStream *aSink, nsIEventTarget *aTarget, bool aSourceBuffered, bool aSinkBuffered, uint32_t aChunkSize, bool aCloseSource, bool aCloseSink) = 0;
40 :
41 : /* void asyncCopy (in nsIRequestObserver aObserver, in nsISupports aObserverContext); */
42 : NS_IMETHOD AsyncCopy(nsIRequestObserver *aObserver, nsISupports *aObserverContext) = 0;
43 :
44 : };
45 :
46 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIAsyncStreamCopier, NS_IASYNCSTREAMCOPIER_IID)
47 :
48 : /* Use this macro when declaring classes that implement this interface. */
49 : #define NS_DECL_NSIASYNCSTREAMCOPIER \
50 : NS_IMETHOD Init(nsIInputStream *aSource, nsIOutputStream *aSink, nsIEventTarget *aTarget, bool aSourceBuffered, bool aSinkBuffered, uint32_t aChunkSize, bool aCloseSource, bool aCloseSink) override; \
51 : NS_IMETHOD AsyncCopy(nsIRequestObserver *aObserver, nsISupports *aObserverContext) override;
52 :
53 : /* Use this macro when declaring the members of this interface when the
54 : class doesn't implement the interface. This is useful for forwarding. */
55 : #define NS_DECL_NON_VIRTUAL_NSIASYNCSTREAMCOPIER \
56 : nsresult Init(nsIInputStream *aSource, nsIOutputStream *aSink, nsIEventTarget *aTarget, bool aSourceBuffered, bool aSinkBuffered, uint32_t aChunkSize, bool aCloseSource, bool aCloseSink); \
57 : nsresult AsyncCopy(nsIRequestObserver *aObserver, nsISupports *aObserverContext);
58 :
59 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
60 : #define NS_FORWARD_NSIASYNCSTREAMCOPIER(_to) \
61 : NS_IMETHOD Init(nsIInputStream *aSource, nsIOutputStream *aSink, nsIEventTarget *aTarget, bool aSourceBuffered, bool aSinkBuffered, uint32_t aChunkSize, bool aCloseSource, bool aCloseSink) override { return _to Init(aSource, aSink, aTarget, aSourceBuffered, aSinkBuffered, aChunkSize, aCloseSource, aCloseSink); } \
62 : NS_IMETHOD AsyncCopy(nsIRequestObserver *aObserver, nsISupports *aObserverContext) override { return _to AsyncCopy(aObserver, aObserverContext); }
63 :
64 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
65 : #define NS_FORWARD_SAFE_NSIASYNCSTREAMCOPIER(_to) \
66 : NS_IMETHOD Init(nsIInputStream *aSource, nsIOutputStream *aSink, nsIEventTarget *aTarget, bool aSourceBuffered, bool aSinkBuffered, uint32_t aChunkSize, bool aCloseSource, bool aCloseSink) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aSource, aSink, aTarget, aSourceBuffered, aSinkBuffered, aChunkSize, aCloseSource, aCloseSink); } \
67 : NS_IMETHOD AsyncCopy(nsIRequestObserver *aObserver, nsISupports *aObserverContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncCopy(aObserver, aObserverContext); }
68 :
69 : #if 0
70 : /* Use the code below as a template for the implementation class for this interface. */
71 :
72 : /* Header file */
73 : class nsAsyncStreamCopier : public nsIAsyncStreamCopier
74 : {
75 : public:
76 : NS_DECL_ISUPPORTS
77 : NS_DECL_NSIASYNCSTREAMCOPIER
78 :
79 : nsAsyncStreamCopier();
80 :
81 : private:
82 : ~nsAsyncStreamCopier();
83 :
84 : protected:
85 : /* additional members */
86 : };
87 :
88 : /* Implementation file */
89 : NS_IMPL_ISUPPORTS(nsAsyncStreamCopier, nsIAsyncStreamCopier)
90 :
91 : nsAsyncStreamCopier::nsAsyncStreamCopier()
92 : {
93 : /* member initializers and constructor code */
94 : }
95 :
96 : nsAsyncStreamCopier::~nsAsyncStreamCopier()
97 : {
98 : /* destructor code */
99 : }
100 :
101 : /* void init (in nsIInputStream aSource, in nsIOutputStream aSink, in nsIEventTarget aTarget, in boolean aSourceBuffered, in boolean aSinkBuffered, in unsigned long aChunkSize, in boolean aCloseSource, in boolean aCloseSink); */
102 : NS_IMETHODIMP nsAsyncStreamCopier::Init(nsIInputStream *aSource, nsIOutputStream *aSink, nsIEventTarget *aTarget, bool aSourceBuffered, bool aSinkBuffered, uint32_t aChunkSize, bool aCloseSource, bool aCloseSink)
103 : {
104 : return NS_ERROR_NOT_IMPLEMENTED;
105 : }
106 :
107 : /* void asyncCopy (in nsIRequestObserver aObserver, in nsISupports aObserverContext); */
108 : NS_IMETHODIMP nsAsyncStreamCopier::AsyncCopy(nsIRequestObserver *aObserver, nsISupports *aObserverContext)
109 : {
110 : return NS_ERROR_NOT_IMPLEMENTED;
111 : }
112 :
113 : /* End of implementation class template. */
114 : #endif
115 :
116 :
117 : #endif /* __gen_nsIAsyncStreamCopier_h__ */
|