1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kernel/eka/include/drivers/emmcptn.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,86 @@
1.4 +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Partition Management Abstract class for Embedded MMC devices
1.18 +//
1.19 +//
1.20 +
1.21 +/**
1.22 + @file
1.23 + @publishedPartner
1.24 + @released
1.25 +*/
1.26 +
1.27 +#ifndef __EMMCPTN_H__
1.28 +#define __EMMCPTN_H__
1.29 +
1.30 +#include <drivers/mmc.h>
1.31 +#include <drivers/locmedia.h>
1.32 +#include <drivers/pbusmedia.h>
1.33 +
1.34 +class DEMMCPartitionInfo : public DBase
1.35 +/**
1.36 + * Base Abstract class for classes that define a partitioning scheme for Embedded MMC devices
1.37 + *
1.38 + * @publishedPartner
1.39 + * @released
1.40 + */
1.41 + {
1.42 +public:
1.43 + /**
1.44 + * Initialise the Partition Object.
1.45 + *
1.46 + * Called as part of the creation process for the MMC Media driver.
1.47 + *
1.48 + * Initialisation can include activities such as Memory structure allocation and
1.49 + * creation of any required driver session/handles.
1.50 + *
1.51 + * @param aDriver Owning DMediaDriver class
1.52 + * @return KErrNone if successful, standard error code otherwise.
1.53 + */
1.54 + virtual TInt Initialise(DMediaDriver* aDriver) =0;
1.55 +
1.56 + /**
1.57 + * Read the partition information for the media.
1.58 + *
1.59 + * Called as a child function of the PartitionInfo() method.
1.60 + *
1.61 + * @see DMmcMediaDriverFlash::PartitionInfo()
1.62 + *
1.63 + * @param anInfo An object that, on successful return, contains the partition information.
1.64 + * @return KErrNone if successful, standard error code otherwise.
1.65 + */
1.66 + virtual TInt PartitionInfo(TPartitionInfo& anInfo, const TMMCCallBack& aCallBack) =0;
1.67 +
1.68 + /**
1.69 + * Returns partition specific drive capability attributes.
1.70 + *
1.71 + * Called as a child function of the Caps() method.
1.72 + *
1.73 + * @see DMmcMediaDriverFlash::Caps()
1.74 + *
1.75 + * @param aDrive Local drive to be queried.
1.76 + * @param aInfo Media drive capability object to be populated.
1.77 + * @return KErrNone if successful, standard error code otherwise.
1.78 + */
1.79 + virtual TInt PartitionCaps(TLocDrv& aDrive, TDes8& aInfo) =0;
1.80 + };
1.81 +
1.82 +/**
1.83 + * Factory Method that returns an instance of a DEMMCPartitionInfo class.
1.84 + *
1.85 + * @return Newly created DEMMCPartitionInfo object.
1.86 + */
1.87 +IMPORT_C DEMMCPartitionInfo* CreateEmmcPartitionInfo();
1.88 +
1.89 +#endif