1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 |
|
15 |
|
16 #ifndef DRIVERREMOTEFUNCTIONCALL_H_ |
|
17 #define DRIVERREMOTEFUNCTIONCALL_H_ |
|
18 |
|
19 #include "remotefunctioncall.h" |
|
20 #include "serialisedapiuids.h" |
|
21 |
|
22 #include "remotefunctioncall.h" |
|
23 |
|
24 #ifdef __SYMBIAN32__ |
|
25 #include <e32const.h> |
|
26 #include <e32def.h> |
|
27 #include <EGL/egl.h> |
|
28 #else |
|
29 #include "EGL/egl.h" |
|
30 #include "EGL/eglext.h" |
|
31 #endif |
|
32 |
|
33 #ifdef __SYMBIAN32__ |
|
34 #define __VG_OPENVG_H_ |
|
35 #include <VG/1.1/openvg.h> |
|
36 #include <VG/vgu.h> |
|
37 #else |
|
38 #define __OPENVGHEADERS_USE_VG_1_1 |
|
39 #include <VG/openvg.h> |
|
40 #include "VG/vgu.h" |
|
41 #endif |
|
42 |
|
43 class DriverRFC: public RemoteFunctionCall |
|
44 { |
|
45 public: |
|
46 //Openvg pperation code |
|
47 enum TOperationCode |
|
48 { |
|
49 EDrvClientShutdown, |
|
50 EDrvCreatePoolContext, //for creating the pool context hostside |
|
51 EDrvCreatePbufferSg, |
|
52 EDrvCreateVGImageSg, |
|
53 EDrvDeleteSgImage, |
|
54 EDrvSyncVGImageFromPBuffer |
|
55 }; |
|
56 |
|
57 //Parameter data type |
|
58 enum TParamType |
|
59 { |
|
60 EPTVoid, |
|
61 EEGLBoolean, |
|
62 EEGLint, |
|
63 EEGLenum, |
|
64 EEGLDisplay, |
|
65 EEGLConfig, |
|
66 EEGLSurface, |
|
67 EEGLContext, |
|
68 EEGLClientBuffer, |
|
69 EEGLImageKHR, |
|
70 EEGLNativeDisplayType, |
|
71 EEGLNativeWindowType, |
|
72 EEGLNativePixmapType, |
|
73 EEGLVoid, |
|
74 ETUint32, |
|
75 //VG parameters |
|
76 EVGfloat, |
|
77 EVGbyte, |
|
78 EVGubyte, |
|
79 EVGshort, |
|
80 EVGint, |
|
81 EVGuint, |
|
82 EVGbitfield, |
|
83 EVGboolean, |
|
84 EVGHandle, |
|
85 EVGErrorCode, |
|
86 EVGParamType, //10 |
|
87 EVGRenderingQuality, |
|
88 EVGPixelLayout, |
|
89 EVGMatrixMode, |
|
90 EVGMaskOperation, |
|
91 EVGPathDatatype, |
|
92 EVGPathAbsRel, |
|
93 EVGPathSegment, |
|
94 EVGPathCommand, |
|
95 EVGPath, |
|
96 EVGPathCapabilities, //20 |
|
97 EVGPathParamType, |
|
98 EVGCapStyle, |
|
99 EVGJoinStyle, |
|
100 EVGFillRule, |
|
101 EVGPaintMode, |
|
102 EVGPaint, |
|
103 EVGPaintParamType, |
|
104 EVGPaintType, |
|
105 EVGColorRampSpreadMode, |
|
106 EVGTilingMode, //30 |
|
107 EVGImageFormat, |
|
108 EVGImage, |
|
109 EVGImageQuality, |
|
110 EVGImageParamType, |
|
111 EVGImageMode, |
|
112 EVGImageChannel, |
|
113 EVGBlendMode, |
|
114 EVGHardwareQueryType, |
|
115 EVGHardwareQueryResult, |
|
116 EVGStringID, //40 |
|
117 EVGvoid, |
|
118 EVGUArcType, |
|
119 EVGeglImageKHR |
|
120 }; |
|
121 |
|
122 DriverRFC( RemoteFunctionCallData& aData ): |
|
123 RemoteFunctionCall( aData ) |
|
124 { |
|
125 } |
|
126 |
|
127 //Size of type aType |
|
128 TInt GetTypeSize( TInt32 aParamType ) const; |
|
129 |
|
130 //Alignemnt of type aType |
|
131 TInt GetTypeAlignment( TInt32 aParamType ) const; |
|
132 |
|
133 //Alignemnt of type aType |
|
134 TUint32 GetAPIUid() const { return SERIALISED_DRIVER_API_UID; } |
|
135 |
|
136 |
|
137 |
|
138 inline void AppendEGLBoolean( const EGLBoolean& aParam, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
139 inline void AppendEGLint( const EGLint& aParam, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
140 inline void AppendEGLenum( const EGLenum& aParam, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
141 inline void AppendEGLDisplay( const EGLDisplay& aParam, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
142 inline void AppendEGLConfig( const EGLConfig& aParam, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
143 inline void AppendEGLSurface( const EGLSurface& aParam, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
144 inline void AppendEGLContext( const EGLContext& aParam, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
145 inline void AppendEGLClientBuffer( const EGLClientBuffer& aParam, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
146 inline void AppendEGLImageKHR( const EGLImageKHR& aParam, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
147 inline void AppendEGLNativeDisplayType( const NativeDisplayType& aParam, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
148 inline void AppendEGLNativeWindowType( const NativeWindowType& aParam, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
149 inline void AppendEGLNativePixmapType( const NativePixmapType& aParam, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
150 #ifdef __SYMBIAN32__ |
|
151 inline void AppendEGLSize( const TSize& aSize, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
152 #endif |
|
153 |
|
154 //Gets a simple parameter value from parameter array |
|
155 inline void GetEGLBoolean( EGLBoolean& aParam, TInt aIndex ); |
|
156 inline void GetEGLint( EGLint& aParam, TInt aIndex ); |
|
157 inline void GetEGLenum( EGLenum& aParam, TInt aIndex ); |
|
158 inline void GetEGLDisplay( EGLDisplay& aParam, TInt aIndex ); |
|
159 inline void GetEGLConfig( EGLConfig& aParam, TInt aIndex ); |
|
160 inline void GetEGLSurface( EGLSurface& aParam, TInt aIndex ); |
|
161 inline void GetEGLContext( EGLContext& aParam, TInt aIndex ); |
|
162 inline void GetEGLClientBuffer( EGLClientBuffer& aParam, TInt aIndex ); |
|
163 inline void GetEGLImageKHR( EGLImageKHR& aParam, TInt aIndex ); |
|
164 inline void GetEGLNativeDisplayType( NativeDisplayType& aParam, TInt aIndex ); |
|
165 inline void GetEGLNativeWindowType( NativeWindowType& aParam, TInt aIndex ); |
|
166 inline void GetEGLNativePixmapType( NativePixmapType& aParam, TInt aIndex ); |
|
167 |
|
168 //Gets a pointer to an array parameter from parameter array |
|
169 inline void GetEGLintVectorData( EGLint* &aData, TInt& aSize, TInt aIndex ); |
|
170 inline void GetEGLConfigVectorData( EGLConfig* &aData, TInt& aSize, TInt aIndex ); |
|
171 inline void GetVectorData( void* &aData, TInt& aSize, TInt aIndex ); |
|
172 |
|
173 //Sets a pointer to the data of an array parameter |
|
174 inline void SetEGLintVectorData( const EGLint* aData, TInt aLength, TInt aIndex ); |
|
175 inline void SetEGLConfigVectorData( const EGLConfig* aData, TInt aLength, TInt aIndex ); |
|
176 inline void SetVectorData( const void* aData, TInt aLength, TInt aIndex ); |
|
177 |
|
178 //Appends an array parameter to the parameter array |
|
179 // Does not serialize any data |
|
180 inline void AppendEGLintVector( const EGLint* aData, TInt aLength, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
181 inline void AppendEGLConfigVector( const EGLConfig* aData, TInt aLength, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
182 inline void AppendVector( const void* aData, TInt aLength, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
183 |
|
184 |
|
185 inline void AppendTUint32( const TUint32& aParam, RemoteFunctionCallData::TParamDirection aDir = RemoteFunctionCallData::EIn ); |
|
186 inline void GetTUint32( TUint32& aParam, TInt aIndex ); |
|
187 |
|
188 // |
|
189 //VG parameters |
|
190 //Appends a simple parameter to the parameter array |
|
191 // Does not serialize any data |
|
192 inline void AppendVGParam( const VGfloat& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
193 inline void AppendVGParam( const VGbyte& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
194 inline void AppendVGParam( const VGubyte& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
195 inline void AppendVGParam( const VGshort& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
196 inline void AppendVGParam( const VGint& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
197 inline void AppendVGParam( const VGuint& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
198 inline void AppendVGParam( const VGboolean& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
199 inline void AppendVGParam( const VGErrorCode& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
200 inline void AppendVGParam( const VGParamType& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
201 inline void AppendVGParam( const VGRenderingQuality& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
202 inline void AppendVGParam( const VGPixelLayout& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
203 inline void AppendVGParam( const VGMatrixMode& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
204 inline void AppendVGParam( const VGMaskOperation& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
205 inline void AppendVGParam( const VGPathDatatype& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
206 inline void AppendVGParam( const VGPathAbsRel& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
207 inline void AppendVGParam( const VGPathSegment& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
208 inline void AppendVGParam( const VGPathCommand& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
209 inline void AppendVGParam( const VGPathCapabilities& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
210 inline void AppendVGParam( const VGPathParamType& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
211 inline void AppendVGParam( const VGCapStyle& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
212 inline void AppendVGParam( const VGJoinStyle& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
213 inline void AppendVGParam( const VGFillRule& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
214 inline void AppendVGParam( const VGPaintMode& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
215 inline void AppendVGParam( const VGPaintParamType& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
216 inline void AppendVGParam( const VGPaintType& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
217 inline void AppendVGParam( const VGColorRampSpreadMode& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
218 inline void AppendVGParam( const VGTilingMode& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
219 inline void AppendVGParam( const VGImageFormat& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
220 inline void AppendVGParam( const VGImageQuality& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
221 inline void AppendVGParam( const VGImageParamType& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
222 inline void AppendVGParam( const VGImageMode& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
223 inline void AppendVGParam( const VGImageChannel& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
224 inline void AppendVGParam( const VGBlendMode& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
225 inline void AppendVGParam( const VGHardwareQueryType& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
226 inline void AppendVGParam( const VGHardwareQueryResult& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
227 inline void AppendVGParam( const VGStringID& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
228 inline void AppendVGParam( const VGUArcType& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
229 #ifdef __SYMBIAN32__ |
|
230 inline void AppendVGParam( const VGeglImageKHR& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn ); |
|
231 #endif |
|
232 |
|
233 //Gets a simple parameter value from parameter array |
|
234 inline void GetVGParamValue( VGfloat& aParam, TInt aIndex ); |
|
235 inline void GetVGParamValue( VGbyte& aParam, TInt aIndex ); |
|
236 inline void GetVGParamValue( VGubyte& aParam, TInt aIndex ); |
|
237 inline void GetVGParamValue( VGshort& aParam, TInt aIndex ); |
|
238 inline void GetVGParamValue( VGint& aParam, TInt aIndex ); |
|
239 inline void GetVGParamValue( VGuint& aParam, TInt aIndex ); |
|
240 inline void GetVGParamValue( VGboolean& aParam, TInt aIndex ); |
|
241 inline void GetVGParamValue( VGErrorCode& aParam, TInt aIndex ); |
|
242 inline void GetVGParamValue( VGParamType& aParam, TInt aIndex ); |
|
243 inline void GetVGParamValue( VGRenderingQuality& aParam, TInt aIndex ); |
|
244 inline void GetVGParamValue( VGPixelLayout& aParam, TInt aIndex ); |
|
245 inline void GetVGParamValue( VGMatrixMode& aParam, TInt aIndex ); |
|
246 inline void GetVGParamValue( VGMaskOperation& aParam, TInt aIndex ); |
|
247 inline void GetVGParamValue( VGPathDatatype& aParam, TInt aIndex ); |
|
248 inline void GetVGParamValue( VGPathAbsRel& aParam, TInt aIndex ); |
|
249 inline void GetVGParamValue( VGPathSegment& aParam, TInt aIndex ); |
|
250 inline void GetVGParamValue( VGPathCommand& aParam, TInt aIndex ); |
|
251 inline void GetVGParamValue( VGPathCapabilities& aParam, TInt aIndex ); |
|
252 inline void GetVGParamValue( VGPathParamType& aParam, TInt aIndex ); |
|
253 inline void GetVGParamValue( VGCapStyle& aParam, TInt aIndex ); |
|
254 inline void GetVGParamValue( VGJoinStyle& aParam, TInt aIndex ); |
|
255 inline void GetVGParamValue( VGFillRule& aParam, TInt aIndex ); |
|
256 inline void GetVGParamValue( VGPaintMode& aParam, TInt aIndex ); |
|
257 inline void GetVGParamValue( VGPaintParamType& aParam, TInt aIndex ); |
|
258 inline void GetVGParamValue( VGPaintType& aParam, TInt aIndex ); |
|
259 inline void GetVGParamValue( VGColorRampSpreadMode& aParam, TInt aIndex ); |
|
260 inline void GetVGParamValue( VGTilingMode& aParam, TInt aIndex ); |
|
261 inline void GetVGParamValue( VGImageFormat& aParam, TInt aIndex ); |
|
262 inline void GetVGParamValue( VGImageQuality& aParam, TInt aIndex ); |
|
263 inline void GetVGParamValue( VGImageParamType& aParam, TInt aIndex ); |
|
264 inline void GetVGParamValue( VGImageMode& aParam, TInt aIndex ); |
|
265 inline void GetVGParamValue( VGImageChannel& aParam, TInt aIndex ); |
|
266 inline void GetVGParamValue( VGBlendMode& aParam, TInt aIndex ); |
|
267 inline void GetVGParamValue( VGHardwareQueryType& aParam, TInt aIndex ); |
|
268 inline void GetVGParamValue( VGHardwareQueryResult& aParam, TInt aIndex ); |
|
269 inline void GetVGParamValue( VGStringID& aParam, TInt aIndex ); |
|
270 inline void GetVGParamValue( VGUArcType& aParam, TInt aIndex ); |
|
271 |
|
272 |
|
273 }; |
|
274 #include "driverrfc.inl" |
|
275 |
|
276 #endif |
|