persistentstorage/dbms/sdbms/Sd_dbs2.cpp
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 2004-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 // DBMS server proxy database - CDbsSecureDatabase class - "DBMS security" related
       
    15 // 
       
    16 //
       
    17 
       
    18 #include "SD_STD.H"
       
    19 
       
    20 /**
       
    21 Standard phase-one factory method for CDbsSecureDatabase objects.
       
    22 Creates new secure shared database.
       
    23 @param aDbs DBMS server session object.
       
    24 @param aDatabase Database name.
       
    25 @param aFormat Database format string. The string format is: "SECURE[<UID>]",
       
    26        where UID is your database security policy uid.
       
    27 @return A pointer to just created CDbsSecureDatabase instance.
       
    28 @leave System-wide error codes, including KErrNoMemory.
       
    29 */
       
    30 CDbsSecureDatabase* CDbsSecureDatabase::NewL(const RDbs& aDbs,const TDesC& aDatabase,
       
    31 											 const TDesC& aFormat)
       
    32 	{
       
    33 	CDbsSecureDatabase* self = new (ELeave) CDbsSecureDatabase;
       
    34 	CleanupStack::PushL(self);
       
    35 	TIpcArgs args(&aDatabase, &aFormat, TIpcArgs::ENothing, NULL);
       
    36 	self->ConstructL(aDbs, args);
       
    37 	CleanupStack::Pop();
       
    38 	return self;
       
    39 	}
       
    40 
       
    41 /**
       
    42 Standard phase-two construction method for CDbsSecureDatabase objects.
       
    43 Constructs new secure shared database
       
    44 @leave System-wide error codes, including KErrNoMemory.
       
    45 */
       
    46 void CDbsSecureDatabase::ConstructL(const RDbs& aDbs,TIpcArgs& aArgs)
       
    47 	{
       
    48 	iObject.OpenL(aDbs, EDbsCreateDatabase, aArgs);
       
    49 	}
       
    50 
       
    51 /**
       
    52 */
       
    53 CDbsSecureDatabase::~CDbsSecureDatabase()
       
    54 	{
       
    55 	}