sl@0
|
1 |
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// CPolicySpace class
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#ifndef __SC_POLICYSPACE_H__
|
sl@0
|
19 |
#define __SC_POLICYSPACE_H__
|
sl@0
|
20 |
|
sl@0
|
21 |
#include "D32Map.h"
|
sl@0
|
22 |
#include "SC_Policy.h"
|
sl@0
|
23 |
|
sl@0
|
24 |
namespace DBSC
|
sl@0
|
25 |
{
|
sl@0
|
26 |
|
sl@0
|
27 |
//Forward declarations
|
sl@0
|
28 |
class CPassAllPolicy;
|
sl@0
|
29 |
|
sl@0
|
30 |
/**
|
sl@0
|
31 |
CPolicySpace class implements MPolicySpace interface and manages a set of
|
sl@0
|
32 |
CPolicyDomain objects (one per binary policy file).
|
sl@0
|
33 |
All requests for particular MPOlicy implementations go through CPolicySpace object.
|
sl@0
|
34 |
The DBMS server has to create only one CPolicySpace instance during the DBMS startup.
|
sl@0
|
35 |
@internalComponent
|
sl@0
|
36 |
*/
|
sl@0
|
37 |
NONSHARABLE_CLASS(CPolicySpace) : public CBase, public MPolicySpace
|
sl@0
|
38 |
{
|
sl@0
|
39 |
public:
|
sl@0
|
40 |
static CPolicySpace* NewL(RFs& aFs, const TDesC& aPrivatePath);
|
sl@0
|
41 |
virtual ~CPolicySpace();
|
sl@0
|
42 |
virtual void Release();
|
sl@0
|
43 |
virtual const MPolicy* DbPolicyL(const TDbPolicyRequest& aDbPolicyRequest) const;
|
sl@0
|
44 |
virtual const MPolicy* TblPolicyL(const TDbPolicyRequest& aDbPolicyRequest, const TDesC& aTblName) const;
|
sl@0
|
45 |
virtual TSecureId BackupSIDL(TUid aDbUid) const;
|
sl@0
|
46 |
|
sl@0
|
47 |
private:
|
sl@0
|
48 |
inline CPolicySpace();
|
sl@0
|
49 |
void ConstructL(RFs& aFs, const TDesC& aPrivatePath);
|
sl@0
|
50 |
void LoadPolicyDomainsL(RFs& aFs, const TDesC& aPolicyDir);
|
sl@0
|
51 |
CPolicyDomain* PolicyDomain(TUid aDomainUid) const;
|
sl@0
|
52 |
|
sl@0
|
53 |
private:
|
sl@0
|
54 |
CPassAllPolicy* iPassAllDbPolicy;
|
sl@0
|
55 |
CPassAllPolicy* iPassAllTblPolicy;
|
sl@0
|
56 |
RMap<TInt, CPolicyDomain*> iPDCollection;
|
sl@0
|
57 |
|
sl@0
|
58 |
};
|
sl@0
|
59 |
|
sl@0
|
60 |
} //end of - namespace DBSC
|
sl@0
|
61 |
|
sl@0
|
62 |
#endif//__SC_POLICYSPACE_H__
|