|
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 // CPolicyProxy class |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __SD_POLICYPROXY_H__ |
|
19 #define __SD_POLICYPROXY_H__ |
|
20 |
|
21 #include <f32file.h> //RFs |
|
22 #include "D32Security.h" |
|
23 |
|
24 using namespace DBSC; |
|
25 |
|
26 /** |
|
27 CPolicyProxy class describes an object, which encapsulates all DBMS security related |
|
28 functionality, like policy loading and destroying, policy checking. |
|
29 It helps also separating the real "DBMS security" code from fake implementations for |
|
30 non-secure releases. |
|
31 @internalComponent |
|
32 */ |
|
33 NONSHARABLE_CLASS(CPolicyProxy) : public CBase |
|
34 { |
|
35 public: |
|
36 static CPolicyProxy* NewL(RFs& aFs,const TDesC& aPrivatePath); |
|
37 virtual ~CPolicyProxy(); |
|
38 |
|
39 const MPolicy* DbPolicyL(const TDbPolicyRequest& aDbPolicyRequest); |
|
40 const MPolicy* TblPolicyL(const TDbPolicyRequest& aDbPolicyRequest, const TDesC& aTblName); |
|
41 const MPolicy* SqlPolicyL(const TDbPolicyRequest& aDbPolicyRequest, const TDesC& aSql, |
|
42 TPolicyType& aPolicyType); |
|
43 TSecureId BackupSIDL(TUid aDbUid) const; |
|
44 |
|
45 void CheckL(const RMessage2& aMessage, const MPolicy& aPolicy) const; |
|
46 void CheckL(TPolicyType aPolicyType, const RMessage2& aMessage, const MPolicy& aPolicy) const; |
|
47 |
|
48 private: |
|
49 inline CPolicyProxy(RFs& aFs); |
|
50 void ConstructL(const TDesC& aPrivatePath); |
|
51 |
|
52 private: |
|
53 RFs iFs; |
|
54 MPolicySpace* iPolicySpace; //secure releases related |
|
55 MPolicy* iPolicy; //non-secure releases related |
|
56 |
|
57 }; |
|
58 |
|
59 #endif//__SD_POLICYPROXY_H__ |
|
60 |