Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsISeekableStream.idl
3 : */
4 :
5 : #ifndef __gen_nsISeekableStream_h__
6 : #define __gen_nsISeekableStream_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: nsISeekableStream */
19 : #define NS_ISEEKABLESTREAM_IID_STR "8429d350-1040-4661-8b71-f2a6ba455980"
20 :
21 : #define NS_ISEEKABLESTREAM_IID \
22 : {0x8429d350, 0x1040, 0x4661, \
23 : { 0x8b, 0x71, 0xf2, 0xa6, 0xba, 0x45, 0x59, 0x80 }}
24 :
25 568 : class NS_NO_VTABLE nsISeekableStream : public nsISupports {
26 : public:
27 :
28 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISEEKABLESTREAM_IID)
29 :
30 : enum {
31 : NS_SEEK_SET = 0,
32 : NS_SEEK_CUR = 1,
33 : NS_SEEK_END = 2
34 : };
35 :
36 : /* void seek (in long whence, in long long offset); */
37 : NS_IMETHOD Seek(int32_t whence, int64_t offset) = 0;
38 :
39 : /* long long tell (); */
40 : NS_IMETHOD Tell(int64_t *_retval) = 0;
41 :
42 : /* void setEOF (); */
43 : NS_IMETHOD SetEOF(void) = 0;
44 :
45 : };
46 :
47 : NS_DEFINE_STATIC_IID_ACCESSOR(nsISeekableStream, NS_ISEEKABLESTREAM_IID)
48 :
49 : /* Use this macro when declaring classes that implement this interface. */
50 : #define NS_DECL_NSISEEKABLESTREAM \
51 : NS_IMETHOD Seek(int32_t whence, int64_t offset) override; \
52 : NS_IMETHOD Tell(int64_t *_retval) override; \
53 : NS_IMETHOD SetEOF(void) 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_NSISEEKABLESTREAM \
58 : nsresult Seek(int32_t whence, int64_t offset); \
59 : nsresult Tell(int64_t *_retval); \
60 : nsresult SetEOF(void);
61 :
62 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
63 : #define NS_FORWARD_NSISEEKABLESTREAM(_to) \
64 : NS_IMETHOD Seek(int32_t whence, int64_t offset) override { return _to Seek(whence, offset); } \
65 : NS_IMETHOD Tell(int64_t *_retval) override { return _to Tell(_retval); } \
66 : NS_IMETHOD SetEOF(void) override { return _to SetEOF(); }
67 :
68 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
69 : #define NS_FORWARD_SAFE_NSISEEKABLESTREAM(_to) \
70 : NS_IMETHOD Seek(int32_t whence, int64_t offset) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Seek(whence, offset); } \
71 : NS_IMETHOD Tell(int64_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Tell(_retval); } \
72 : NS_IMETHOD SetEOF(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEOF(); }
73 :
74 : #if 0
75 : /* Use the code below as a template for the implementation class for this interface. */
76 :
77 : /* Header file */
78 : class nsSeekableStream : public nsISeekableStream
79 : {
80 : public:
81 : NS_DECL_ISUPPORTS
82 : NS_DECL_NSISEEKABLESTREAM
83 :
84 : nsSeekableStream();
85 :
86 : private:
87 : ~nsSeekableStream();
88 :
89 : protected:
90 : /* additional members */
91 : };
92 :
93 : /* Implementation file */
94 : NS_IMPL_ISUPPORTS(nsSeekableStream, nsISeekableStream)
95 :
96 : nsSeekableStream::nsSeekableStream()
97 : {
98 : /* member initializers and constructor code */
99 : }
100 :
101 : nsSeekableStream::~nsSeekableStream()
102 : {
103 : /* destructor code */
104 : }
105 :
106 : /* void seek (in long whence, in long long offset); */
107 : NS_IMETHODIMP nsSeekableStream::Seek(int32_t whence, int64_t offset)
108 : {
109 : return NS_ERROR_NOT_IMPLEMENTED;
110 : }
111 :
112 : /* long long tell (); */
113 : NS_IMETHODIMP nsSeekableStream::Tell(int64_t *_retval)
114 : {
115 : return NS_ERROR_NOT_IMPLEMENTED;
116 : }
117 :
118 : /* void setEOF (); */
119 : NS_IMETHODIMP nsSeekableStream::SetEOF()
120 : {
121 : return NS_ERROR_NOT_IMPLEMENTED;
122 : }
123 :
124 : /* End of implementation class template. */
125 : #endif
126 :
127 :
128 : #endif /* __gen_nsISeekableStream_h__ */
|