ImageEditorUtils Class Reference

class ImageEditorUtils

Static utility class

        ?good_class_usage_example(s)
       
ImageEditorUtils.lib
Since
S60 v5.0

Member Functions Documentation

AddImageFileToAlbumL(const TDesC &, TInt)

IMPORT_C void AddImageFileToAlbumL ( const TDesC & aFileName,
TInt aAlbumId
) [static]

Adds the given image file to the given album (e.g. video album). If compiled without album support, this function does nothing.

Since
S60 v5.0

Parameters

const TDesC & aFileName file name to be added to the album
TInt aAlbumId id of the album

CopyFile(RFs &, const TDesC &, const TDesC &, TBool)

IMPORT_C TInt CopyFile ( RFs & aFsSession,
const TDesC & aSourceFileName,
const TDesC & aDestinationFileName,
TBool aOverwrite = ETrue
) [static]

Copies file without opening it, using RFs::ReadFileSection . Synchronous.

Since
S60 v5.0

Parameters

RFs & aFsSession file server session handle
const TDesC & aSourceFileName source file name
const TDesC & aDestinationFileName destination file name
TBool aOverwrite = ETrue

DoCopyL(RFs &, const TDesC &, const TDesC &, TUint)

void DoCopyL ( RFs & aFsSession,
const TDesC & aSourceFileName,
const TDesC & aDestinationFileName,
TUint aSourceFileSize
) [private, static]

Internal implementation of CopyFile

Since
S60 v5.0

Parameters

RFs & aFsSession file server session handle
const TDesC & aSourceFileName source file
const TDesC & aDestinationFileName destination file
TUint aSourceFileSize source file size in bytes

FileAlreadyExistsL(RFs &, const TDesC &, const CDesCArray *)

TBool FileAlreadyExistsL ( RFs & aFsSession,
const TDesC & aFileName,
const CDesCArray * aReservedFileNames
) [private, static]

Checks if a file with the specified name already exists in the system.

Since
S60 v5.0

Parameters

RFs & aFsSession
const TDesC & aFileName file name to be checked
const CDesCArray * aReservedFileNames explicitly recerved file names

FindAlbumsForImageFileL(RArray< TInt > &, const TDesC &)

IMPORT_C void FindAlbumsForImageFileL ( RArray < TInt > & aAlbumIdList,
const TDesC & aFilename
) [static]

Finds out in which Media Gallery Album the file belongs to. If compiled without album support, this function returns an empty array. Reset() is called for the array at the begining.

Since
S60 v5.0

Parameters

RArray < TInt > & aAlbumIdList
const TDesC & aFilename

FindSuffix(const TDesC &)

TInt FindSuffix ( const TDesC & aName ) [private, static]

Finds the offset of the edited image suffix of form "-NNN", where NNN is the edit sequence number.

Since
S60 v5.0

Parameters

const TDesC & aName image name without extension

GenerateFilePathL(RFs &, const TDesC &, TDes &, ImageEditorUtils::TMemorySelection)

IMPORT_C TInt GenerateFilePathL ( RFs & aFsSession,
const TDesC & aSourceFileName,
TDes & aTargetFileName,
ImageEditorUtils::TMemorySelection aMemoryInUse
) [static]

GenerateFilePath

Generates a path for an image file. The memory selection option is given as a parameter. ImageEditorUtilsImageFitsToDriveL is used to check the space.

Media gallery album id list is no longer supported due to Media Gallery removal. If an invalid album list is passed the behaviour is undefined.

Since
S60 v5.0

Parameters

RFs & aFsSession file server session handle
const TDesC & aSourceFileName source file name
TDes & aTargetFileName target file name
ImageEditorUtils::TMemorySelection aMemoryInUse where the target file is created

GenerateNewDocumentNameL(RFs &, const TDesC &, TDes &, RArray< TInt > *, const CDesCArray *, ImageEditorUtils::TMemorySelection)

IMPORT_C TInt GenerateNewDocumentNameL ( RFs & aFsSession,
const TDesC & aSourceFileName,
TDes & aTargetFileName,
RArray < TInt > * aMgAlbumIdList = NULL,
const CDesCArray * aReservedFileNames = NULL,
ImageEditorUtils::TMemorySelection aMemoryInUse = ImageEditorUtils::ESelectAutomatic
) [static]

Generates a new name for the loaded document at the startup. If automatic memory selection is used, the generated file is located on the MMC dy default. If the MMC is full or not present, the file will be in phone memory. Optionally the file can be forced onto either drive. Internally, ImageFitsToDriveL is used to check the space.

Media gallery album id list is no longer supported due to Media Gallery removal. If an invalid album list is passed the behaviour is undefined.

Since
S60 v5.0

Parameters

RFs & aFsSession file server session handle
const TDesC & aSourceFileName source file name
TDes & aTargetFileName target file name
RArray < TInt > * aMgAlbumIdList = NULL list of the albums the source image belongs to
const CDesCArray * aReservedFileNames = NULL additional list of already reserved file names
ImageEditorUtils::TMemorySelection aMemoryInUse = ImageEditorUtils::ESelectAutomatic where the target file is created

GenerateNewFileNameL(RFs &, const TDesC &, TDes &, TFileName, const CDesCArray *)

IMPORT_C TInt GenerateNewFileNameL ( RFs & aFsSession,
const TDesC & aSourceFileName,
TDes & aTargetFileName,
TFileName aDrive,
const CDesCArray * aReservedFileNames = NULL
) [static]

Generates a new name for the loaded document in filename query. A unique filename is generated by adding running number after source filename until unique name is found. e.g. if image name is "Image", first attempt for new filename is "Image-001". If that is already in use, "Image-002" is tried and so on. First unused filename is then proposed for the user. ImageFitsToDriveL is used to check the space.

Since
S60 v5.0

Parameters

RFs & aFsSession file server session handle
const TDesC & aSourceFileName source file name
TDes & aTargetFileName target file name
TFileName aDrive the drive where the target file is to be created
const CDesCArray * aReservedFileNames = NULL additional list of already reserved file names

GetMakeAndModelL(TDes8 &, TDes8 &)

IMPORT_C void GetMakeAndModelL ( TDes8 & aMake,
TDes8 & aModel
) [static]

Helper function to get the manufacturer and model of the device. Uses Shared Data client to retrieve the information. If compiled on a public SDKs, which do not contain shared data, this returns empty descriptors.

Since
S60 v5.0

Parameters

TDes8 & aMake manufacturer of the device
TDes8 & aModel model of the device

ImageFitsToDriveL(RFs &, const TDesC &, const TDesC &)

IMPORT_C TBool ImageFitsToDriveL ( RFs & aFsSession,
const TDesC & aSourceFile,
const TDesC & aTargetPath
) [static]

Checks whether there is enough disk space to save the given file.

Since
S60 v5.0

Parameters

RFs & aFsSession file server session handle
const TDesC & aSourceFile the file that would be saved
const TDesC & aTargetPath the path to save (only drive part needed)

ImagesFitToDriveL(RFs &, const CDesCArray &, const CDesCArray &)

IMPORT_C TBool ImagesFitToDriveL ( RFs & aFsSession,
const CDesCArray & aSourceFileList,
const CDesCArray & aTargetFileList
) [static]

Checks whether there is enough disk space to save the given list of files.

Since
S60 v5.0

Parameters

RFs & aFsSession file server session handle
const CDesCArray & aSourceFileList the files that would be saved
const CDesCArray & aTargetFileList the paths to save (only drive part needed)

NotifyNewMediaDocumentL(RFs &, const TDesC &)

IMPORT_C void NotifyNewMediaDocumentL ( RFs & aFsSession,
const TDesC & aFileName
) [static]

Notifies the system that a new image has been saved, This is depreciated now and not used after MediaGallery removal.

Since
S60 v5.0

Parameters

RFs & aFsSession file server session handle
const TDesC & aFileName name of the new file

NotifyNewMediaDocumentL(RFs &, const MDesCArray &)

IMPORT_C void NotifyNewMediaDocumentL ( RFs & aFsSession,
const MDesCArray & aFileNameArray
) [static]

Notifies the system that new images have been saved, making them visible in the Media Gallery. This is depreciated now and not used after MediaGallery removal.

Since
S60 v5.0

Parameters

RFs & aFsSession file server session handle
const MDesCArray & aFileNameArray new file names

Member Enumerations Documentation

Enum TMemoryLocation

Memory location

Enumerators

EPhone
EMmc
EMixed

Enum TMemorySelection

Memory location selection options

Enumerators

ESelectAutomatic
ESelectPhone
ESelectMmc