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: // CPolicySpace class sl@0: // sl@0: // sl@0: sl@0: #ifndef __SC_POLICYSPACE_H__ sl@0: #define __SC_POLICYSPACE_H__ sl@0: sl@0: #include "D32Map.h" sl@0: #include "SC_Policy.h" sl@0: sl@0: namespace DBSC sl@0: { sl@0: sl@0: //Forward declarations sl@0: class CPassAllPolicy; sl@0: sl@0: /** sl@0: CPolicySpace class implements MPolicySpace interface and manages a set of sl@0: CPolicyDomain objects (one per binary policy file). sl@0: All requests for particular MPOlicy implementations go through CPolicySpace object. sl@0: The DBMS server has to create only one CPolicySpace instance during the DBMS startup. sl@0: @internalComponent sl@0: */ sl@0: NONSHARABLE_CLASS(CPolicySpace) : public CBase, public MPolicySpace sl@0: { sl@0: public: sl@0: static CPolicySpace* NewL(RFs& aFs, const TDesC& aPrivatePath); sl@0: virtual ~CPolicySpace(); sl@0: virtual void Release(); sl@0: virtual const MPolicy* DbPolicyL(const TDbPolicyRequest& aDbPolicyRequest) const; sl@0: virtual const MPolicy* TblPolicyL(const TDbPolicyRequest& aDbPolicyRequest, const TDesC& aTblName) const; sl@0: virtual TSecureId BackupSIDL(TUid aDbUid) const; sl@0: sl@0: private: sl@0: inline CPolicySpace(); sl@0: void ConstructL(RFs& aFs, const TDesC& aPrivatePath); sl@0: void LoadPolicyDomainsL(RFs& aFs, const TDesC& aPolicyDir); sl@0: CPolicyDomain* PolicyDomain(TUid aDomainUid) const; sl@0: sl@0: private: sl@0: CPassAllPolicy* iPassAllDbPolicy; sl@0: CPassAllPolicy* iPassAllTblPolicy; sl@0: RMap iPDCollection; sl@0: sl@0: }; sl@0: sl@0: } //end of - namespace DBSC sl@0: sl@0: #endif//__SC_POLICYSPACE_H__