Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/imgIEncoder.idl
3 : */
4 :
5 : #ifndef __gen_imgIEncoder_h__
6 : #define __gen_imgIEncoder_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : #ifndef __gen_nsIAsyncInputStream_h__
14 : #include "nsIAsyncInputStream.h"
15 : #endif
16 :
17 : #ifndef __gen_nsIEventTarget_h__
18 : #include "nsIEventTarget.h"
19 : #endif
20 :
21 : /* For IDL files that don't want to include root IDL files. */
22 : #ifndef NS_NO_VTABLE
23 : #define NS_NO_VTABLE
24 : #endif
25 :
26 : /* starting interface: imgIEncoder */
27 : #define IMGIENCODER_IID_STR "4baa2d6e-fee7-42df-ae3f-5fbebc0c267c"
28 :
29 : #define IMGIENCODER_IID \
30 : {0x4baa2d6e, 0xfee7, 0x42df, \
31 : { 0xae, 0x3f, 0x5f, 0xbe, 0xbc, 0x0c, 0x26, 0x7c }}
32 :
33 0 : class NS_NO_VTABLE imgIEncoder : public nsIAsyncInputStream {
34 : public:
35 :
36 : NS_DECLARE_STATIC_IID_ACCESSOR(IMGIENCODER_IID)
37 :
38 : enum {
39 : INPUT_FORMAT_RGB = 0U,
40 : INPUT_FORMAT_RGBA = 1U,
41 : INPUT_FORMAT_HOSTARGB = 2U
42 : };
43 :
44 : /* void initFromData ([array, size_is (length), const] in uint8_t data, in unsigned long length, in uint32_t width, in uint32_t height, in uint32_t stride, in uint32_t inputFormat, in AString outputOptions); */
45 : NS_IMETHOD InitFromData(const uint8_t *data, uint32_t length, uint32_t width, uint32_t height, uint32_t stride, uint32_t inputFormat, const nsAString & outputOptions) = 0;
46 :
47 : /* void startImageEncode (in uint32_t width, in uint32_t height, in uint32_t inputFormat, in AString outputOptions); */
48 : NS_IMETHOD StartImageEncode(uint32_t width, uint32_t height, uint32_t inputFormat, const nsAString & outputOptions) = 0;
49 :
50 : /* void addImageFrame ([array, size_is (length), const] in uint8_t data, in unsigned long length, in uint32_t width, in uint32_t height, in uint32_t stride, in uint32_t frameFormat, in AString frameOptions); */
51 : NS_IMETHOD AddImageFrame(const uint8_t *data, uint32_t length, uint32_t width, uint32_t height, uint32_t stride, uint32_t frameFormat, const nsAString & frameOptions) = 0;
52 :
53 : /* void endImageEncode (); */
54 : NS_IMETHOD EndImageEncode(void) = 0;
55 :
56 : /* [noscript] unsigned long getImageBufferUsed (); */
57 : NS_IMETHOD GetImageBufferUsed(uint32_t *_retval) = 0;
58 :
59 : /* [noscript] charPtr getImageBuffer (); */
60 : NS_IMETHOD GetImageBuffer(char **_retval) = 0;
61 :
62 : };
63 :
64 : NS_DEFINE_STATIC_IID_ACCESSOR(imgIEncoder, IMGIENCODER_IID)
65 :
66 : /* Use this macro when declaring classes that implement this interface. */
67 : #define NS_DECL_IMGIENCODER \
68 : NS_IMETHOD InitFromData(const uint8_t *data, uint32_t length, uint32_t width, uint32_t height, uint32_t stride, uint32_t inputFormat, const nsAString & outputOptions) override; \
69 : NS_IMETHOD StartImageEncode(uint32_t width, uint32_t height, uint32_t inputFormat, const nsAString & outputOptions) override; \
70 : NS_IMETHOD AddImageFrame(const uint8_t *data, uint32_t length, uint32_t width, uint32_t height, uint32_t stride, uint32_t frameFormat, const nsAString & frameOptions) override; \
71 : NS_IMETHOD EndImageEncode(void) override; \
72 : NS_IMETHOD GetImageBufferUsed(uint32_t *_retval) override; \
73 : NS_IMETHOD GetImageBuffer(char **_retval) override;
74 :
75 : /* Use this macro when declaring the members of this interface when the
76 : class doesn't implement the interface. This is useful for forwarding. */
77 : #define NS_DECL_NON_VIRTUAL_IMGIENCODER \
78 : nsresult InitFromData(const uint8_t *data, uint32_t length, uint32_t width, uint32_t height, uint32_t stride, uint32_t inputFormat, const nsAString & outputOptions); \
79 : nsresult StartImageEncode(uint32_t width, uint32_t height, uint32_t inputFormat, const nsAString & outputOptions); \
80 : nsresult AddImageFrame(const uint8_t *data, uint32_t length, uint32_t width, uint32_t height, uint32_t stride, uint32_t frameFormat, const nsAString & frameOptions); \
81 : nsresult EndImageEncode(void); \
82 : nsresult GetImageBufferUsed(uint32_t *_retval); \
83 : nsresult GetImageBuffer(char **_retval);
84 :
85 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
86 : #define NS_FORWARD_IMGIENCODER(_to) \
87 : NS_IMETHOD InitFromData(const uint8_t *data, uint32_t length, uint32_t width, uint32_t height, uint32_t stride, uint32_t inputFormat, const nsAString & outputOptions) override { return _to InitFromData(data, length, width, height, stride, inputFormat, outputOptions); } \
88 : NS_IMETHOD StartImageEncode(uint32_t width, uint32_t height, uint32_t inputFormat, const nsAString & outputOptions) override { return _to StartImageEncode(width, height, inputFormat, outputOptions); } \
89 : NS_IMETHOD AddImageFrame(const uint8_t *data, uint32_t length, uint32_t width, uint32_t height, uint32_t stride, uint32_t frameFormat, const nsAString & frameOptions) override { return _to AddImageFrame(data, length, width, height, stride, frameFormat, frameOptions); } \
90 : NS_IMETHOD EndImageEncode(void) override { return _to EndImageEncode(); } \
91 : NS_IMETHOD GetImageBufferUsed(uint32_t *_retval) override { return _to GetImageBufferUsed(_retval); } \
92 : NS_IMETHOD GetImageBuffer(char **_retval) override { return _to GetImageBuffer(_retval); }
93 :
94 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
95 : #define NS_FORWARD_SAFE_IMGIENCODER(_to) \
96 : NS_IMETHOD InitFromData(const uint8_t *data, uint32_t length, uint32_t width, uint32_t height, uint32_t stride, uint32_t inputFormat, const nsAString & outputOptions) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitFromData(data, length, width, height, stride, inputFormat, outputOptions); } \
97 : NS_IMETHOD StartImageEncode(uint32_t width, uint32_t height, uint32_t inputFormat, const nsAString & outputOptions) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StartImageEncode(width, height, inputFormat, outputOptions); } \
98 : NS_IMETHOD AddImageFrame(const uint8_t *data, uint32_t length, uint32_t width, uint32_t height, uint32_t stride, uint32_t frameFormat, const nsAString & frameOptions) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddImageFrame(data, length, width, height, stride, frameFormat, frameOptions); } \
99 : NS_IMETHOD EndImageEncode(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EndImageEncode(); } \
100 : NS_IMETHOD GetImageBufferUsed(uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImageBufferUsed(_retval); } \
101 : NS_IMETHOD GetImageBuffer(char **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImageBuffer(_retval); }
102 :
103 : #if 0
104 : /* Use the code below as a template for the implementation class for this interface. */
105 :
106 : /* Header file */
107 : class _MYCLASS_ : public imgIEncoder
108 : {
109 : public:
110 : NS_DECL_ISUPPORTS
111 : NS_DECL_IMGIENCODER
112 :
113 : _MYCLASS_();
114 :
115 : private:
116 : ~_MYCLASS_();
117 :
118 : protected:
119 : /* additional members */
120 : };
121 :
122 : /* Implementation file */
123 : NS_IMPL_ISUPPORTS(_MYCLASS_, imgIEncoder)
124 :
125 : _MYCLASS_::_MYCLASS_()
126 : {
127 : /* member initializers and constructor code */
128 : }
129 :
130 : _MYCLASS_::~_MYCLASS_()
131 : {
132 : /* destructor code */
133 : }
134 :
135 : /* void initFromData ([array, size_is (length), const] in uint8_t data, in unsigned long length, in uint32_t width, in uint32_t height, in uint32_t stride, in uint32_t inputFormat, in AString outputOptions); */
136 : NS_IMETHODIMP _MYCLASS_::InitFromData(const uint8_t *data, uint32_t length, uint32_t width, uint32_t height, uint32_t stride, uint32_t inputFormat, const nsAString & outputOptions)
137 : {
138 : return NS_ERROR_NOT_IMPLEMENTED;
139 : }
140 :
141 : /* void startImageEncode (in uint32_t width, in uint32_t height, in uint32_t inputFormat, in AString outputOptions); */
142 : NS_IMETHODIMP _MYCLASS_::StartImageEncode(uint32_t width, uint32_t height, uint32_t inputFormat, const nsAString & outputOptions)
143 : {
144 : return NS_ERROR_NOT_IMPLEMENTED;
145 : }
146 :
147 : /* void addImageFrame ([array, size_is (length), const] in uint8_t data, in unsigned long length, in uint32_t width, in uint32_t height, in uint32_t stride, in uint32_t frameFormat, in AString frameOptions); */
148 : NS_IMETHODIMP _MYCLASS_::AddImageFrame(const uint8_t *data, uint32_t length, uint32_t width, uint32_t height, uint32_t stride, uint32_t frameFormat, const nsAString & frameOptions)
149 : {
150 : return NS_ERROR_NOT_IMPLEMENTED;
151 : }
152 :
153 : /* void endImageEncode (); */
154 : NS_IMETHODIMP _MYCLASS_::EndImageEncode()
155 : {
156 : return NS_ERROR_NOT_IMPLEMENTED;
157 : }
158 :
159 : /* [noscript] unsigned long getImageBufferUsed (); */
160 : NS_IMETHODIMP _MYCLASS_::GetImageBufferUsed(uint32_t *_retval)
161 : {
162 : return NS_ERROR_NOT_IMPLEMENTED;
163 : }
164 :
165 : /* [noscript] charPtr getImageBuffer (); */
166 : NS_IMETHODIMP _MYCLASS_::GetImageBuffer(char **_retval)
167 : {
168 : return NS_ERROR_NOT_IMPLEMENTED;
169 : }
170 :
171 : /* End of implementation class template. */
172 : #endif
173 :
174 :
175 : #endif /* __gen_imgIEncoder_h__ */
|