|
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 // Guest video driver - request handler extension (a.k.a. Command Scheduler extension) |
|
15 // This allows the sgdevice.ldd to make calls into the Command Scheduler |
|
16 // |
|
17 |
|
18 #ifndef ReqHandlerExtension_H |
|
19 #define ReqHandlerExtension_H |
|
20 |
|
21 |
|
22 #include <kernel/kernel.h> |
|
23 |
|
24 #include <sgresource/sgcommon.h>//TSgImageMetaData |
|
25 |
|
26 #include "virtualvideotracing.h" |
|
27 |
|
28 class MReqHandlerCallback |
|
29 { |
|
30 public: |
|
31 virtual void CreateSgImagePbuffer( const TSgImageMetaData& aInfo, TRequestStatus* aStatus, DThread* aThread ) = 0; |
|
32 virtual void CreateSgImageVGImage( const TSgImageMetaData& aInfo, TRequestStatus* aStatus, DThread* aThread ) = 0; |
|
33 virtual TInt DestroySgImage( const TUint64 aId ) = 0; |
|
34 }; |
|
35 |
|
36 NONSHARABLE_CLASS(DReqHandlerExtensionImpl): public DBase |
|
37 { |
|
38 public: |
|
39 TInt Construct(); |
|
40 void CreateSgImagePbuffer( const TSgImageMetaData& aInfo, TRequestStatus* aStatus, DThread* aThread ); |
|
41 void CreateSgImageVGImage( const TSgImageMetaData& aInfo, TRequestStatus* aStatus, DThread* aThread ); |
|
42 TInt DestroySgImage( const TUint64 aId ); |
|
43 TInt SetReqHandler( MReqHandlerCallback* aHandler ); |
|
44 private: |
|
45 DMutex* iMutex; |
|
46 MReqHandlerCallback* iCallBackHandler;//not owned |
|
47 }; |
|
48 |
|
49 class ReqHandlerExtension |
|
50 { |
|
51 public: |
|
52 //SgImage Creation and Destruction commands: |
|
53 IMPORT_C static TInt CreateSgImagePbuffer( const TSgImageMetaData& aInfo ); |
|
54 IMPORT_C static TInt CreateSgImageVGImage( const TSgImageMetaData& aInfo ); |
|
55 IMPORT_C static TInt DestroySgImage( const TUint64 aId ); |
|
56 IMPORT_C static TInt SetReqHandler( MReqHandlerCallback* aHandler ); |
|
57 //other functions to be added |
|
58 }; |
|
59 |
|
60 //#include <sgresource/ReqHandlerExtension.inl> |
|
61 |
|
62 #endif // ReqHandlerExtension_H |