metadataengine/server/inc/mdssqldbmaintenance.h
changeset 0 c53acadfccc6
child 20 f23c07ec56e2
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2002-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:  Class for SQL database creation*
       
    15 */
       
    16 
       
    17 #ifndef __MDSSQLDBMAINTENANCE_H__
       
    18 #define __MDSSQLDBMAINTENANCE_H__
       
    19 
       
    20 #include <e32base.h>
       
    21 
       
    22 // FORWARD DECLARATIONS
       
    23 class CMdSSchema;
       
    24 
       
    25 
       
    26 _LIT( KMdsSchemaVersionName, "SchemaVersion" );
       
    27 _LIT( KMdsDBVersionName, "DBVersion" );
       
    28 
       
    29 // CLASS DECLARATION
       
    30 /**
       
    31 * Class for validating and creating tables in database.
       
    32 */
       
    33 class CMdSSqlDbMaintenance : public CBase
       
    34     {
       
    35     public: // Constructors and destructor
       
    36         virtual ~CMdSSqlDbMaintenance();
       
    37         
       
    38         static CMdSSqlDbMaintenance* NewL();
       
    39         static CMdSSqlDbMaintenance* NewLC();
       
    40 
       
    41     private: // Private constructors
       
    42 
       
    43         CMdSSqlDbMaintenance();
       
    44         void ConstructL( );
       
    45 
       
    46     public: // Personal methods
       
    47 
       
    48         /**
       
    49         * Validates the existence of database
       
    50         * @return ETrue if the database exists, EFalse if needs to be created.
       
    51         */
       
    52         TBool ValidateL();
       
    53 
       
    54         /**
       
    55         * Drops and re-creates tables
       
    56         */
       
    57         void CreateDatabaseL();
       
    58     };
       
    59 
       
    60 #endif // __MDSSQLDBMAINTENANCE_H__