sl@0: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // CPassAllPolicy class - "DBMS security" related code. Used in no_security environment or for sl@0: // non-secure databases sl@0: // sl@0: // sl@0: sl@0: #include "SC_PassAllPolicy.h" sl@0: sl@0: namespace DBSC sl@0: { sl@0: sl@0: CPassAllPolicy::CPassAllPolicy(TPolicyObjType aPOType) : sl@0: iPOType(aPOType) sl@0: { sl@0: } sl@0: sl@0: CPassAllPolicy::~CPassAllPolicy() sl@0: { sl@0: } sl@0: sl@0: //The method returns always ETrue. sl@0: TBool CPassAllPolicy::Check(const RMessage2&, TPolicyType) const sl@0: { sl@0: return ETrue; sl@0: } sl@0: sl@0: //The method initializes aPolicy parameter with "EAlwaysPass" type policy instance and sl@0: //returns KErrNone. sl@0: TInt CPassAllPolicy::Get(TPolicyType, TSecurityPolicy& aPolicy) const sl@0: { sl@0: __ASSERT(0); sl@0: aPolicy = TSecurityPolicy(TSecurityPolicy::EAlwaysPass); sl@0: return KErrNone; sl@0: } sl@0: sl@0: #ifdef __DBDUMP__ sl@0: void CPassAllPolicy::Dump(RFile& aFile) const sl@0: { sl@0: _LIT8(KClassName, "Class: CPassAllPolicy. this=%X"); sl@0: TBuf8<40> buf; sl@0: _LIT8(KCrLf, "\r\n"); sl@0: _LIT8(KObjType, "Object: "); sl@0: _LIT8(KDatabase, "Database"); sl@0: _LIT8(KTable, "Table"); sl@0: sl@0: buf.Format(KClassName, this); sl@0: (void)aFile.Write(buf); sl@0: (void)aFile.Write(KCrLf); sl@0: (void)aFile.Write(KObjType); sl@0: iPOType == EPOTDatabase ? (void)aFile.Write(KDatabase) : (void)aFile.Write(KTable); sl@0: (void)aFile.Write(KCrLf); sl@0: } sl@0: #endif sl@0: sl@0: } //end of - namespace DBSC