Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIStorageStream.idl
3 : */
4 :
5 : #ifndef __gen_nsIStorageStream_h__
6 : #define __gen_nsIStorageStream_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 nsIInputStream; /* forward declaration */
18 :
19 : class nsIOutputStream; /* forward declaration */
20 :
21 :
22 : /* starting interface: nsIStorageStream */
23 : #define NS_ISTORAGESTREAM_IID_STR "44a200fe-6c2b-4b41-b4e3-63e8c14e7c0d"
24 :
25 : #define NS_ISTORAGESTREAM_IID \
26 : {0x44a200fe, 0x6c2b, 0x4b41, \
27 : { 0xb4, 0xe3, 0x63, 0xe8, 0xc1, 0x4e, 0x7c, 0x0d }}
28 :
29 0 : class NS_NO_VTABLE nsIStorageStream : public nsISupports {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISTORAGESTREAM_IID)
33 :
34 : /* void init (in uint32_t segmentSize, in uint32_t maxSize); */
35 : NS_IMETHOD Init(uint32_t segmentSize, uint32_t maxSize) = 0;
36 :
37 : /* nsIOutputStream getOutputStream (in int32_t startPosition); */
38 : NS_IMETHOD GetOutputStream(int32_t startPosition, nsIOutputStream * *_retval) = 0;
39 :
40 : /* nsIInputStream newInputStream (in int32_t startPosition); */
41 : NS_IMETHOD NewInputStream(int32_t startPosition, nsIInputStream * *_retval) = 0;
42 :
43 : /* attribute uint32_t length; */
44 : NS_IMETHOD GetLength(uint32_t *aLength) = 0;
45 : NS_IMETHOD SetLength(uint32_t aLength) = 0;
46 :
47 : /* readonly attribute boolean writeInProgress; */
48 : NS_IMETHOD GetWriteInProgress(bool *aWriteInProgress) = 0;
49 :
50 : };
51 :
52 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIStorageStream, NS_ISTORAGESTREAM_IID)
53 :
54 : /* Use this macro when declaring classes that implement this interface. */
55 : #define NS_DECL_NSISTORAGESTREAM \
56 : NS_IMETHOD Init(uint32_t segmentSize, uint32_t maxSize) override; \
57 : NS_IMETHOD GetOutputStream(int32_t startPosition, nsIOutputStream * *_retval) override; \
58 : NS_IMETHOD NewInputStream(int32_t startPosition, nsIInputStream * *_retval) override; \
59 : NS_IMETHOD GetLength(uint32_t *aLength) override; \
60 : NS_IMETHOD SetLength(uint32_t aLength) override; \
61 : NS_IMETHOD GetWriteInProgress(bool *aWriteInProgress) override;
62 :
63 : /* Use this macro when declaring the members of this interface when the
64 : class doesn't implement the interface. This is useful for forwarding. */
65 : #define NS_DECL_NON_VIRTUAL_NSISTORAGESTREAM \
66 : nsresult Init(uint32_t segmentSize, uint32_t maxSize); \
67 : nsresult GetOutputStream(int32_t startPosition, nsIOutputStream * *_retval); \
68 : nsresult NewInputStream(int32_t startPosition, nsIInputStream * *_retval); \
69 : nsresult GetLength(uint32_t *aLength); \
70 : nsresult SetLength(uint32_t aLength); \
71 : nsresult GetWriteInProgress(bool *aWriteInProgress);
72 :
73 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
74 : #define NS_FORWARD_NSISTORAGESTREAM(_to) \
75 : NS_IMETHOD Init(uint32_t segmentSize, uint32_t maxSize) override { return _to Init(segmentSize, maxSize); } \
76 : NS_IMETHOD GetOutputStream(int32_t startPosition, nsIOutputStream * *_retval) override { return _to GetOutputStream(startPosition, _retval); } \
77 : NS_IMETHOD NewInputStream(int32_t startPosition, nsIInputStream * *_retval) override { return _to NewInputStream(startPosition, _retval); } \
78 : NS_IMETHOD GetLength(uint32_t *aLength) override { return _to GetLength(aLength); } \
79 : NS_IMETHOD SetLength(uint32_t aLength) override { return _to SetLength(aLength); } \
80 : NS_IMETHOD GetWriteInProgress(bool *aWriteInProgress) override { return _to GetWriteInProgress(aWriteInProgress); }
81 :
82 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
83 : #define NS_FORWARD_SAFE_NSISTORAGESTREAM(_to) \
84 : NS_IMETHOD Init(uint32_t segmentSize, uint32_t maxSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(segmentSize, maxSize); } \
85 : NS_IMETHOD GetOutputStream(int32_t startPosition, nsIOutputStream * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOutputStream(startPosition, _retval); } \
86 : NS_IMETHOD NewInputStream(int32_t startPosition, nsIInputStream * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NewInputStream(startPosition, _retval); } \
87 : NS_IMETHOD GetLength(uint32_t *aLength) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \
88 : NS_IMETHOD SetLength(uint32_t aLength) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLength(aLength); } \
89 : NS_IMETHOD GetWriteInProgress(bool *aWriteInProgress) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWriteInProgress(aWriteInProgress); }
90 :
91 : #if 0
92 : /* Use the code below as a template for the implementation class for this interface. */
93 :
94 : /* Header file */
95 : class nsStorageStream : public nsIStorageStream
96 : {
97 : public:
98 : NS_DECL_ISUPPORTS
99 : NS_DECL_NSISTORAGESTREAM
100 :
101 : nsStorageStream();
102 :
103 : private:
104 : ~nsStorageStream();
105 :
106 : protected:
107 : /* additional members */
108 : };
109 :
110 : /* Implementation file */
111 : NS_IMPL_ISUPPORTS(nsStorageStream, nsIStorageStream)
112 :
113 : nsStorageStream::nsStorageStream()
114 : {
115 : /* member initializers and constructor code */
116 : }
117 :
118 : nsStorageStream::~nsStorageStream()
119 : {
120 : /* destructor code */
121 : }
122 :
123 : /* void init (in uint32_t segmentSize, in uint32_t maxSize); */
124 : NS_IMETHODIMP nsStorageStream::Init(uint32_t segmentSize, uint32_t maxSize)
125 : {
126 : return NS_ERROR_NOT_IMPLEMENTED;
127 : }
128 :
129 : /* nsIOutputStream getOutputStream (in int32_t startPosition); */
130 : NS_IMETHODIMP nsStorageStream::GetOutputStream(int32_t startPosition, nsIOutputStream * *_retval)
131 : {
132 : return NS_ERROR_NOT_IMPLEMENTED;
133 : }
134 :
135 : /* nsIInputStream newInputStream (in int32_t startPosition); */
136 : NS_IMETHODIMP nsStorageStream::NewInputStream(int32_t startPosition, nsIInputStream * *_retval)
137 : {
138 : return NS_ERROR_NOT_IMPLEMENTED;
139 : }
140 :
141 : /* attribute uint32_t length; */
142 : NS_IMETHODIMP nsStorageStream::GetLength(uint32_t *aLength)
143 : {
144 : return NS_ERROR_NOT_IMPLEMENTED;
145 : }
146 : NS_IMETHODIMP nsStorageStream::SetLength(uint32_t aLength)
147 : {
148 : return NS_ERROR_NOT_IMPLEMENTED;
149 : }
150 :
151 : /* readonly attribute boolean writeInProgress; */
152 : NS_IMETHODIMP nsStorageStream::GetWriteInProgress(bool *aWriteInProgress)
153 : {
154 : return NS_ERROR_NOT_IMPLEMENTED;
155 : }
156 :
157 : /* End of implementation class template. */
158 : #endif
159 :
160 : // Factory method
161 : nsresult
162 : NS_NewStorageStream(uint32_t segmentSize, uint32_t maxSize, nsIStorageStream **result);
163 :
164 : #endif /* __gen_nsIStorageStream_h__ */
|