ImageEditorUtils Class Reference
Static utility class
?good_class_usage_example(s)
ImageEditorUtils.lib
- Since
- S60 v5.0
Public Member Functions |
---|
IMPORT_C void | AddImageFileToAlbumL(const TDesC &, TInt) |
IMPORT_C TInt | CopyFile(RFs &, const TDesC &, const TDesC &, TBool) |
IMPORT_C void | FindAlbumsForImageFileL(RArray< TInt > &, const TDesC &) |
IMPORT_C TInt | GenerateFilePathL(RFs &, const TDesC &, TDes &, ImageEditorUtils::TMemorySelection) |
IMPORT_C TInt | GenerateNewDocumentNameL(RFs &, const TDesC &, TDes &, RArray< TInt > *, const CDesCArray *, ImageEditorUtils::TMemorySelection) |
IMPORT_C TInt | GenerateNewFileNameL(RFs &, const TDesC &, TDes &, TFileName, const CDesCArray *) |
IMPORT_C void | GetMakeAndModelL(TDes8 &, TDes8 &) |
IMPORT_C TBool | ImageFitsToDriveL(RFs &, const TDesC &, const TDesC &) |
IMPORT_C TBool | ImagesFitToDriveL(RFs &, const CDesCArray &, const CDesCArray &) |
IMPORT_C void | NotifyNewMediaDocumentL(RFs &, const TDesC &) |
IMPORT_C void | NotifyNewMediaDocumentL(RFs &, const MDesCArray &) |
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.
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] |
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
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.
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.
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.
Parameters
const TDesC & aName | image name without extension |
GenerateFilePathL(RFs &, const TDesC &, TDes &, ImageEditorUtils::TMemorySelection)
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.
GenerateNewDocumentNameL(RFs &, const TDesC &, TDes &, RArray< TInt > *, const CDesCArray *, ImageEditorUtils::TMemorySelection)
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.
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 *)
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.
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.
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.
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 &)
Checks whether there is enough disk space to save the given list of files.
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.
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.
Parameters
RFs & aFsSession | file server session handle |
const MDesCArray & aFileNameArray | new file names |
Member Enumerations Documentation
Enum TMemorySelection
Memory location selection options
Enumerators
ESelectAutomatic | |
ESelectPhone | |
ESelectMmc | |
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.