16 */ |
16 */ |
17 #ifndef FMDEFINE_H |
17 #ifndef FMDEFINE_H |
18 #define FMDEFINE_H |
18 #define FMDEFINE_H |
19 |
19 |
20 // define for filemanager error |
20 // define for filemanager error |
21 #define FmErrNone 0 |
21 #define FmErrNone 0 // No Error |
22 #define FmErrNotFound -1 |
22 #define FmErrNotFound -1 // General error for things requested is not found |
23 #define FmErrGeneral -2 |
23 #define FmErrGeneral -2 // General error |
24 #define FmErrAlreadyExists -3 |
24 #define FmErrAlreadyExists -3 // General for already existed. for example if unlock a drive but it has already been unlocked |
25 #define FmErrAccessDenied -4 |
25 #define FmErrAccessDenied -4 // General for Access is denied, for example, format a drive but access is denied. |
26 #define FmErrCannotRemove -5 |
26 #define FmErrCannotRemove -5 // General error for can not performance remove |
27 #define FmErrCannotCopy -6 |
27 #define FmErrCannotCopy -6 // General error for can not performance copy |
28 #define FmErrDiskFull -7 |
28 #define FmErrDiskFull -7 // Error for disk is full |
29 #define FmErrFileUsed -8 |
29 #define FmErrFileUsed -8 // Error for file is in use |
30 #define FmErrFolderUsed -9 |
30 #define FmErrFolderUsed -9 // Error for folder is in use |
31 #define FmErrTypeFormatFailed -10 |
31 #define FmErrTypeFormatFailed -10 // Error reported when format failed |
32 #define FmErrTypeFormatFailedUsed -11 |
32 #define FmErrTypeFormatFailedUsed -11 // Error reported when user try to format a drive but it is in use |
33 #define FmErrAlreadyStarted -12 |
33 #define FmErrAlreadyStarted -12 // General error for operation is already started |
34 #define FmErrCancel -13 |
34 #define FmErrCancel -13 // General error for operation canceled |
35 #define FmErrWrongParam -14 |
35 #define FmErrWrongParam -14 // General error for wrong parameter |
36 #define FmErrUnKnown -15 |
36 #define FmErrUnKnown -15 // Unknown error |
37 #define FmErrIsNotFileOrFolder -16 |
37 #define FmErrIsNotFileOrFolder -16 // Error for a path which is not a fild or folder. |
38 #define FmErrCannotMakeDir -17 |
38 #define FmErrCannotMakeDir -17 // Error for can not create directory. |
39 #define FmErrSrcPathDoNotExist -18 |
39 #define FmErrSrcPathDoNotExist -18 // Error for source path is not exist. |
40 #define FmErrDestPathDoNotExist -19 |
40 #define FmErrDestPathDoNotExist -19 // Error for destination path is not exist. |
41 #define FmErrCopyDestToSubFolderInSrc -20 |
41 #define FmErrCopyDestToSubFolderInSrc -20 // If user try to copy a folder to its sub folder, error will occur |
42 #define FmErrMoveDestToSubFolderInSrc -21 |
42 #define FmErrMoveDestToSubFolderInSrc -21 // If user try to move a folder to its sub folder, error will occur |
43 #define FmErrNotSupported -22 |
43 #define FmErrNotSupported -22 // feature not supported, for example, lock an drive which can not be locked |
44 #define FmErrNotReady -23 |
44 #define FmErrNotReady -23 // Error when drive is not ready( means drive is not present ) |
45 #define FmErrInUse -24 |
45 #define FmErrInUse -24 // Error for drive is in use. |
46 #define FmErrPermissionDenied -25 |
46 #define FmErrPermissionDenied -25 // Permission Denied |
47 #define FmErrBadName -26 |
47 #define FmErrBadName -26 // Bad Drive or file/folder name, currently used when rename drive |
48 #define FmErrPathNotFound -27 |
48 #define FmErrPathNotFound -27 // Error for path is not found |
49 #define FmErrRemoveDefaultFolder -28 |
49 #define FmErrRemoveDefaultFolder -28 // Error when user try to remove default folder, such as C:/data/images... |
|
50 #define FmErrLocked -29 // Disk is locked |
|
51 #define FmErrCorrupt -30 // Disk is corrupt |
|
52 #define FmErrDisMounted -31 // e.g. If disk dis mounted while backuping. |
|
53 #define FmErrDriveNotAvailable -32 // e.g. if user want to access MMC but it is not available |
|
54 #define FmErrPathDenied -33 // if user want to access path but it is denied, e.g c:/private |
|
55 #define FmErrDriveDenied -34 // if user want to access drive but it is denied, e.g D:/ |
|
56 #define FmErrPathNotExist -35 // path not existed. |
50 |
57 |
51 #define FmEstimateUpperLimit 90 // available mem/backup size*100%=90%, User selectable continuation |
58 #define FmEstimateUpperLimit 90 // available mem/backup size*100%=90%, User selectable continuation |
52 #define FmEstimateLowerLimit 10 // available mem/backup size*100%=10%, Backup will be interrupted |
59 #define FmEstimateLowerLimit 10 // available mem/backup size*100%=10%, Backup will be interrupted |
53 |
60 |
54 #define FmPlaceholderString " " // Placeholder for HbLabel because layout will be wrong when HbLabel is empty |
61 #define FmPlaceholderString " " // Placeholder for HbLabel because layout will be wrong when HbLabel is empty |
55 |
62 |
56 #define Drive_C "C:/" |
63 #define Drive_C ( QString( "C:" ) + QDir::separator() ) |
57 #define Drive_D "D:/" |
64 #define Drive_D ( QString( "D:" ) + QDir::separator() ) |
58 #define Drive_Z "Z:/" |
65 #define Drive_Z ( QString( "Z:" ) + QDir::separator() ) |
59 #define Folder_C_Data "C:/Data" |
66 #define Folder_C_Data ( QString( "C:" ) + QDir::separator() + QString( "Data" ) + QDir::separator() ) |
|
67 |
|
68 // define contact data path for view details. |
|
69 #define FmViewDetail_Contacts ( "\\private\\10003a73\\SQLite__Contacts.cdb" ) |
60 |
70 |
61 #define FmMaxLengthofDriveName 11 |
71 #define FmMaxLengthofDriveName 11 |
|
72 #define FmMaxLengthofDrivePassword 8 |
|
73 |
|
74 // used to match un-zeroLength string, empty character such as space is acceptable |
|
75 #define Regex_ValidUnZeroLength QString( "^.+$" ) |
|
76 |
|
77 // used to match un-empty string, and is not totally empty characters. |
|
78 #define Regex_ValidUnEmpty QString( "^.*[^\\s].*$" ) |
|
79 |
|
80 // this is regexp for valid file/folder name: no \/:*?"<>| and is not totally empty characters. |
|
81 // file name can not end with "." , but it is not include in this RegExp. It should be checked in Regex_ValidNotEndWithDot |
|
82 // this expression is composed by two expressions: |
|
83 // ^.*[^\\s].*$ used to match un-empty string and is not totally empty characters. |
|
84 // [^\\\\/:*?\"<>|] used to math valid file/folder name |
|
85 // merge the two regex together: |
|
86 // valid file/folder name and is not totally empty. |
|
87 #define Regex_ValidFileFolderName QString( "^[^\\\\/:*?\"<>|]*[^\\\\/:*?\"<>|\\s][^\\\\/:*?\"<>|]*$" ) |
|
88 |
|
89 // is not end with dot( trim blank characters in the end first ) |
|
90 #define Regex_ValidNotEndWithDot QString( "^.*[^\\.\\s][\\s]*$" ) |
62 |
91 |
63 #endif |
92 #endif |