author | hgs |
Thu, 02 Sep 2010 17:00:51 +0800 | |
changeset 40 | 4167eb56f30d |
parent 33 | 328cf6fbe40c |
child 47 | 12b82dc0e8db |
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 |
25 | 21 |
#define FmErrNone 0 // No Error |
22 |
#define FmErrNotFound -1 // General error for things requested is not found |
|
23 |
#define FmErrGeneral -2 // General error |
|
24 |
#define FmErrAlreadyExists -3 // General for already existed. for example if unlock a drive but it has already been unlocked |
|
25 |
#define FmErrAccessDenied -4 // General for Access is denied, for example, format a drive but access is denied. |
|
26 |
#define FmErrCannotRemove -5 // General error for can not performance remove |
|
27 |
#define FmErrCannotCopy -6 // General error for can not performance copy |
|
28 |
#define FmErrDiskFull -7 // Error for disk is full |
|
29 |
#define FmErrFileUsed -8 // Error for file is in use |
|
30 |
#define FmErrFolderUsed -9 // Error for folder is in use |
|
31 |
#define FmErrTypeFormatFailed -10 // Error reported when format failed |
|
32 |
#define FmErrTypeFormatFailedUsed -11 // Error reported when user try to format a drive but it is in use |
|
33 |
#define FmErrAlreadyStarted -12 // General error for operation is already started |
|
34 |
#define FmErrCancel -13 // General error for operation canceled |
|
35 |
#define FmErrWrongParam -14 // General error for wrong parameter |
|
36 |
#define FmErrUnKnown -15 // Unknown error |
|
37 |
#define FmErrIsNotFileOrFolder -16 // Error for a path which is not a fild or folder. |
|
38 |
#define FmErrCannotMakeDir -17 // Error for can not create directory. |
|
39 |
#define FmErrSrcPathDoNotExist -18 // Error for source path is not exist. |
|
40 |
#define FmErrDestPathDoNotExist -19 // Error for destination path is not exist. |
|
41 |
#define FmErrCopyDestToSubFolderInSrc -20 // If user try to copy a folder to its sub folder, error will occur |
|
42 |
#define FmErrMoveDestToSubFolderInSrc -21 // If user try to move a folder to its sub folder, error will occur |
|
43 |
#define FmErrNotSupported -22 // feature not supported, for example, lock an drive which can not be locked |
|
44 |
#define FmErrNotReady -23 // Error when drive is not ready( means drive is not present ) |
|
45 |
#define FmErrInUse -24 // Error for drive is in use. |
|
46 |
#define FmErrPermissionDenied -25 // Permission Denied |
|
47 |
#define FmErrBadName -26 // Bad Drive or file/folder name, currently used when rename drive |
|
48 |
#define FmErrPathNotFound -27 // Error for path is not found |
|
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. |
|
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 |
|
25 | 63 |
#define Drive_C ( QString( "C:" ) + QDir::separator() ) |
64 |
#define Drive_D ( QString( "D:" ) + QDir::separator() ) |
|
65 |
#define Drive_Z ( QString( "Z:" ) + QDir::separator() ) |
|
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" ) |
|
40 | 70 |
// define message data path for view details |
71 |
#define FmViewDetail_Messages ( "\\private\\1000484b\\Mail2" ) |
|
14
1957042d8c7e
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
72 |
|
16
ada7962b4308
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
14
diff
changeset
|
73 |
#define FmMaxLengthofDriveName 11 |
25 | 74 |
#define FmMaxLengthofDrivePassword 8 |
16
ada7962b4308
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
14
diff
changeset
|
75 |
|
33 | 76 |
// used to match un-zeroLength string, empty character such as space is acceptable |
77 |
#define Regex_ValidUnZeroLength QString( "^.+$" ) |
|
27 | 78 |
|
79 |
// used to match un-empty string, and is not totally empty characters. |
|
80 |
#define Regex_ValidUnEmpty QString( "^.*[^\\s].*$" ) |
|
81 |
||
40 | 82 |
// this is regexp for valid file/folder name: no \/:*?"<>| and is not totally empty characters. |
27 | 83 |
// file name can not end with "." , but it is not include in this RegExp. It should be checked in Regex_ValidNotEndWithDot |
84 |
// this expression is composed by two expressions: |
|
85 |
// ^.*[^\\s].*$ used to match un-empty string and is not totally empty characters. |
|
86 |
// [^\\\\/:*?\"<>|] used to math valid file/folder name |
|
87 |
// merge the two regex together: |
|
40 | 88 |
// valid file/folder name and is not totally empty. |
27 | 89 |
#define Regex_ValidFileFolderName QString( "^[^\\\\/:*?\"<>|]*[^\\\\/:*?\"<>|\\s][^\\\\/:*?\"<>|]*$" ) |
90 |
||
91 |
// is not end with dot( trim blank characters in the end first ) |
|
92 |
#define Regex_ValidNotEndWithDot QString( "^.*[^\\.\\s][\\s]*$" ) |
|
93 |
||
16
ada7962b4308
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
14
diff
changeset
|
94 |
#endif |