|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 |
|
18 @param aTableName UTF16 encoded table name. |
|
19 |
|
20 @return Non-zero if aTableName is one of the system tables (the table name prefix is KSystemPrefix16). |
|
21 |
|
22 @internalComponent |
|
23 */ |
|
24 inline TBool IsSystemTableName(const TDesC16& aTableName) |
|
25 { |
|
26 return ::CompareNoCase16(aTableName.Left(KSystemPrefix16().Length()), KSystemPrefix16) == 0; |
|
27 } |
|
28 |
|
29 /** |
|
30 @param aTableName UTF8 encoded table name. |
|
31 |
|
32 @return Non-zero if aTableName is one of the system tables (the table name prefix is KSystemPrefix8). |
|
33 |
|
34 @internalComponent |
|
35 */ |
|
36 inline TBool IsSystemTableName(const TDesC8& aTableName) |
|
37 { |
|
38 return ::CompareNoCase8(aTableName.Left(KSystemPrefix8().Length()), KSystemPrefix8) == 0; |
|
39 } |
|
40 |
|
41 /** |
|
42 @param aTableName UTF8 encoded table name. |
|
43 |
|
44 @return Non-zero if aTableName name prefix is is KSqlitePrefix8. |
|
45 |
|
46 @internalComponent |
|
47 */ |
|
48 inline TBool IsSqliteTableName(const TDesC8& aTableName) |
|
49 { |
|
50 return ::CompareNoCase8(aTableName.Left(KSqlitePrefix8().Length()), KSqlitePrefix8) == 0; |
|
51 } |
|
52 |
|
53 /** |
|
54 Returns non-zero if a file with "aFileName" name exists. |
|
55 |
|
56 @internalComponent |
|
57 */ |
|
58 inline TBool FileExists(RFs& aFs, const TDesC& aFileName) |
|
59 { |
|
60 TEntry entry; |
|
61 return aFs.Entry(aFileName, entry) == KErrNone; |
|
62 } |