omxil/mmilapi/ilif/inc/milifobserver.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 MILIFOBSERVER_H
       
    23 #define MILIFOBSERVER_H
       
    24 
       
    25 #include <e32base.h>
       
    26 #include "ilifbase.h"
       
    27 
       
    28 class CMMFBuffer;
       
    29 class MILComponentIf;
       
    30 
       
    31 /**
       
    32 IL Component observer class
       
    33 */
       
    34 class MILIfObserver
       
    35 	{
       
    36 public:
       
    37 	/**
       
    38 	Callback function to send an event/message to the component observer, i.e. the IL client.
       
    39 	
       
    40 	@param  aComponent
       
    41 	        The IL Component which sent the callback.
       
    42 	@param  aEvent
       
    43 			A reference to the structure that contains the event data.
       
    44 			Any implementation of this function should be able to handle expected and unexpected events.
       
    45 	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
       
    46 	        another of the system-wide error codes.
       
    47 	@see TILEvent
       
    48 	*/
       
    49 	virtual TInt MsgFromILComponent(const MILComponentIf* aComponent, const TILEvent& aEvent) = 0; 
       
    50 
       
    51 	/**
       
    52 	Callback function to return to the component port observer the buffer that has been delivered.
       
    53 	The observer is usually the IL client or another port.
       
    54 
       
    55 	Note that for some implementations this is essentially equivalent to EmptyBufferDone() from input 
       
    56 	ports and FillBufferDone() from output ports.
       
    57 
       
    58 	@param  aPort
       
    59 		  	The interface from the port which sent the callback.
       
    60 	@param  aBuffer
       
    61 			The buffer returned by the IL component.
       
    62 	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
       
    63 	        another of the system-wide error codes.
       
    64 	*/
       
    65 	virtual TInt BufferDelivered(const MILComponentPortIf* aPort, const CMMFBuffer* aBuffer) = 0;
       
    66 	};
       
    67 	
       
    68 #endif // MILIFOBSERVER_H