MMTPStorageMgr Class Reference
Defines the MTP data provider framework storage manager interface. The storage manager controls the allocation of physical and logical MTP StorageIDs, and their mapping to storage media, such as Symbian OS file system drives.
MTP StorageIDs are represented as unsigned 32-bit integers and are subdivided into two 16-bit fields. The most significant 16-bits represents the physical StorageID and the least significant 16-bits represents the StorageID of a logical partition of that physical storage.
Public Member Functions
|
TUint32
|
AllocateLogicalStorageIdL
(
TUint
,
TDriveNumber
, const
CMTPStorageMetaData
&)
|
TUint32
|
AllocateLogicalStorageIdL
(
TUint
,
TUint32
, const
CMTPStorageMetaData
&)
|
TUint32
|
AllocatePhysicalStorageIdL
(
TUint
, const
CMTPStorageMetaData
&)
|
TInt
|
DeallocateLogicalStorageId
(
TUint
,
TUint32
)
|
void
|
DeallocateLogicalStorageIds
(
TUint
,
TUint32
)
|
TInt
|
DeallocatePhysicalStorageId
(
TUint
,
TUint32
)
|
TUint32
|
DefaultStorageId
()
|
TInt
|
DriveNumber
(
TUint32
)
|
TInt32
|
FrameworkStorageId
(
TDriveNumber
)
|
void
|
GetAvailableDrivesL
(
RArray
<
TDriveNumber
> &)
|
void
|
GetLogicalStoragesL
(const
TMTPStorageMgrQueryParams
&,
RPointerArray
< const
CMTPStorageMetaData
> &)
|
void
|
GetPhysicalStoragesL
(const
TMTPStorageMgrQueryParams
&,
RPointerArray
< const
CMTPStorageMetaData
> &)
|
TUint32
|
LogicalStorageId
(
TUint32
)
|
TInt32
|
LogicalStorageId
(const
TDesC
&)
|
TInt32
|
PhysicalStorageId
(
TDriveNumber
)
|
TUint32
|
PhysicalStorageId
(
TUint32
)
|
TUint32
|
StorageId
(
TUint32
,
TUint32
)
|
const
CMTPStorageMetaData
&
|
StorageL
(
TUint32
)
|
TBool
|
ValidStorageId
(
TUint32
)
|
CMTPTypeString
*
|
VolumeIdL
(
TUint
,
TUint32
, const
TDesC
&)
|
Member Functions Documentation
AllocateLogicalStorageIdL(TUint, TDriveNumber, const CMTPStorageMetaData &)
Creates a new logical MTP StorageID partition on the specified Symbian OS file system drive, to be owned and managed by the specified data provider. EStorageSystemType and EStorageSuid elements. The EStorageSystemType must match that of the corresponding physical MTP StorageID. If EStorageSystemType is specified as ESystemTypeDefaultFileSystem then EStorageSuid is validated as a fully formed file system folder path (e.g. "C:\Media") which must correspond to the specified file system drive.
-
leave
-
KErrAlreadyExists, if the storage SUID is already defined.
-
leave
-
KErrArgument if
EStorageSystemType is not ESystemTypeDefaultFileSystem, or if EStorageSuid is not a valid file system folder path, or does not match the specified drive.
-
leave
-
KErrNotFound if the specified drive does not exist.
-
leave
-
KErrPathNotFound, if
EStorageSystemType is ESystemTypeDefaultFileSystem and the path specified by EStorageSuid does not exist on the Symbian OS filesystem.
-
leave
-
One of the system wide error codes, if a processing failure occurs.
Parameters
TUint
aDataProviderId
|
The identifier of the data provider which will be responsible for the logical MTP StorageID.
|
TDriveNumber
aDriveNumber
|
The Symbian OS file system drive on which the logical MTP StorageID partition is to be created.
|
const
CMTPStorageMetaData
& aStorage
|
The storage meta-data. This must minimally specify the
|
AllocateLogicalStorageIdL(TUint, TUint32, const CMTPStorageMetaData &)
Creates a new logical MTP StorageID partition on the specified physical MTP StorageID, to be owned and managed by the specified data provider. EStorageSystemType and EStorageSuid elements. The EStorageSystemType must match that of the corresponding physical MTP StorageID. If EStorageSystemType is specified as ESystemTypeDefaultFileSystem then EStorageSuid is validated as a fully formed file system folder path (e.g. "C:\Media") which must correspond to the specified file system drive.
-
leave
-
KErrAlreadyExists, if the storage SUID is already defined.
-
leave
-
KErrArgument if
EStorageSystemType is not ESystemTypeDefaultFileSystem, or if EStorageSuid is not a valid file system folder path, or does not match the specified drive.
-
leave
-
KErrNotFound if the specified physical StorageID does not exist.
-
leave
-
KErrPathNotFound, if
EStorageSystemType is ESystemTypeDefaultFileSystem and the path specified by EStorageSuid does not exist on the Symbian OS filesystem.
-
leave
-
One of the system wide error codes, if a processing failure occurs.
Parameters
TUint
aDataProviderId
|
The identifier of the data provider which will be responsible for the logical MTP StorageID.
|
TUint32
aPhysicalStorageId
|
The physical MTP StorageID on which the logical MTP StorageID partition is to be created.
|
const
CMTPStorageMetaData
& aStorage
|
The storage meta-data. This must minimally specify the
|
AllocatePhysicalStorageIdL(TUint, const CMTPStorageMetaData &)
Creates a new physical MTP StorageID to be owned and managed by the specified data provider.
-
leave
-
KErrAlreadyExists, if the storage SUID is already defined.
-
leave
-
One of the system wide error codes, if a processing failure occurs.
Parameters
TUint
aDataProviderId
|
The identifier of the data provider which will be responsible for the physical MTP StorageID.
|
const
CMTPStorageMetaData
& aStorage
|
The storage meta-data.
|
DeallocateLogicalStorageId(TUint, TUint32)
TInt
|
DeallocateLogicalStorageId
|
(
|
TUint
|
aDataProviderId,
|
|
TUint32
|
aLogicalStorageId
|
|
)
|
[pure virtual]
|
Releases the specified fully formed logical MTP StorageID.
Parameters
TUint
aDataProviderId
|
The identifier of the data provider which is responsible for the logical MTP StorageID.
|
TUint32
aLogicalStorageId
|
The fully formed logical MTP StorageID to be deallocated.
|
DeallocateLogicalStorageIds(TUint, TUint32)
void
|
DeallocateLogicalStorageIds
|
(
|
TUint
|
aDataProviderId,
|
|
TUint32
|
aPhysicalStorageId
|
|
)
|
[pure virtual]
|
Releases all logical MTP StorageIDs which represent partitions of the specified physical MTP StorageID and which are owned by the specified data provider.
Parameters
TUint
aDataProviderId
|
The identifier of the data provider which is responsible for the logical MTP StorageIDs.
|
TUint32
aPhysicalStorageId
|
The physical MTP StorageID.
|
DeallocatePhysicalStorageId(TUint, TUint32)
TInt
|
DeallocatePhysicalStorageId
|
(
|
TUint
|
aDataProviderId,
|
|
TUint32
|
aPhysicalStorageId
|
|
)
|
[pure virtual]
|
Releases the specified physical MTP StorageID, along with all associated logical storage partititions.
Parameters
TUint
aDataProviderId
|
The identifier of the data provider which is responsible for the physical MTP StorageID.
|
TUint32
aPhysicalStorageId
|
The physical MTP StorageID to be released.
|
DefaultStorageId()
TUint32
|
DefaultStorageId
|
(
|
)
|
const [pure virtual]
|
Provides the default MTP StorageID, as determined by the value of the MTPFrameworkConfig::EDefaultStorageDrive framework configurability parameter. This may either be a physical or fully formed logical MTP StorageID, depending on the value of the MTPFrameworkConfig::ELogicalStorageIdsAllocationEnable framework configurability parameter.
DriveNumber(TUint32)
TInt
|
DriveNumber
|
(
|
TUint32
|
aStorageId
|
)
|
const [pure virtual]
|
Provides the Symbian OS drive number associated with the specified MTP StorageID.
Parameters
TUint32
aStorageId
|
The physical or fully formed logical MTP StorageID.
|
FrameworkStorageId(TDriveNumber)
Provides the fully formed MTP StorageID created by the MTP data provider framework on the specified Symbian OS drive. If the MTPFrameworkConfig::ELogicalStorageIdsAllocationEnable framework configurability parameter is set, then an MTP StorageID is created on each of the available Symbian OS file system drives as they become available. If not set then the creation of all logical MTP StorageIDs is deferred to the active data providers.
Parameters
TDriveNumber
aDriveNumber
|
The drive number for which the corresponding logical MTP StorageID is required.
|
GetAvailableDrivesL(RArray< TDriveNumber > &)
Provides an ordered list of the Symbian OS file system drives which are available for use as MTP storages. This comprises the sub-set of available Symbian OS file system drives which are left exposed by the the MTPFrameworkConfig::EExcludedStorageDrives framework configurability parameter.
-
leave
-
One of the system wide error codes, if a processing failure occurs.
Parameters
RArray
<
TDriveNumber
> & aDrives
|
On succesful completion, the list of available Symbian OS file system drives.
|
GetLogicalStoragesL(const TMTPStorageMgrQueryParams &, RPointerArray< const CMTPStorageMetaData > &)
Provides an ordered list of the storage meta-data for all available logical MTP StorageIDs which match the specified query criteria.
-
leave
-
One of the system wide error codes, if a processing failure occurs.
GetPhysicalStoragesL(const TMTPStorageMgrQueryParams &, RPointerArray< const CMTPStorageMetaData > &)
Provides an ordered list of the storage meta-data for all available physical MTP StorageIDs which match the specified query criteria.
-
leave
-
One of the system wide error codes, if a processing failure occurs.
LogicalStorageId(TUint32)
Provides the logical StorageID component (i.e. the least significant 16-bits) of the specified 32-bit MTP StorageID.
Parameters
TUint32
aStorageId
|
The MTP StorageID.
|
LogicalStorageId(const TDesC &)
TInt32
|
LogicalStorageId
|
(
|
const
TDesC
&
|
aStorageSuid
|
)
|
const [pure virtual]
|
Provides the the fully formed 32-bit logical StorageID associated with the specified storage System Unique IDentifier (SUID).
Parameters
const
TDesC
& aStorageSuid
|
|
PhysicalStorageId(TDriveNumber)
Provides the physical MTP StorageID associated with the specified Symbian OS drive number.
PhysicalStorageId(TUint32)
Provides the physical StorageID component (i.e. the most significant 16-bits) of the specified 32-bit MTP StorageID.
Parameters
TUint32
aStorageId
|
The MTP StorageID.
|
StorageId(TUint32, TUint32)
Constructs a fully formed 32-bit MTP StorageID from the specified physical and logical MTP StorageIDs.
Parameters
TUint32
aPhysicalStorageId
|
The physical MTP StorageID. The least significant 16-bits are ignored.
|
TUint32
aLogicalStorageId
|
The logical MTP StorageID. The most significant 16-bits are ignored.
|
StorageL(TUint32)
Provides 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.
|
ValidStorageId(TUint32)
TBool
|
ValidStorageId
|
(
|
TUint32
|
aStorageId
|
)
|
const [pure virtual]
|
Indicates if the specified StorageID is defined.
Parameters
TUint32
aStorageId
|
The physical or fully formed logical MTP StorageID.
|
VolumeIdL(TUint, TUint32, const TDesC &)
Generates an MTP volume identifier string of which the leading 128 characters are guaranteed to be unique amongst all storages presented to a conected MTP initiator.
-
leave
-
KErrAccessDenied if the specified data provider is not the owner of the specified StorageID.
-
leave
-
KErrNotFound if the specified MTP StorageID does not exist.
-
leave
-
One of the system wide error codes, if a processing failure occurs.
Parameters
TUint
aDataProviderId
|
The identifier of the data provider.
|
TUint32
aStorageId
|
The MTP StorageID associated with the volume identifier.
|
const
TDesC
& aVolumeIdSuffix
|
The data provider supplied volume identifier string.
|
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.