Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIStreamBufferAccess.idl
3 : */
4 :
5 : #ifndef __gen_nsIStreamBufferAccess_h__
6 : #define __gen_nsIStreamBufferAccess_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 :
18 : /* starting interface: nsIStreamBufferAccess */
19 : #define NS_ISTREAMBUFFERACCESS_IID_STR "ac923b72-ac87-4892-ac7a-ca385d429435"
20 :
21 : #define NS_ISTREAMBUFFERACCESS_IID \
22 : {0xac923b72, 0xac87, 0x4892, \
23 : { 0xac, 0x7a, 0xca, 0x38, 0x5d, 0x42, 0x94, 0x35 }}
24 :
25 113 : class NS_NO_VTABLE nsIStreamBufferAccess : public nsISupports {
26 : public:
27 :
28 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISTREAMBUFFERACCESS_IID)
29 :
30 : /* [noscript,notxpcom] charPtr getBuffer (in uint32_t aLength, in uint32_t aAlignMask); */
31 : NS_IMETHOD_(char *) GetBuffer(uint32_t aLength, uint32_t aAlignMask) = 0;
32 :
33 : /* [noscript,notxpcom] void putBuffer (in charPtr aBuffer, in uint32_t aLength); */
34 : NS_IMETHOD_(void) PutBuffer(char *aBuffer, uint32_t aLength) = 0;
35 :
36 : /* void disableBuffering (); */
37 : NS_IMETHOD DisableBuffering(void) = 0;
38 :
39 : /* void enableBuffering (); */
40 : NS_IMETHOD EnableBuffering(void) = 0;
41 :
42 : /* readonly attribute nsISupports unbufferedStream; */
43 : NS_IMETHOD GetUnbufferedStream(nsISupports * *aUnbufferedStream) = 0;
44 :
45 : };
46 :
47 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIStreamBufferAccess, NS_ISTREAMBUFFERACCESS_IID)
48 :
49 : /* Use this macro when declaring classes that implement this interface. */
50 : #define NS_DECL_NSISTREAMBUFFERACCESS \
51 : NS_IMETHOD_(char *) GetBuffer(uint32_t aLength, uint32_t aAlignMask) override; \
52 : NS_IMETHOD_(void) PutBuffer(char *aBuffer, uint32_t aLength) override; \
53 : NS_IMETHOD DisableBuffering(void) override; \
54 : NS_IMETHOD EnableBuffering(void) override; \
55 : NS_IMETHOD GetUnbufferedStream(nsISupports * *aUnbufferedStream) override;
56 :
57 : /* Use this macro when declaring the members of this interface when the
58 : class doesn't implement the interface. This is useful for forwarding. */
59 : #define NS_DECL_NON_VIRTUAL_NSISTREAMBUFFERACCESS \
60 : nsresult_(char *) GetBuffer(uint32_t aLength, uint32_t aAlignMask); \
61 : nsresult_(void) PutBuffer(char *aBuffer, uint32_t aLength); \
62 : nsresult DisableBuffering(void); \
63 : nsresult EnableBuffering(void); \
64 : nsresult GetUnbufferedStream(nsISupports * *aUnbufferedStream);
65 :
66 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
67 : #define NS_FORWARD_NSISTREAMBUFFERACCESS(_to) \
68 : NS_IMETHOD_(char *) GetBuffer(uint32_t aLength, uint32_t aAlignMask) override { return _to GetBuffer(aLength, aAlignMask); } \
69 : NS_IMETHOD_(void) PutBuffer(char *aBuffer, uint32_t aLength) override { return _to PutBuffer(aBuffer, aLength); } \
70 : NS_IMETHOD DisableBuffering(void) override { return _to DisableBuffering(); } \
71 : NS_IMETHOD EnableBuffering(void) override { return _to EnableBuffering(); } \
72 : NS_IMETHOD GetUnbufferedStream(nsISupports * *aUnbufferedStream) override { return _to GetUnbufferedStream(aUnbufferedStream); }
73 :
74 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
75 : #define NS_FORWARD_SAFE_NSISTREAMBUFFERACCESS(_to) \
76 : NS_IMETHOD_(char *) GetBuffer(uint32_t aLength, uint32_t aAlignMask) override; \
77 : NS_IMETHOD_(void) PutBuffer(char *aBuffer, uint32_t aLength) override; \
78 : NS_IMETHOD DisableBuffering(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DisableBuffering(); } \
79 : NS_IMETHOD EnableBuffering(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EnableBuffering(); } \
80 : NS_IMETHOD GetUnbufferedStream(nsISupports * *aUnbufferedStream) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUnbufferedStream(aUnbufferedStream); }
81 :
82 : #if 0
83 : /* Use the code below as a template for the implementation class for this interface. */
84 :
85 : /* Header file */
86 : class nsStreamBufferAccess : public nsIStreamBufferAccess
87 : {
88 : public:
89 : NS_DECL_ISUPPORTS
90 : NS_DECL_NSISTREAMBUFFERACCESS
91 :
92 : nsStreamBufferAccess();
93 :
94 : private:
95 : ~nsStreamBufferAccess();
96 :
97 : protected:
98 : /* additional members */
99 : };
100 :
101 : /* Implementation file */
102 : NS_IMPL_ISUPPORTS(nsStreamBufferAccess, nsIStreamBufferAccess)
103 :
104 : nsStreamBufferAccess::nsStreamBufferAccess()
105 : {
106 : /* member initializers and constructor code */
107 : }
108 :
109 : nsStreamBufferAccess::~nsStreamBufferAccess()
110 : {
111 : /* destructor code */
112 : }
113 :
114 : /* [noscript,notxpcom] charPtr getBuffer (in uint32_t aLength, in uint32_t aAlignMask); */
115 : NS_IMETHODIMP_(char *) nsStreamBufferAccess::GetBuffer(uint32_t aLength, uint32_t aAlignMask)
116 : {
117 : return NS_ERROR_NOT_IMPLEMENTED;
118 : }
119 :
120 : /* [noscript,notxpcom] void putBuffer (in charPtr aBuffer, in uint32_t aLength); */
121 : NS_IMETHODIMP_(void) nsStreamBufferAccess::PutBuffer(char *aBuffer, uint32_t aLength)
122 : {
123 : return NS_ERROR_NOT_IMPLEMENTED;
124 : }
125 :
126 : /* void disableBuffering (); */
127 : NS_IMETHODIMP nsStreamBufferAccess::DisableBuffering()
128 : {
129 : return NS_ERROR_NOT_IMPLEMENTED;
130 : }
131 :
132 : /* void enableBuffering (); */
133 : NS_IMETHODIMP nsStreamBufferAccess::EnableBuffering()
134 : {
135 : return NS_ERROR_NOT_IMPLEMENTED;
136 : }
137 :
138 : /* readonly attribute nsISupports unbufferedStream; */
139 : NS_IMETHODIMP nsStreamBufferAccess::GetUnbufferedStream(nsISupports * *aUnbufferedStream)
140 : {
141 : return NS_ERROR_NOT_IMPLEMENTED;
142 : }
143 :
144 : /* End of implementation class template. */
145 : #endif
146 :
147 :
148 : /**
149 : * These macros get and put a buffer given either an sba parameter that may
150 : * point to an object implementing nsIStreamBufferAccess, nsIObjectInputStream,
151 : * or nsIObjectOutputStream.
152 : */
153 : #define NS_GET_BUFFER(sba,n,a) ((sba)->GetBuffer(n, a))
154 : #define NS_PUT_BUFFER(sba,p,n) ((sba)->PutBuffer(p, n))
155 :
156 : #endif /* __gen_nsIStreamBufferAccess_h__ */
|