omxil/mmilapi/ilif/inc/ilifbase.h
changeset 0 40261b775718
child 16 eedf2dcd43c6
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     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  @file
       
    18  @internalTechnology
       
    19  @prototype
       
    20 */
       
    21 
       
    22 #ifndef ILIFBASE_H
       
    23 #define ILIFBASE_H
       
    24 
       
    25 #include <e32base.h>
       
    26 
       
    27 	
       
    28 /** 
       
    29  Enumeration used to indicate IL Component internal state. 
       
    30 */	
       
    31 enum TILComponentState
       
    32 	{
       
    33 	/** 
       
    34 	Component invalid state 
       
    35 	 */
       
    36 	EComponentInvalid = 0,
       
    37 	/** 
       
    38 	Component loaded state 
       
    39 	*/
       
    40 	EComponentLoaded,
       
    41 	/** 
       
    42 	Component idle state 
       
    43 	*/
       
    44 	EComponentIdle,
       
    45 	/** 
       
    46 	Component executing state 
       
    47 	*/
       
    48 	EComponentExecuting,
       
    49 	/** 
       
    50 	Component paused state 
       
    51 	*/
       
    52 	EComponentPaused,
       
    53 	/** 
       
    54 	Component waiting for resources state 
       
    55 	*/
       
    56 	EComponentWaitingForResources,
       
    57 	/** 
       
    58 	Component loading state 
       
    59 	*/
       
    60 	EComponentLoading,		
       
    61 	/** 
       
    62 	Component initializing state 
       
    63 	*/
       
    64 	EComponentInitializing,		
       
    65 
       
    66 	EComponentMax = 0X7FFFFFFF	
       
    67 	};
       
    68 
       
    69 
       
    70 /**
       
    71 Enumeration used to indicate if a port is an input or an output port
       
    72 */
       
    73 enum TPortDirection
       
    74 {
       
    75 	/** 
       
    76 	Port is an input port 
       
    77 	*/
       
    78     EDirInput,
       
    79 	/** 
       
    80 	Port is an output port 
       
    81 	*/
       
    82     EDirOutput
       
    83 };
       
    84 
       
    85 
       
    86 /** 
       
    87  Enumeration used to define the various types of IL Events 
       
    88  This enumeration matches the possible component events as defined in the 
       
    89  OpenMAX v1.1 specification
       
    90  */	
       
    91 enum TILEventTypes
       
    92 	{
       
    93 	/** 
       
    94 	Component has completed the execution of a command.
       
    95 	 */
       
    96 	EEventCmdComplete = 0,
       
    97 	/** 
       
    98 	Component has detected an error condition.
       
    99 	*/
       
   100 	EEventError,
       
   101 	/** 
       
   102 	A buffer mark has reached the target component, and the IL client has
       
   103 	received this event with the private data pointer of the mark.
       
   104 	*/
       
   105 	EEventMark,
       
   106 	/** 
       
   107 	Component has changed port settings. For example, the component has
       
   108 	changed port settings resulting from bit stream parsing. 
       
   109 	*/
       
   110 	EEventPortSettingsChanged,
       
   111 	/** 
       
   112 	The event that a component sends when it detects the end of a stream.
       
   113 	*/
       
   114 	EEventBufferFlag,
       
   115 	/** 
       
   116 	The component has been granted resources and is transitioning from the
       
   117 	OMX_StateWaitForResources state to the OMX_StateIdle state.
       
   118 	*/
       
   119 	EEventResourcesAcquired,
       
   120 	/** 
       
   121 	The component has been resumed (i.e. no longer suspended) due to
       
   122 	reacquisition of resources.
       
   123 	*/
       
   124 	EEventDynamicResourcesAvailable,		
       
   125 
       
   126 	EEventMax = 0X7FFFFFFF
       
   127 	};
       
   128 	
       
   129 
       
   130 /**
       
   131 Event structure representing the events and data sent from the IL component to the IL client. 
       
   132 */
       
   133 class TILEvent
       
   134 	{
       
   135 public:
       
   136 	inline TILEvent();
       
   137 
       
   138 	inline TILEvent(TILEventTypes aEvent, TUint32 aData1, TUint32 aData2, TAny* aExtraData);
       
   139 
       
   140 public:
       
   141 	/** 
       
   142 	Event the component wants to notify the application about.
       
   143 	*/
       
   144 	TILEventTypes iEvent;
       
   145 	/** 
       
   146 	The first integer event-specific parameter.
       
   147 	*/
       
   148 	TUint32 iData1;
       
   149 	/** 
       
   150 	The second integer event-specific parameter.
       
   151 	*/
       
   152 	TUint32 iData2;
       
   153 	/** 
       
   154 	A pointer to additional event-specific data the component wants to send to the application.
       
   155 	The component owns the memory.
       
   156 	*/
       
   157 	TAny* iExtraData;
       
   158 	};
       
   159 
       
   160 /** 
       
   161  Enumeration used to define commands sent to the IL component
       
   162  This enumeration defines commands as defined in the OpenMAX v1.1 specification
       
   163  that are not alredy covered by the Symbian IL API
       
   164  */	
       
   165 enum TILCommandTypes
       
   166 	{
       
   167 	/** 
       
   168 	Change the component state command.
       
   169 	 */
       
   170     ECommandStateSet,    
       
   171  	/** 
       
   172 	Flush the data queue(s) of a component.
       
   173 	 */
       
   174     ECommandFlush,       
       
   175 	/** 
       
   176 	Disable a port on a component.
       
   177 	 */
       
   178     ECommandPortDisable, 
       
   179 	/** 
       
   180 	Enable a port on a component.
       
   181 	 */
       
   182     ECommandPortEnable,  
       
   183 	/** 
       
   184 	Mark a component/buffer for observation.
       
   185 	 */
       
   186 	ECommandMarkBuffer, 
       
   187 	/** 
       
   188 	Invalid command.
       
   189 	 */
       
   190 	ECommandInvalid = 0X7FFFFFFF 
       
   191 	};
       
   192 	
       
   193 /**
       
   194 Command structure representing the command's data sent to the IL component by the IL client
       
   195 */
       
   196 class TILCommand
       
   197 	{
       
   198 public:
       
   199 	inline TILCommand();
       
   200 
       
   201 	inline TILCommand(TILCommandTypes iCmd, TUint32 aData1, TAny* aExtraData);
       
   202 
       
   203 public:
       
   204 	/** 
       
   205 	Command that the application wants to send to the component.
       
   206 	*/
       
   207 	TILCommandTypes iCmd;
       
   208 	/** 
       
   209 	The integer command-specific parameter.
       
   210 	*/
       
   211 	TUint32 iData1;
       
   212 	/** 
       
   213     A pointer to additional command-specific data the application wants to send to the component.
       
   214 	The application owns the memory.
       
   215 	*/
       
   216 	TAny* iExtraData;
       
   217 	};
       
   218 	
       
   219 
       
   220 /**
       
   221 Structure encapsulating the various fields needed to represent a version of some content.
       
   222 */
       
   223 class TILVersion
       
   224 	{
       
   225 public:
       
   226 	inline TILVersion();
       
   227 
       
   228 	inline TILVersion(TUint8 aMajor, TUint8 aMinor, TUint8 aRev, TUint8 aStep); 
       
   229 		
       
   230 	inline TBool operator==(TILVersion aVersion);
       
   231 	
       
   232 	inline TBool operator!=(TILVersion aVersion);
       
   233 
       
   234 public:
       
   235 	/** 
       
   236 	Integer representing the Major version number.
       
   237 	*/
       
   238 	TUint8	iMajor;
       
   239 	/** 
       
   240 	Integer representing the Minor version number.
       
   241 	*/
       
   242 	TUint8	iMinor;
       
   243 	/** 
       
   244 	Integer representing the Revision version number.
       
   245 	*/
       
   246 	TUint8	iRev;
       
   247 	/** 
       
   248 	Integer representing the Step version number.
       
   249 	*/
       
   250 	TUint8	iStep;
       
   251 	};
       
   252 
       
   253 /**
       
   254 Structure encapsulating the various fields needed to represent a version of an IL component.
       
   255 This structure is based on the arguments required by the OMX_GetComponentVersion OMX API MACRO.  
       
   256 */
       
   257 class TILComponentVersion
       
   258 	{
       
   259 public:
       
   260 	inline TILComponentVersion(TPtr8& aPtr);
       
   261 
       
   262 public:
       
   263 	/** 
       
   264 	The component name to which the structure applies.
       
   265 	*/
       
   266 	TPtr8 iComponentName;	
       
   267 	/** 
       
   268 	The version of the component to which structure applies.
       
   269 	*/
       
   270 	TILVersion iComponentVersion;
       
   271 	/** 
       
   272 	The version of the specification that was used to build this component.
       
   273 	*/
       
   274 	TILVersion iSpecVersion;
       
   275 	/** 
       
   276 	The unique identifier for the particular instance of the component to which structure applies.
       
   277 	*/
       
   278 	TUint32 iComponentUniqueID;
       
   279 	};
       
   280 
       
   281 
       
   282 #include "ilifbase.inl"
       
   283 
       
   284 #endif // ILIFBASE_H