omxil/omxilcomponentcommon/src/common/omxilconfigmanager.h
changeset 56 b6488ac24ddc
parent 47 481b3bce574a
child 57 1cbb0d5bf7f2
equal deleted inserted replaced
47:481b3bce574a 56:b6488ac24ddc
     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 
       
    17 /**
       
    18  @file
       
    19  @internalComponent
       
    20 */
       
    21 
       
    22 #ifndef OMXILCONFIGMANAGER_H
       
    23 #define OMXILCONFIGMANAGER_H
       
    24 
       
    25 #include <e32base.h>
       
    26 #include <openmax/il/khronos/v1_x/OMX_Core.h>
       
    27 #include <openmax/il/khronos/v1_x/OMX_Component.h>
       
    28 #include <openmax/il/khronos/v1_x/OMX_Types.h>
       
    29 
       
    30 #include "omxilindexmanager.h"
       
    31 
       
    32 /**
       
    33    Config Manager Panic category
       
    34 */
       
    35 _LIT(KOmxILConfigManagerPanicCategory, "OmxILConfigManager");
       
    36 
       
    37 
       
    38 // Forward declarations
       
    39 class COmxILPortManager;
       
    40 
       
    41 
       
    42 /**
       
    43    This class is a placeholder for those OpenMAX IL parameters and configs that
       
    44    apply to the component as a whole and not to an specific port in the
       
    45    component. The design of this class should be revisited as the OpenMAX IL
       
    46    resource management logic is added. For now resource management-related
       
    47    params/configs values can only be set or queried but the associated
       
    48    functionality is missing.
       
    49  */
       
    50 class COmxILConfigManager : public COmxILIndexManager
       
    51 	{
       
    52 
       
    53 public:
       
    54 
       
    55 	IMPORT_C static COmxILConfigManager* NewL(
       
    56 		COmxILPortManager& aPortManager,
       
    57 		const TDesC8& aComponentName,
       
    58 		const OMX_VERSIONTYPE& aComponentVersion,
       
    59 		const RPointerArray<TDesC8>& aComponentRoleList);
       
    60 
       
    61 	IMPORT_C ~COmxILConfigManager();
       
    62 
       
    63 	IMPORT_C virtual OMX_ERRORTYPE GetComponentVersion(
       
    64 		OMX_STRING aComponentName,
       
    65 		OMX_VERSIONTYPE* apComponentVersion,
       
    66 		OMX_VERSIONTYPE* apSpecVersion,
       
    67 		OMX_UUIDTYPE* apComponentUUID) const;
       
    68 
       
    69 	IMPORT_C virtual OMX_ERRORTYPE GetParameter(
       
    70 		OMX_INDEXTYPE aParamIndex,
       
    71 		TAny* apComponentParameterStructure) const;
       
    72 
       
    73 	IMPORT_C virtual OMX_ERRORTYPE SetParameter(
       
    74 		OMX_INDEXTYPE aParamIndex,
       
    75 		const TAny* apComponentParameterStructure,
       
    76 		OMX_BOOL aInitTime = OMX_TRUE);
       
    77 
       
    78 	IMPORT_C virtual OMX_ERRORTYPE GetConfig(
       
    79 		OMX_INDEXTYPE aConfigIndex,
       
    80 		TAny* apComponentConfigStructure) const;
       
    81 
       
    82 	IMPORT_C virtual OMX_ERRORTYPE SetConfig(
       
    83 		OMX_INDEXTYPE aConfigIndex,
       
    84 		const TAny* apComponentConfigStructure);
       
    85 
       
    86 	IMPORT_C virtual OMX_ERRORTYPE GetExtensionIndex(
       
    87 		OMX_STRING aParameterName,
       
    88 		OMX_INDEXTYPE* apIndexType) const;
       
    89 
       
    90 	IMPORT_C OMX_ERRORTYPE ComponentRoleEnum(
       
    91 		OMX_U8* aRole,
       
    92 		OMX_U32 aIndex) const;
       
    93 
       
    94 protected:
       
    95 
       
    96 	IMPORT_C explicit COmxILConfigManager(COmxILPortManager& aPortManager);
       
    97 
       
    98 	IMPORT_C void ConstructL(const TDesC8& aComponentName,
       
    99 					const OMX_VERSIONTYPE& aComponentVersion,
       
   100 					const RPointerArray<TDesC8>& aComponentRoleList);
       
   101 
       
   102 
       
   103 	static TBool CompareRoles(const HBufC8& aRole1, const HBufC8& aRole2);
       
   104 
       
   105 
       
   106 protected:
       
   107 
       
   108 	// Reference to the component's port manager
       
   109 	COmxILPortManager& iPortManager;
       
   110 
       
   111 	// Reference to the component's port manager
       
   112 	RBuf8 iComponentName;
       
   113 
       
   114 	// The list of OpenMAX IL roles supported by the component
       
   115 	RPointerArray<HBufC8> iComponentRoleList;
       
   116 
       
   117 	// The current OpenMAX IL role
       
   118 	TUint iCurrentRoleIndex;
       
   119 
       
   120 	// The current version of this component (this is different to the spec
       
   121 	// version)
       
   122 	OMX_VERSIONTYPE iComponentVersion;
       
   123 
       
   124 	// OpenMAX IL resource concealment structure (only set/get, resource
       
   125 	// concealment logic not implemented)
       
   126 	OMX_RESOURCECONCEALMENTTYPE iParamDisableResourceConcealment;
       
   127 
       
   128 	// OpenMAX IL component suspension policy structure (only set/get,
       
   129 	// component suspension logic not implemented)
       
   130 	OMX_PARAM_SUSPENSIONPOLICYTYPE iParamSuspensionPolicy;
       
   131 
       
   132 	// OpenMAX IL component priority structure (only set/get, component
       
   133 	// priority logic not implemented)
       
   134 	OMX_PRIORITYMGMTTYPE iConfigPriorityMgmt;
       
   135 
       
   136 	};
       
   137 
       
   138 #endif // OMXILCONFIGMANAGER_H