|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 #ifndef COMMON_H |
|
18 #define COMMON_H |
|
19 |
|
20 #include <e32base.h> |
|
21 |
|
22 _LIT( KBlacklistServerName, "BlacklistServer" ); |
|
23 _LIT( KBlacklistServerExe, "BlacklistServer.exe" ); // 0x0 2001B2EB = server uid |
|
24 _LIT( KBlacklistChunkName, "BlacklistServerChunk" ); |
|
25 |
|
26 const TUid KUidKBlacklistServer = { 0x2001B2EB }; |
|
27 |
|
28 const TUint KBlacklistServerMajorVersion = 0; |
|
29 const TUint KBlacklistServerMinorVersion = 1; |
|
30 const TUint KBlacklistServerBuildVersion = 1; |
|
31 |
|
32 enum TService |
|
33 { |
|
34 EBlacklistAdd, |
|
35 EBlacklistRemove, |
|
36 EBlacklistRemoveFromDB, |
|
37 EGetBlacklistData, |
|
38 EBlacklistCloseDB, |
|
39 EMaxService // Not an actual service |
|
40 }; |
|
41 |
|
42 // SQL clauses for server |
|
43 _LIT( KDefaultBlacklistDatabaseFile, "C:[200009fe]blacklistdb.sq" ); |
|
44 _LIT( KMdsBlacklistInsert, "INSERT INTO Blacklist(Modified, Uri, MediaId) VALUES(?, ?, ?);" ); |
|
45 _LIT( KMdsBlacklistUpdate, "UPDATE Blacklist SET Modified = ? WHERE Uri = ? AND MediaId = ?;" ); |
|
46 _LIT( KMdsBlacklistDelete, "DELETE FROM Blacklist WHERE Uri = ? AND MediaId = ?;" ); |
|
47 _LIT( KMdsBlacklistCheck, "SELECT Modified FROM Blacklist WHERE Uri = ? AND MediaId = ?;" ); |
|
48 _LIT( KMdsBlacklistCheckTableExistence, "SELECT COUNT(*) FROM Blacklist;" ); |
|
49 _LIT( KDropBlacklistTable, "DROP TABLE IF EXISTS Blacklist;" ); |
|
50 _LIT( KCreateBlacklistTable, "CREATE TABLE Blacklist(Uri TEXT NOT NULL, MediaId INTEGER NOT NULL, Modified INTEGER NOT NULL, PRIMARY KEY(Uri,MediaId));" ); |
|
51 _LIT( KMdsBlacklistCache, "SELECT Uri, MediaId, Modified FROM Blacklist;" ); |
|
52 |
|
53 #endif |
|
54 |
|
55 // End of file |