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