kernel/eka/include/drivers/emmcptn.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 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 the License "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 // Partition Management Abstract class for Embedded MMC devices
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @publishedPartner
       
    21  @released
       
    22 */
       
    23 
       
    24 #ifndef __EMMCPTN_H__
       
    25 #define __EMMCPTN_H__
       
    26 
       
    27 #include <drivers/mmc.h>
       
    28 #include <drivers/locmedia.h>
       
    29 #include <drivers/pbusmedia.h>
       
    30 
       
    31 class DEMMCPartitionInfo : public DBase
       
    32 /**
       
    33  *  Base Abstract class for classes that define a partitioning scheme for Embedded MMC devices
       
    34  * 
       
    35  * 	@publishedPartner
       
    36  *  @released
       
    37  */
       
    38 	{
       
    39 public:
       
    40 	/**
       
    41 	 * Initialise the Partition Object.
       
    42 	 * 
       
    43 	 * Called as part of the creation process for the MMC Media driver.
       
    44 	 * 
       
    45 	 * Initialisation can include activities such as Memory structure allocation and
       
    46 	 * creation of any required driver session/handles. 
       
    47 	 * 
       
    48 	 * @param aDriver Owning DMediaDriver class
       
    49 	 * @return KErrNone if successful, standard error code otherwise.
       
    50 	 */
       
    51 	virtual TInt Initialise(DMediaDriver* aDriver) =0;
       
    52 	
       
    53 	/**
       
    54 	 * Read the partition information for the media.
       
    55 	 * 
       
    56 	 * Called as a child function of the PartitionInfo() method.
       
    57 	 * 
       
    58 	 * @see DMmcMediaDriverFlash::PartitionInfo() 
       
    59 	 * 
       
    60 	 * @param anInfo An object that, on successful return, contains the partition information.
       
    61 	 * @return KErrNone if successful, standard error code otherwise.
       
    62 	 */
       
    63 	virtual TInt PartitionInfo(TPartitionInfo& anInfo, const TMMCCallBack& aCallBack) =0;
       
    64 	
       
    65 	/**
       
    66 	 * Returns partition specific drive capability attributes.
       
    67 	 * 
       
    68 	 * Called as a child function of the Caps() method.
       
    69 	 * 
       
    70 	 * @see DMmcMediaDriverFlash::Caps()
       
    71 	 * 
       
    72 	 * @param aDrive Local drive to be queried. 
       
    73 	 * @param aInfo Media drive capability object to be populated.
       
    74 	 * @return KErrNone if successful, standard error code otherwise. 
       
    75 	 */
       
    76 	virtual TInt PartitionCaps(TLocDrv& aDrive, TDes8& aInfo) =0;
       
    77 	};
       
    78 
       
    79 /**
       
    80  * Factory Method that returns an instance of a DEMMCPartitionInfo class.
       
    81  * 
       
    82  * @return Newly created DEMMCPartitionInfo object.
       
    83  */
       
    84 IMPORT_C DEMMCPartitionInfo* CreateEmmcPartitionInfo();
       
    85 
       
    86 #endif