CMTPStorageMgr Class Reference
class CMTPStorageMgr : public CBase |
Implements the MTP storage manager interface.
Public Member Functions |
---|
| ~CMTPStorageMgr() |
IMPORT_C TUint32 | AllocateLogicalStorageIdL(TUint, TDriveNumber, const CMTPStorageMetaData &) |
IMPORT_C TUint32 | AllocateLogicalStorageIdL(TUint, TUint32, const CMTPStorageMetaData &) |
IMPORT_C TUint32 | AllocatePhysicalStorageIdL(TUint, const CMTPStorageMetaData &) |
IMPORT_C TInt | DeallocateLogicalStorageId(TUint, TUint32) |
IMPORT_C void | DeallocateLogicalStorageIds(TUint, TUint32) |
IMPORT_C TInt | DeallocatePhysicalStorageId(TUint, TUint32) |
IMPORT_C TUint32 | DefaultStorageId() |
IMPORT_C TInt | DriveNumber(TUint32) |
IMPORT_C TInt32 | FrameworkStorageId(TDriveNumber) |
IMPORT_C void | GetAvailableDrivesL(RArray< TDriveNumber > &) |
IMPORT_C void | GetLogicalStoragesL(const TMTPStorageMgrQueryParams &, RPointerArray< const CMTPStorageMetaData > &) |
IMPORT_C void | GetPhysicalStoragesL(const TMTPStorageMgrQueryParams &, RPointerArray< const CMTPStorageMetaData > &) |
IMPORT_C TBool | IsReadWriteStorage(TUint32) |
IMPORT_C TUint32 | LogicalStorageId(TUint32) |
IMPORT_C TInt32 | LogicalStorageId(const TDesC &) |
IMPORT_C TUint | LogicalStorageNumber(TUint32) |
IMPORT_C TUint | LogicalStorageOwner(TUint32) |
IMPORT_C CMTPStorageMgr * | NewL() |
IMPORT_C TInt32 | PhysicalStorageId(TDriveNumber) |
IMPORT_C TUint32 | PhysicalStorageId(TUint32) |
IMPORT_C TUint | PhysicalStorageNumber(TUint32) |
IMPORT_C TUint | PhysicalStorageOwner(TUint32) |
IMPORT_C void | SetDefaultStorageId(TUint32) |
IMPORT_C void | SetDriveMappingL(TDriveNumber, TUint32) |
IMPORT_C void | SetFrameworkId(TUint) |
IMPORT_C TUint32 | StorageId(TUint32, TUint32) |
IMPORT_C const CMTPStorageMetaData & | StorageL(TUint32) |
IMPORT_C TBool | ValidStorageId(TUint32) |
IMPORT_C CMTPTypeString * | VolumeIdL(TUint, TUint32, const TDesC &) |
Constructor & Destructor Documentation
CMTPStorageMgr()
CMTPStorageMgr | ( | ) | [private] |
~CMTPStorageMgr()
IMPORT_C | ~CMTPStorageMgr | ( | ) | |
Member Functions Documentation
AllocateLogicalStorageId(TUint, TUint32)
TInt32
| AllocateLogicalStorageId | ( | TUint | aDataProviderId, |
| TUint32 | aPhysicalStorageId |
| ) | [private] |
Allocates a new 32-bit logical StorageId for the storage owner as a partition of the specified physical MTP StorageID.
Parameters
TUint aDataProviderId | The storage owner data provider identifier. |
TUint32 aPhysicalStorageId | The physical MTP StorageID. |
AllocateLogicalStorageIdL(TUint, TDriveNumber, const CMTPStorageMetaData &)
AllocateLogicalStorageIdL(TUint, TUint32, const CMTPStorageMetaData &)
AllocatePhysicalStorageId(TUint)
TInt32
| AllocatePhysicalStorageId | ( | TUint | aDataProviderId | ) | [private] |
Allocates a new 32-bit physical StorageId for the storage owner.
Parameters
TUint aDataProviderId | The storage owner data provider identifier. |
AllocatePhysicalStorageIdL(TUint, const CMTPStorageMetaData &)
ConstructL()
void | ConstructL | ( | ) | [private] |
Second phase constructor.
- leave
- One of the system wide error code, if a processing failure occurs.
DeallocateLogicalStorageId(TUint, TUint32)
IMPORT_C TInt | DeallocateLogicalStorageId | ( | TUint | aDataProviderId, |
| TUint32 | aLogicalStorageId |
| ) | |
DeallocateLogicalStorageIds(TUint, TUint32)
IMPORT_C void | DeallocateLogicalStorageIds | ( | TUint | aDataProviderId, |
| TUint32 | aPhysicalStorageId |
| ) | |
DeallocatePhysicalStorageId(TUint, TUint32)
IMPORT_C TInt | DeallocatePhysicalStorageId | ( | TUint | aDataProviderId, |
| TUint32 | aPhysicalStorageId |
| ) | |
DefaultStorageId()
IMPORT_C TUint32 | DefaultStorageId | ( | ) | const |
EncodeLogicalStorageId(TUint32, TUint, TUint)
Encodes the specified physical MTP StorageID, data provider identifier, and storage number as a fully formed MTP StorageID.
Parameters
TUint32 aPhysicalStorageId | The physical MTP StorageID. |
TUint aDataProviderId | The data provider identifier. |
TUint aStorageNumber | The storage number. |
EncodeLogicalStorageNumber(TUint)
TUint32
| EncodeLogicalStorageNumber | ( | TUint | aStorageNumber | ) | [private] |
Encodes the storage identifier as the logical storage number in a fully formed MTP StorageID.
Parameters
TUint aStorageNumber | The storage number. |
EncodeLogicalStorageOwner(TUint)
TUint32
| EncodeLogicalStorageOwner | ( | TUint | aDataProviderId | ) | [private] |
Encodes the specified data provider identifier as the logical storage owner in a fully formed MTP StorageID.
Parameters
TUint aDataProviderId | The data provider identifier. |
EncodePhysicalStorageId(TUint, TUint)
Encodes the specified data provider identifier and storage number as an physical MTP StorageID.
Parameters
TUint aDataProviderId | The data provider identifier. |
TUint aStorageNumber | The storage number. |
EncodePhysicalStorageNumber(TUint)
TUint32
| EncodePhysicalStorageNumber | ( | TUint | aStorageNumber | ) | [private] |
Encodes the storage identifier as the physical storage number in a fully formed MTP StorageID.
Parameters
TUint aStorageNumber | The storage number. |
EncodePhysicalStorageOwner(TUint)
TUint32
| EncodePhysicalStorageOwner | ( | TUint | aDataProviderId | ) | [private] |
Encodes the specified data provider identifier as the physical storage owner in a fully formed MTP StorageID.
Parameters
TUint aDataProviderId | The data provider identifier. |
FrameworkStorageId(TDriveNumber)
GetAvailableDrivesL(RArray< TDriveNumber > &)
GetLogicalStoragesL(const TMTPStorageMgrQueryParams &, RPointerArray< const CMTPStorageMetaData > &)
GetPhysicalStoragesL(const TMTPStorageMgrQueryParams &, RPointerArray< const CMTPStorageMetaData > &)
IsReadWriteStorage(TUint32)
LogicalStorageId(TUint32)
LogicalStorageId(const TDesC &)
IMPORT_C TInt32 | LogicalStorageId | ( | const TDesC & | aStorageSuid | ) | const |
Parameters
const TDesC & aStorageSuid | |
LogicalStorageNumber(TUint32)
IMPORT_C TUint | LogicalStorageNumber | ( | TUint32 | aStorageId | ) | [static] |
Extracts the storage number of the logical storage ID encoded in the specified StorageID.
LogicalStorageOwner(TUint32)
IMPORT_C TUint | LogicalStorageOwner | ( | TUint32 | aStorageId | ) | [static] |
Extracts the ID of the data provider responsible for the logical storage ID encoded in the specified StorageID.
NewL()
MTP data provider framework storage manager factory method.
- leave
- One of the system wide error codes, if a processing failure occurs.
PhysicalStorageId(TDriveNumber)
PhysicalStorageId(TUint32)
PhysicalStorageNumber(TUint32)
IMPORT_C TUint | PhysicalStorageNumber | ( | TUint32 | aStorageId | ) | [static] |
Extracts the storage number of the physical storage ID encoded in the specified StorageID.
PhysicalStorageOwner(TUint32)
IMPORT_C TUint | PhysicalStorageOwner | ( | TUint32 | aStorageId | ) | [static] |
Extracts the ID of the data provider responsible for the physical storage ID encoded in the specified StorageID.
RemoveLogicalStorageL(TUint)
void | RemoveLogicalStorageL | ( | TUint | aIdx | ) | [private] |
Removes the logical storages table entry at the specified index.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
TUint aIdx | The storages table index. |
SetDefaultStorageId(TUint32)
IMPORT_C void | SetDefaultStorageId | ( | TUint32 | aStorageId | ) | |
Sets the default MTP StorageID. This should be set once at start up and not subsequently changed.
- panic
- USER 0, in debug builds only, if the default StorageID is set more than once.
Parameters
TUint32 aStorageId | The system default MTP StorageID. |
SetDriveMappingL(TDriveNumber, TUint32)
Creates a mapping between the specified Symbian OS drive number and MTP StorageID.
- leave
- One of the sysem wide error codes, if a processing failure occurs.
SetFrameworkId(TUint)
IMPORT_C void | SetFrameworkId | ( | TUint | aDataProviderId | ) | |
Sets the framework storages owner identifier. This should be set once at start up and not subsequently changed.
- panic
- USER 0, in debug builds only, if the framework storages owner identifier is set more than once.
Parameters
TUint aDataProviderId | The framework storages owner identifier. |
StorageId(TUint32, TUint32)
StorageKeyMatchSuid(const TDesC *, const CMTPStorageMetaData &)
StorageMetaDataL(TUint32)
Provides a non-const reference to the storage meta-data for the specified logical MTP StorageID.
- leave
- KErrNotFound if the specified StorageID does not exist.
- leave
- One of the system wide error codes, if a processing failure occurs.
Parameters
TUint32 aStorageId | The physical or fully formed logical MTP StorageID. |
StorageOrder(const CMTPStorageMetaData &, const CMTPStorageMetaData &)
StorageOrder(const TUint32 *, const CMTPStorageMetaData &)
VolumeIdL(TUint, TUint32, const TDesC &)
Member Data Documentation
__FLOG_DECLARATION_MEMBER_MUTABLE
| __FLOG_DECLARATION_MEMBER_MUTABLE | [private] |
FLOGGER debug trace member variable.
TUint32
iDefaultStorageId
The default MTP storage ID.
TInt
iFrameworkId
TInt
| iFrameworkId | [private] |
The framework storages (drives) owning data provider ID.
TFixedArray< TInt, KMaxDrives > iMapDriveToStorage
The Symbian OS drive number to default MTP StorageID mapping table. This StorageID may either be the physical MTP StorageID or the default logical MTP StorageID.
RArray< TUint > iPhysicalStorageNumbers
The physical storage numbers allocation table. Indexed by physical storage owner data provider ID.
RMTPFramework
iSingletons
The framework singletons.
RPointerArray< CMTPStorageMetaData > iStorages
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.