mmappcomponents/harvester/filehandler/inc/mpxdbcommon.h
changeset 0 a2952bb97e68
child 17 780c925249c1
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Common Literals for the harvester db
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MPXDBCOMMON_H
       
    20 #define MPXDBCOMMON_H
       
    21 
       
    22 _LIT( KHarvesterDBPath, "\\private\\101ffca9\\");
       
    23 // Harvester db increment 9 v1
       
    24 // Please update the increment number for each increment 
       
    25 // Please update the version number for each schema change
       
    26 _LIT( KHarvesterDBName, "harvesterdbv9_5.dat" );
       
    27 _LIT( KHarvesterDBPattern, "harvesterdbv*.dat" );
       
    28 
       
    29 const TInt KDbMaxTableCreationSQLLength = 1024;
       
    30 
       
    31 // Files table name
       
    32 _LIT(KHarvesterMainTable, "Files"); 
       
    33 
       
    34 // Column names 
       
    35 _LIT(KHarPathName,    "FilePath" );  // Drive and Folder for an item
       
    36 _LIT(KHarFileName,    "FileName" );  // File name for an item
       
    37 _LIT(KHarLastModTime, "ModTime" );   // Last modified time stamp
       
    38 _LIT(KHarCollectionDB, "DBID"   );   // Collection database ID
       
    39 _LIT(KHarItemDRM,      "DRM"    );   // DRM file flag
       
    40 
       
    41 // Column numbers
       
    42 const TInt KHarPathNameColumn = 1;
       
    43 const TInt KHarFileNameColumn = 2;
       
    44 const TInt KHarModTimeColumn  = 3;
       
    45 const TInt KHarColDBIDColumn  = 4;
       
    46 const TInt KHarDRMColumn      = 5;
       
    47 
       
    48 // Column types
       
    49 _LIT(KHarPathNameType, " LONG VARCHAR");
       
    50 _LIT(KHarFileNameType, " LONG VARCHAR");
       
    51 _LIT(KHarLastModTimeType,  " TIME"); 
       
    52 _LIT(KHarColDBIDType, " INTEGER");
       
    53 _LIT(KHarItemDRMType, " BIT");
       
    54 
       
    55 // AUX table name
       
    56 _LIT(KHarvesterAuxTable, "Aux");
       
    57 
       
    58 // AUX Column names
       
    59 _LIT(KAuxVolumeId,           "VolumeId");
       
    60 _LIT(KAuxVolumeIdType,       " UNSIGNED INTEGER");
       
    61 
       
    62 // AUX Column number
       
    63 const TInt KHarAuxVolumeIdColumn = 1;
       
    64 
       
    65 
       
    66 // SQL query strings
       
    67 _LIT(KStartCreateTable, "CREATE TABLE ");
       
    68 _LIT(KSelectAll,        "SELECT * FROM ");
       
    69 _LIT(KSelect,           "SELECT ");
       
    70 _LIT(KUpdate,           "UPDATE ");
       
    71 _LIT(KDelete,           "DELETE ");
       
    72 _LIT(KAll,              "* ");
       
    73 _LIT(KFrom,             "FROM ");
       
    74 _LIT(KWhere,            " WHERE ");
       
    75 _LIT(KAnd,              " AND ");
       
    76 _LIT(KSet,              " SET ");
       
    77 _LIT(KItemBracket,      "'");
       
    78 _LIT(KItemHash,         "#");
       
    79 _LIT(KEquals,           " = ");
       
    80 _LIT(KOpenBracket,      "(");
       
    81 _LIT(KCloseBracket,     ")");
       
    82 _LIT(KCommaSign,        ","); 
       
    83 _LIT(KAuxVolumeIdQuery, "INSERT INTO Aux(VolumeId) VALUES (%u)");
       
    84 _LIT(KLike,             " LIKE ");
       
    85 _LIT(KWildcard,         "*");
       
    86 _LIT(KOn,               "1");
       
    87 #endif // MPXDBCOMMON_H