|
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 // CPassAllPolicy class - "DBMS security" related code. Used in no_security environment or for |
|
15 // non-secure databases |
|
16 // |
|
17 // |
|
18 |
|
19 #include "SC_PassAllPolicy.h" |
|
20 |
|
21 namespace DBSC |
|
22 { |
|
23 |
|
24 CPassAllPolicy::CPassAllPolicy(TPolicyObjType aPOType) : |
|
25 iPOType(aPOType) |
|
26 { |
|
27 } |
|
28 |
|
29 CPassAllPolicy::~CPassAllPolicy() |
|
30 { |
|
31 } |
|
32 |
|
33 //The method returns always ETrue. |
|
34 TBool CPassAllPolicy::Check(const RMessage2&, TPolicyType) const |
|
35 { |
|
36 return ETrue; |
|
37 } |
|
38 |
|
39 //The method initializes aPolicy parameter with "EAlwaysPass" type policy instance and |
|
40 //returns KErrNone. |
|
41 TInt CPassAllPolicy::Get(TPolicyType, TSecurityPolicy& aPolicy) const |
|
42 { |
|
43 __ASSERT(0); |
|
44 aPolicy = TSecurityPolicy(TSecurityPolicy::EAlwaysPass); |
|
45 return KErrNone; |
|
46 } |
|
47 |
|
48 #ifdef __DBDUMP__ |
|
49 void CPassAllPolicy::Dump(RFile& aFile) const |
|
50 { |
|
51 _LIT8(KClassName, "Class: CPassAllPolicy. this=%X"); |
|
52 TBuf8<40> buf; |
|
53 _LIT8(KCrLf, "\r\n"); |
|
54 _LIT8(KObjType, "Object: "); |
|
55 _LIT8(KDatabase, "Database"); |
|
56 _LIT8(KTable, "Table"); |
|
57 |
|
58 buf.Format(KClassName, this); |
|
59 (void)aFile.Write(buf); |
|
60 (void)aFile.Write(KCrLf); |
|
61 (void)aFile.Write(KObjType); |
|
62 iPOType == EPOTDatabase ? (void)aFile.Write(KDatabase) : (void)aFile.Write(KTable); |
|
63 (void)aFile.Write(KCrLf); |
|
64 } |
|
65 #endif |
|
66 |
|
67 } //end of - namespace DBSC |