1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/image/public/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 37 : class NS_NO_VTABLE NS_SCRIPTABLE 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 PRUint8 data, in unsigned long length, in PRUint32 width, in PRUint32 height, in PRUint32 stride, in PRUint32 inputFormat, in AString outputOptions); */
45 : NS_SCRIPTABLE NS_IMETHOD InitFromData(const PRUint8 *data, PRUint32 length, PRUint32 width, PRUint32 height, PRUint32 stride, PRUint32 inputFormat, const nsAString & outputOptions) = 0;
46 :
47 : /* void startImageEncode (in PRUint32 width, in PRUint32 height, in PRUint32 inputFormat, in AString outputOptions); */
48 : NS_SCRIPTABLE NS_IMETHOD StartImageEncode(PRUint32 width, PRUint32 height, PRUint32 inputFormat, const nsAString & outputOptions) = 0;
49 :
50 : /* void addImageFrame ([array, size_is (length), const] in PRUint8 data, in unsigned long length, in PRUint32 width, in PRUint32 height, in PRUint32 stride, in PRUint32 frameFormat, in AString frameOptions); */
51 : NS_SCRIPTABLE NS_IMETHOD AddImageFrame(const PRUint8 *data, PRUint32 length, PRUint32 width, PRUint32 height, PRUint32 stride, PRUint32 frameFormat, const nsAString & frameOptions) = 0;
52 :
53 : /* void endImageEncode (); */
54 : NS_SCRIPTABLE NS_IMETHOD EndImageEncode(void) = 0;
55 :
56 : /* [noscript] unsigned long getImageBufferUsed (); */
57 : NS_IMETHOD GetImageBufferUsed(PRUint32 *_retval NS_OUTPARAM) = 0;
58 :
59 : /* [noscript] charPtr getImageBuffer (); */
60 : NS_IMETHOD GetImageBuffer(char **_retval NS_OUTPARAM) = 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_SCRIPTABLE NS_IMETHOD InitFromData(const PRUint8 *data, PRUint32 length, PRUint32 width, PRUint32 height, PRUint32 stride, PRUint32 inputFormat, const nsAString & outputOptions); \
69 : NS_SCRIPTABLE NS_IMETHOD StartImageEncode(PRUint32 width, PRUint32 height, PRUint32 inputFormat, const nsAString & outputOptions); \
70 : NS_SCRIPTABLE NS_IMETHOD AddImageFrame(const PRUint8 *data, PRUint32 length, PRUint32 width, PRUint32 height, PRUint32 stride, PRUint32 frameFormat, const nsAString & frameOptions); \
71 : NS_SCRIPTABLE NS_IMETHOD EndImageEncode(void); \
72 : NS_IMETHOD GetImageBufferUsed(PRUint32 *_retval NS_OUTPARAM); \
73 : NS_IMETHOD GetImageBuffer(char **_retval NS_OUTPARAM);
74 :
75 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
76 : #define NS_FORWARD_IMGIENCODER(_to) \
77 : NS_SCRIPTABLE NS_IMETHOD InitFromData(const PRUint8 *data, PRUint32 length, PRUint32 width, PRUint32 height, PRUint32 stride, PRUint32 inputFormat, const nsAString & outputOptions) { return _to InitFromData(data, length, width, height, stride, inputFormat, outputOptions); } \
78 : NS_SCRIPTABLE NS_IMETHOD StartImageEncode(PRUint32 width, PRUint32 height, PRUint32 inputFormat, const nsAString & outputOptions) { return _to StartImageEncode(width, height, inputFormat, outputOptions); } \
79 : NS_SCRIPTABLE NS_IMETHOD AddImageFrame(const PRUint8 *data, PRUint32 length, PRUint32 width, PRUint32 height, PRUint32 stride, PRUint32 frameFormat, const nsAString & frameOptions) { return _to AddImageFrame(data, length, width, height, stride, frameFormat, frameOptions); } \
80 : NS_SCRIPTABLE NS_IMETHOD EndImageEncode(void) { return _to EndImageEncode(); } \
81 : NS_IMETHOD GetImageBufferUsed(PRUint32 *_retval NS_OUTPARAM) { return _to GetImageBufferUsed(_retval); } \
82 : NS_IMETHOD GetImageBuffer(char **_retval NS_OUTPARAM) { return _to GetImageBuffer(_retval); }
83 :
84 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
85 : #define NS_FORWARD_SAFE_IMGIENCODER(_to) \
86 : NS_SCRIPTABLE NS_IMETHOD InitFromData(const PRUint8 *data, PRUint32 length, PRUint32 width, PRUint32 height, PRUint32 stride, PRUint32 inputFormat, const nsAString & outputOptions) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitFromData(data, length, width, height, stride, inputFormat, outputOptions); } \
87 : NS_SCRIPTABLE NS_IMETHOD StartImageEncode(PRUint32 width, PRUint32 height, PRUint32 inputFormat, const nsAString & outputOptions) { return !_to ? NS_ERROR_NULL_POINTER : _to->StartImageEncode(width, height, inputFormat, outputOptions); } \
88 : NS_SCRIPTABLE NS_IMETHOD AddImageFrame(const PRUint8 *data, PRUint32 length, PRUint32 width, PRUint32 height, PRUint32 stride, PRUint32 frameFormat, const nsAString & frameOptions) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddImageFrame(data, length, width, height, stride, frameFormat, frameOptions); } \
89 : NS_SCRIPTABLE NS_IMETHOD EndImageEncode(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->EndImageEncode(); } \
90 : NS_IMETHOD GetImageBufferUsed(PRUint32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImageBufferUsed(_retval); } \
91 : NS_IMETHOD GetImageBuffer(char **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImageBuffer(_retval); }
92 :
93 : #if 0
94 : /* Use the code below as a template for the implementation class for this interface. */
95 :
96 : /* Header file */
97 : class _MYCLASS_ : public imgIEncoder
98 : {
99 : public:
100 : NS_DECL_ISUPPORTS
101 : NS_DECL_IMGIENCODER
102 :
103 : _MYCLASS_();
104 :
105 : private:
106 : ~_MYCLASS_();
107 :
108 : protected:
109 : /* additional members */
110 : };
111 :
112 : /* Implementation file */
113 : NS_IMPL_ISUPPORTS1(_MYCLASS_, imgIEncoder)
114 :
115 : _MYCLASS_::_MYCLASS_()
116 : {
117 : /* member initializers and constructor code */
118 : }
119 :
120 : _MYCLASS_::~_MYCLASS_()
121 : {
122 : /* destructor code */
123 : }
124 :
125 : /* void initFromData ([array, size_is (length), const] in PRUint8 data, in unsigned long length, in PRUint32 width, in PRUint32 height, in PRUint32 stride, in PRUint32 inputFormat, in AString outputOptions); */
126 : NS_IMETHODIMP _MYCLASS_::InitFromData(const PRUint8 *data, PRUint32 length, PRUint32 width, PRUint32 height, PRUint32 stride, PRUint32 inputFormat, const nsAString & outputOptions)
127 : {
128 : return NS_ERROR_NOT_IMPLEMENTED;
129 : }
130 :
131 : /* void startImageEncode (in PRUint32 width, in PRUint32 height, in PRUint32 inputFormat, in AString outputOptions); */
132 : NS_IMETHODIMP _MYCLASS_::StartImageEncode(PRUint32 width, PRUint32 height, PRUint32 inputFormat, const nsAString & outputOptions)
133 : {
134 : return NS_ERROR_NOT_IMPLEMENTED;
135 : }
136 :
137 : /* void addImageFrame ([array, size_is (length), const] in PRUint8 data, in unsigned long length, in PRUint32 width, in PRUint32 height, in PRUint32 stride, in PRUint32 frameFormat, in AString frameOptions); */
138 : NS_IMETHODIMP _MYCLASS_::AddImageFrame(const PRUint8 *data, PRUint32 length, PRUint32 width, PRUint32 height, PRUint32 stride, PRUint32 frameFormat, const nsAString & frameOptions)
139 : {
140 : return NS_ERROR_NOT_IMPLEMENTED;
141 : }
142 :
143 : /* void endImageEncode (); */
144 : NS_IMETHODIMP _MYCLASS_::EndImageEncode()
145 : {
146 : return NS_ERROR_NOT_IMPLEMENTED;
147 : }
148 :
149 : /* [noscript] unsigned long getImageBufferUsed (); */
150 : NS_IMETHODIMP _MYCLASS_::GetImageBufferUsed(PRUint32 *_retval NS_OUTPARAM)
151 : {
152 : return NS_ERROR_NOT_IMPLEMENTED;
153 : }
154 :
155 : /* [noscript] charPtr getImageBuffer (); */
156 : NS_IMETHODIMP _MYCLASS_::GetImageBuffer(char **_retval NS_OUTPARAM)
157 : {
158 : return NS_ERROR_NOT_IMPLEMENTED;
159 : }
160 :
161 : /* End of implementation class template. */
162 : #endif
163 :
164 :
165 : #endif /* __gen_imgIEncoder_h__ */
|