omxil/mmilapi/refomxil/inc/omxilgenericportilif.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 OMXILGENERICPORTILIF_H
       
    17 #define OMXILGENERICPORTILIF_H
       
    18 
       
    19 #include "milcomponentportif.h"
       
    20 #include "omxilgenericilif.h"
       
    21 
       
    22 	
       
    23 /**
       
    24 Concrete implementation of the MILComponentPortIf that encapsulates the 
       
    25 component's port specific behaviour according to OpenMAX specification.
       
    26 */
       
    27 class COmxILGenericPortILIF  :  public CBase,
       
    28                                 public MILComponentPortIf
       
    29 	{
       
    30 public:
       
    31 	static COmxILGenericPortILIF* NewL(COmxILGenericILIF& aParent, TPortDirection aPortDirection, TInt aIndex);
       
    32 
       
    33 	// MILComponentPortIf
       
    34 	TInt FillThisBuffer(CMMFBuffer& aBuffer);
       
    35 	TInt EmptyThisBuffer(const CMMFBuffer& aBuffer);
       
    36 	TInt TunnelRequest(MILComponentPortIf* aPort);
       
    37 	TInt PortIndex() const;
       
    38 	TPortDirection PortDirection() const;
       
    39 	CMMFBuffer* CreateBufferL(TInt aBufferSize);
       
    40 	TInt UseBuffer(CMMFBuffer& aBuffer);
       
    41 	TInt FreeBuffer(CMMFBuffer* aBuffer);
       
    42 	TInt FlushPort();
       
    43 	TInt EnablePort();
       
    44 	TInt DisablePort();
       
    45 	MILComponentIf* PortComponent() const; 
       
    46 	
       
    47 	void SetPortConnectedTo(COmxILGenericPortILIF* aPort);
       
    48 	
       
    49 private:
       
    50 	COmxILGenericPortILIF(COmxILGenericILIF& aParent, TPortDirection aPortDirection, TInt aIndex);
       
    51 	
       
    52 private:
       
    53 	TPortDirection iPortDirection;
       
    54 	TInt iPortIndex;	
       
    55 	COmxILGenericILIF& iPortComponent;
       
    56 	COmxILGenericPortILIF* iTunneledPort;
       
    57 	};
       
    58 
       
    59 #endif // OMXILGENERICPORTILIF_H