|
1 // Copyright (c) 2008-2009 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 OMXILSYMBIANCOMPONENTLOADER_H |
|
17 #define OMXILSYMBIANCOMPONENTLOADER_H |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <e32des8.h> |
|
21 #include <openmax/il/loader/OMX_Loader.h> |
|
22 #include <openmax/il/loader/omxilcomponentif.h> |
|
23 #include <openmax/il/core/omxilloaderif.h> |
|
24 |
|
25 class CSymbianOmxComponentLoader : private COmxComponentLoaderIf |
|
26 { |
|
27 public: |
|
28 class TOmxComponentInfo |
|
29 { |
|
30 public: |
|
31 TOmxComponentInfo(); |
|
32 public: |
|
33 TUid iUid; |
|
34 TBuf8<OMX_MAX_STRINGNAME_SIZE> iComponentName; |
|
35 TBuf8<OMX_MAX_ROLESBUFFER_SIZE> iRoles; |
|
36 }; |
|
37 |
|
38 public: |
|
39 OMX_HANDLETYPE Handle(); |
|
40 |
|
41 static CSymbianOmxComponentLoader* NewL(); |
|
42 |
|
43 ~CSymbianOmxComponentLoader(); |
|
44 |
|
45 OMX_ERRORTYPE InitializeComponentLoader(); |
|
46 OMX_ERRORTYPE UnInitializeComponentLoader(OMX_LOADERTYPE* loader); |
|
47 OMX_ERRORTYPE LoadComponent( OMX_HANDLETYPE* pHandle, |
|
48 const OMX_STRING cComponentName, |
|
49 OMX_PTR pAppData, |
|
50 OMX_CALLBACKTYPE* pCallBacks ); |
|
51 OMX_ERRORTYPE UnloadComponent( OMX_HANDLETYPE hComponent ); |
|
52 OMX_ERRORTYPE ComponentNameEnum( OMX_STRING cComponentName, |
|
53 OMX_U32 nNameLength, |
|
54 const OMX_U32 nIndex ); |
|
55 OMX_ERRORTYPE GetRolesOfComponent( const OMX_STRING compName, |
|
56 OMX_U32* pNumRoles, |
|
57 OMX_U8** roles ); |
|
58 OMX_ERRORTYPE GetComponentsOfRole( const OMX_STRING role, |
|
59 OMX_U32* pNumComps, |
|
60 OMX_U8** compNames ); |
|
61 |
|
62 private: |
|
63 CSymbianOmxComponentLoader(); |
|
64 void ConstructL(); |
|
65 |
|
66 private: |
|
67 OMX_LOADERTYPE* iHandle; |
|
68 |
|
69 RArray<TOmxComponentInfo> iComponentNameList; |
|
70 RPointerArray<COmxILComponentIf> iComponents; |
|
71 }; |
|
72 |
|
73 inline CSymbianOmxComponentLoader::TOmxComponentInfo::TOmxComponentInfo(): |
|
74 iUid(TUid::Uid(0)),iComponentName(0),iRoles(0) |
|
75 { |
|
76 } |
|
77 |
|
78 |
|
79 #endif /*OMXILSYMBIANCOMPONENTLOADER_H*/ |