|
1 /* |
|
2 * Copyright (c) 2008 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 the License "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: Abstracts the Sqlite calls for Symbian |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __OS_SYMBIAN_H__ |
|
20 #define __OS_SYMBIAN_H__ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include "os.h" |
|
25 #include "sqliteInt.h" |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 // MACROS |
|
30 |
|
31 // DATA TYPES |
|
32 #ifdef __COUNT_FILE_IO__ |
|
33 /** |
|
34 TDbFileIOCounters structure holds counters used for collecting information about the file I/O statistics: |
|
35 file I/O operations count and the time spent in their execution. |
|
36 The structure can be used only when __COUNT_FILE_IO__ macro is defined. |
|
37 @internalComponent |
|
38 */ |
|
39 struct TDbFileIOCounters |
|
40 { |
|
41 TInt iWriteOpCnt; |
|
42 TUint iWriteOpTime; |
|
43 TInt iReadOpCnt; |
|
44 TUint iReadOpTime; |
|
45 TInt iSyncOpCnt; |
|
46 TUint iSyncOpTime; |
|
47 TInt iOpenOpCnt; |
|
48 TUint iOpenOpTime; |
|
49 TInt iSeekOpCnt; |
|
50 TUint iSeekOpTime; |
|
51 TInt iDeleteOpCnt; |
|
52 TUint iDeleteOpTime; |
|
53 TInt iCloseOpCnt; |
|
54 TUint iCloseOpTime; |
|
55 TInt iExistOpCnt; |
|
56 TUint iExistOpTime; |
|
57 TInt iLockOpCnt; |
|
58 TUint iLockOpTime; |
|
59 TInt iUnlockOpCnt; |
|
60 TUint iUnlockOpTime; |
|
61 TInt iTruncateOpCnt; |
|
62 TUint iTruncateOpTime; |
|
63 TInt iFileSizeOpCnt; |
|
64 TUint iFileSizeOpTime; |
|
65 TInt iIsDirWOpCnt; |
|
66 TUint iIsDirWOpTime; |
|
67 TInt iTempFileNameOpCnt; |
|
68 TUint iTempFileNameOpTime; |
|
69 }; |
|
70 |
|
71 void sqlite3SymbianZeroDbFileIOCounters(); |
|
72 void sqlite3SymbianGetDbFileIOCounters(TDbFileIOCounters& aDbFileIOCounters); |
|
73 #endif//__COUNT_FILE_IO__ |
|
74 |
|
75 |
|
76 // FORWARD DECLARATIONS |
|
77 class RFs; |
|
78 |
|
79 // FUNCTION PROTOTYPES |
|
80 #ifdef __MEM_TRACE__ |
|
81 |
|
82 void sqlite3SymbianPrintMemCounters(void); |
|
83 void sqlite3SymbianResetMemCounters(void); |
|
84 |
|
85 #else//__MEM_TRACE__ |
|
86 |
|
87 #define sqlite3SymbianPrintMemCounters() void(0) |
|
88 #define sqlite3SymbianResetMemCounters() void(0) |
|
89 |
|
90 #endif//__MEM_TRACE__ |
|
91 |
|
92 // LOCAL FUNCTIONS |
|
93 IMPORT_C TInt sqlite3SymbianLibInit(void); |
|
94 IMPORT_C void sqlite3SymbianLibFinalize(void); |
|
95 IMPORT_C TInt sqlite3SymbianLastOsError(void); |
|
96 IMPORT_C RFs& sqlite3SymbianFs(void); |
|
97 |
|
98 #endif//__OS_SYMBIAN_H__ |