omxil/mmilapi/refomxil/inc/momxilcomponentifobserver.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 #ifndef MOMXILCOMPONENTIFOBSERVER_H
       
    17 #define MOMXILCOMPONENTIFOBSERVER_H
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <openmax/il/khronos/v1_x/OMX_Core.h>
       
    21 
       
    22 class CMMFBuffer;
       
    23 
       
    24 /**
       
    25 OpenMAX component interface observer class.
       
    26 This is an internal interface class that encapsulates and represents the OpenMAX callback API as defined by the OpenMAX specification.
       
    27 */
       
    28 class MOmxILComponentIfObserver
       
    29 	{
       
    30 public:
       
    31 	
       
    32 	/**
       
    33 	Callback method that returns the buffer that has been filled.
       
    34 	
       
    35 	@param 	aBuffer
       
    36 	 		The buffer returned by the OpenMAX component.
       
    37 	@param 	aPortIndex
       
    38 	 		The OpenMAX component's port index returning the buffer.
       
    39 	@return	
       
    40 			KErrNone, if successful; otherwise one of the other system-wide error codes. 
       
    41 	*/
       
    42 
       
    43 	virtual TInt FillBufferDone(CMMFBuffer* aBuffer, TInt aPortIndex) = 0;
       
    44 
       
    45 	/**
       
    46 	Callback method that returns the buffer that has been emptied.
       
    47 	
       
    48 	@param 	aBuffer
       
    49 	 		The buffer returned by the OpenMAX component.
       
    50 	@param 	aPortIndex
       
    51 	 		The OpenMAX component's port index returning the buffer.
       
    52 	@return	
       
    53 			KErrNone, if successful; otherwise one of the other system-wide error codes. 
       
    54 	*/
       
    55 	virtual TInt EmptyBufferDone(const CMMFBuffer* aBuffer, TInt aPortIndex) = 0;
       
    56 
       
    57 	/**
       
    58 	Callback method used by the component to notify the client application of a particular event.
       
    59 	
       
    60 	@param 	aEvent
       
    61 	 		Event the component wants to notify the application about.
       
    62 	@param 	aData1
       
    63 	 		The first integer event-specific parameter.
       
    64 	@param 	aData2
       
    65 	 		The second integer event-specific parameter.
       
    66 	@param 	aExtraInfo
       
    67 			A pointer to additional event-specific data the component wants to send to the application.
       
    68 			The component owns the memory.
       
    69 	@return	
       
    70 			KErrNone, if successful; otherwise one of the other system-wide error codes. 
       
    71 	*/
       
    72 	virtual TInt EventHandler(OMX_EVENTTYPE aEvent, TUint32 aData1, TUint32 aData2, TAny* aExtraInfo) = 0;
       
    73 	};
       
    74 
       
    75 #endif // MOMXILCOMPONENTIFOBSERVER_H
       
    76