CRsfwMountMan Class Reference

class CRsfwMountMan : public CBase

Class for managing mounts to remote file repositories

mountman.dll
Since
Series 60 3.1

Inherits from

Constructor & Destructor Documentation

CRsfwMountMan()

CRsfwMountMan ( ) [private]

C++ default constructor

~CRsfwMountMan()

IMPORT_C ~CRsfwMountMan ( ) [virtual]

Destructor.

Member Functions Documentation

AddMountEntryL(CRsfwMountEntry *)

IMPORT_C void AddMountEntryL ( CRsfwMountEntry * aMountEntry )

Adds a mount configuration entry in the configurations and mounts the drive in the File Server. If the drive letter item is not set in the configuration, a free letter will be allocated. Then the EMountEntryItemDrive value in aMountEntry will be changed. The EMountEntryItemIndex item of aMountEntry is used for positioning the entry in a specific order in the configuration database (the index itself is not stored)

leave
KErrInUse selected drive letter already in used
leave
KErrInUse selected name is in use
leave
KErrInUse 9 remote drives already define (Number of remote drives is limited by default to 9 so that drive letters are also available for other technologies)
leave
KErrAccessDenied program does not have sufficient capabilities required capabilities are DiskAdmin (to mount new remote drive in File Server) and WriteDeviceData (to add new remote drive to Central Repository)
leave
KErrNotFound File System plug-in, Central Repository table etc. not found

Parameters

CRsfwMountEntry * aMountEntry mount configuration entry the ownership of the pointer is transferred to CRsfwMountMan

CancelRemoteTransfer(const TDesC &)

IMPORT_C TInt CancelRemoteTransfer ( const TDesC & aFile )

Cancels an active remote file upload or download

Parameters

const TDesC & aFile file name

ConstructL(TUint, MRsfwMountManObserver *)

void ConstructL ( TUint aDefaultFlags,
MRsfwMountManObserver * aMountManObserver
) [private]

Second phase constructor

Parameters

TUint aDefaultFlags
MRsfwMountManObserver * aMountManObserver

DeleteMountEntryL(const TDesC &)

IMPORT_C void DeleteMountEntryL ( const TDesC & aName )

Deletes a mount entry from the configurations and unmounts the drive. Nothing is done if the entry does not exist.

Parameters

const TDesC & aName name

DeleteMountEntryL(TChar)

IMPORT_C void DeleteMountEntryL ( TChar aDriveLetter )

Deletes a mount entry from the configurations and unmounts the drive. Nothing is done if the entry does not exist.

Parameters

TChar aDriveLetter drive letter

EditMountEntryL(CRsfwMountEntry *)

IMPORT_C void EditMountEntryL ( CRsfwMountEntry * aMountEntry )

Changes a mount configuration entry in the configurations

leave
KErrInUse if the name of the mount is used by other mount
leave
KErrAccessDenied program does not have sufficient capabilities required capabilities are DiskAdmin (to mount new remote drive in File Server) and WriteDeviceData (to add new remote drive to Central Repository)
leave
KErrNotFound if mount with given letter not found or File System plug-in, Central Repository table etc. not found

Parameters

CRsfwMountEntry * aMountEntry mount configuration entry the ownership of the pointer is transferred to CRsfwMountMan

GetAllDrivesL(TDriveList &)

IMPORT_C TInt GetAllDrivesL ( TDriveList & aDriveList ) const

Gets a list of all drives as seen by the File Server

Returns drive letters. Letters for local drives are in the front of the list Letters for remote drives in order defined in CenRep The number of the drives is the same as the length of the list

Parameters

TDriveList & aDriveList returned drive list

GetMountInfo(TChar, TRsfwMountInfo &)

IMPORT_C TInt GetMountInfo ( TChar aDriveLetter,
TRsfwMountInfo & aMountInfo
) const

Gets mount information for an active remote drive.

The information consists of static configuration information and status information (such as strongly or weakly connected). Note that if the drive is not atctive this function will return -1, you need to use MountEntryL to get just the static configuration information

Parameters

TChar aDriveLetter drive letter of the mount
TRsfwMountInfo & aMountInfo returned information

GetMountNamesL(CDesC16Array *)

IMPORT_C void GetMountNamesL ( CDesC16Array * aNames ) const

Returns a list of friendly names of all mount configurations in the mount configuration repository. The entries are returned in the order that they appear in the repository.

Parameters

CDesC16Array * aNames friendly names

GetRemoteMountListL(TDriveList &)

IMPORT_C TInt GetRemoteMountListL ( TDriveList & aDriveList ) const

Gets a list of all remote drives as seen by the File Server

The list contains the letters of the remote drives. Letters for remote drives in order defined in CenRep The number of the drives is the same as the length of the list

Parameters

TDriveList & aDriveList returned drive list

IsAppOnBlackList(TUid)

IMPORT_C TBool IsAppOnBlackList ( TUid aUid ) const

Some applications have problems with handling remote files. Function checks whether app with given UID is one of them.

Parameters

TUid aUid UID of the application

MountEntryL(const TDesC &)

IMPORT_C const CRsfwMountEntry * MountEntryL ( const TDesC & aName ) const

Gets the mount configuration entry having the given friendly name. The caller must make sure that the name is unique.

Parameters

const TDesC & aName

MountEntryL(TChar)

IMPORT_C const CRsfwMountEntry * MountEntryL ( TChar aDriveLetter ) const

Gets the mount configuration entry for the given drive letter.

Parameters

TChar aDriveLetter drive letter

NewL(TUint, MRsfwMountManObserver *)

IMPORT_C CRsfwMountMan * NewL ( TUint aDefaultFlags,
MRsfwMountManObserver * aMountManObserver
) [static]

Two-phased constructor.

Parameters

TUint aDefaultFlags must be set to KMountFlagInteractive if the user is to be prompted during the mount procedure. Otherwise the parameter can be set to zero.
MRsfwMountManObserver * aMountManObserver

RefreshDirectory(const TDesC &)

IMPORT_C TInt RefreshDirectory ( const TDesC & aPath )

Refresh a remote directory

Ensures that contents of a remote directory are up to date. Synchronous variant deletes the currently cached version. Note that this function intentionally does not return directory contents. All data should be read through the File Server instead.

Parameters

const TDesC & aPath

SetMountConnectionState(TChar, TUint)

IMPORT_C TInt SetMountConnectionState ( TChar aDriveLetter,
TUint aConnectionState
)

Sets the connection state of a mount for an active remote drive

Parameters

TChar aDriveLetter drive letter of the mount
TUint aConnectionState The following connection states have been defined: KMountStronglyConnected = strongly connected state KMountWeaklyConnected = weakly connected state KMountNotConnected = disconnected state

SetMountConnectionStateBlind(TChar, TUint)

IMPORT_C TInt SetMountConnectionStateBlind ( TChar aDriveLetter,
TUint aConnectionState
)

Sets the connection state of a mount for an active remote drive sends a bling request, does not wait for reply

Parameters

TChar aDriveLetter drive letter of the mount
TUint aConnectionState The following connection states have been defined: KMountStronglyConnected = strongly connected state KMountWeaklyConnected = weakly connected state KMountNotConnected = disconnected state

Member Data Documentation

CRsfwMountManImpl * iMountManImpl

CRsfwMountManImpl * iMountManImpl [private]