|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: See class description below. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __PENGSTORAGESERVERCOMMON_H__ |
|
19 #define __PENGSTORAGESERVERCOMMON_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 |
|
24 |
|
25 |
|
26 // CONSTANTS |
|
27 |
|
28 //Client's version number. Major, Minor, Build |
|
29 |
|
30 /** |
|
31 * though store version has length shorted, it also used to |
|
32 * ensure certain minimal size of buffer => 10 |
|
33 */ |
|
34 const TInt KStoreVersionSize = 20; |
|
35 |
|
36 /** |
|
37 * Tolerance of the size of the store entry is 10% (100 /10) |
|
38 */ |
|
39 const TInt KStoreEntrySizeTolerance = 10; |
|
40 |
|
41 /** |
|
42 * overlapp of the Store entry size for retrieving is 20% (100/5) |
|
43 */ |
|
44 const TInt KStoreEntryRetrieveOverlap = 5; |
|
45 |
|
46 /** |
|
47 * Id store entry provides senseless size, this size is use instead |
|
48 */ |
|
49 const TInt KStoreEntryDefaultSize = 250; |
|
50 |
|
51 |
|
52 /** |
|
53 * Numbers are stored as 16 bits - 2 bytes |
|
54 */ |
|
55 const TInt KNumberSize = 4; |
|
56 |
|
57 const TInt KClientVersionMajor = 1; |
|
58 const TInt KClientVersionMinor = 0; |
|
59 const TInt KClientVersionBuild = 0; |
|
60 const TInt KRequiredVersionMajor = 1; |
|
61 const TInt KRequiredVersionMinor = 0; |
|
62 const TInt KRequiredVersionBuild = 0; |
|
63 |
|
64 const CActive::TPriority KServerPriority = CActive::EPriorityStandard; |
|
65 const TThreadPriority KServerThreadPriority = EPriorityNormal; |
|
66 |
|
67 |
|
68 const TInt32 KServerCloseTimeOut = 5000000; // (5 seconds) |
|
69 |
|
70 _LIT( KStorageServerName, "PEngStorageServer" ); |
|
71 _LIT( KStorageSessionName, "DPBStorageServerSession" ); |
|
72 |
|
73 /** |
|
74 * Base name for Storage Server executable. |
|
75 * Executable drive, folder and filename extension are determined |
|
76 * by the PEngServerStarter during the compile / runtime. |
|
77 * |
|
78 * This has to match component base name in component mmp file. |
|
79 */ |
|
80 _LIT( KStorageServerExe, "PENGSTORSERV" ); |
|
81 |
|
82 |
|
83 |
|
84 // DATA TYPES |
|
85 |
|
86 enum TPEngStorageServerPanic |
|
87 { |
|
88 EClientMissing = 1, |
|
89 ESchedulerError, |
|
90 EErrorInBTree |
|
91 }; |
|
92 |
|
93 enum TPEngStoragClientPanic |
|
94 { |
|
95 ESSBadRequest = 1024, |
|
96 ESSBadDescriptor = 1025 |
|
97 }; |
|
98 |
|
99 #endif // __PENGSTORAGESERVERCOMMON_H__ |
|
100 |