|
1 /* |
|
2 * Copyright (c) 2005 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: XcapCache common defines |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __COMMONDEFINES_H__ |
|
22 #define __COMMONDEFINES_H__ |
|
23 |
|
24 #include <e32base.h> |
|
25 |
|
26 //Information about the data in the cache |
|
27 class TCacheEntryInfo |
|
28 { |
|
29 public: |
|
30 |
|
31 TTime iLastUpdate; |
|
32 TTime iLastAccess; |
|
33 TInt32 iDataLength; |
|
34 const TDesC* iDocumentUri; |
|
35 const TDesC8* iEtag; |
|
36 const TDesC8* iRootUri; |
|
37 const TDesC8* iRespData; |
|
38 }; |
|
39 |
|
40 // server name |
|
41 _LIT( KXcapCacheServerName, "!CXcapCacheServer" ); |
|
42 _LIT( KXcapCacheServerLib, "XcapCacheServer" ); |
|
43 _LIT( KXcapCacheServerExe, "XcapCache.exe"); |
|
44 |
|
45 // A version must be specifyed when creating a session with the server |
|
46 const TUint KCacheServerMajorVersionNumber = 0; |
|
47 const TUint KCacheServerMinorVersionNumber = 1; |
|
48 const TUint KCacheServerBuildVersionNumber = 1; |
|
49 |
|
50 // Server panic codes |
|
51 enum TXcapCacheServerPanic |
|
52 { |
|
53 ECacheCreateServer = 0, |
|
54 ECacheStartServer, |
|
55 ECacheFileServerConnect, |
|
56 ECacheIndexFileOpen, |
|
57 ECachePageFileOpen, |
|
58 EMainSchedulerError, |
|
59 EBadRequest |
|
60 }; |
|
61 |
|
62 //Opcodes used in message passing between client and server |
|
63 enum TTransportServerRequest |
|
64 { |
|
65 EXcapCacheFetchInfo = 0, |
|
66 EXcapCacheFetchData, |
|
67 EXcapCacheStore, |
|
68 EXcapCacheDelete, |
|
69 EXcapCacheCheckValidity, |
|
70 EXcapCacheFlush |
|
71 }; |
|
72 |
|
73 //Number of asynchronous requests |
|
74 const TUint KTTMaxAsyncRequests = 4; |
|
75 |
|
76 //Number of data transfer requests |
|
77 const TUint KTTDataTransferRequests = 3; |
|
78 |
|
79 //Default number of message slots per session |
|
80 const TUint KTTDefaultMessageSlots = KTTMaxAsyncRequests + 2; |
|
81 |
|
82 const TInt KServerLogBufferMaxSize = 2000; |
|
83 |
|
84 const TInt KMaxCacheSize = 30000; |
|
85 |
|
86 #endif // #ifndef __COMMONDEFINES_H__ |
|
87 |
|
88 // End of File |