persistentstorage/dbms/security/SC_Builder.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 // TPolicyDomainBuilder implementation
       
    15 // 
       
    16 //
       
    17 
       
    18 #include "SC_Policy.h"
       
    19 
       
    20 namespace DBSC
       
    21 {
       
    22 
       
    23 /**
       
    24 The method sets the database policy to the related CPolicyDomain collection.
       
    25 @param aDbPolicy A pointer to CDbPolicy instance, which has to be set to 
       
    26                   the related CPolicyDomain collection. CPolicyDomain collection takes the
       
    27 				  ownership on the supplied CDbPolicy instance.
       
    28 @leave KErrAlreadyExists If the database policy was already set.
       
    29 */
       
    30 void TPolicyDomainBuilder::SetDbPolicyL(CDbPolicy* aDbPolicy)
       
    31 	{
       
    32 	__ASSERT(aDbPolicy);
       
    33 	if(iPolicyDomain.iDbPolicy)
       
    34 		{
       
    35 		__LEAVE(KErrAlreadyExists);
       
    36 		}
       
    37 	iPolicyDomain.iDbPolicy = aDbPolicy;
       
    38 	}
       
    39 
       
    40 } //end of - namespace DBSC