os/persistentdata/persistentstorage/dbms/sdbms/Sd_PolicyProxy.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/dbms/sdbms/Sd_PolicyProxy.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,60 @@
     1.4 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// CPolicyProxy class
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#ifndef __SD_POLICYPROXY_H__
    1.22 +#define __SD_POLICYPROXY_H__
    1.23 +
    1.24 +#include <f32file.h>		//RFs
    1.25 +#include "D32Security.h"
    1.26 +
    1.27 +using namespace DBSC;
    1.28 +
    1.29 +/**
    1.30 +CPolicyProxy class describes an object, which encapsulates all DBMS security related
    1.31 +functionality, like policy loading and destroying, policy checking.
    1.32 +It helps also separating the real "DBMS security" code from fake implementations for
    1.33 +non-secure releases.
    1.34 +@internalComponent
    1.35 +*/
    1.36 +NONSHARABLE_CLASS(CPolicyProxy) : public CBase
    1.37 +	{
    1.38 +public:
    1.39 +	static CPolicyProxy* NewL(RFs& aFs,const TDesC& aPrivatePath);
    1.40 +	virtual ~CPolicyProxy();
    1.41 +
    1.42 +	const MPolicy* DbPolicyL(const TDbPolicyRequest& aDbPolicyRequest);
    1.43 +	const MPolicy* TblPolicyL(const TDbPolicyRequest& aDbPolicyRequest, const TDesC& aTblName);
    1.44 +	const MPolicy* SqlPolicyL(const TDbPolicyRequest& aDbPolicyRequest, const TDesC& aSql, 
    1.45 +							  TPolicyType& aPolicyType);
    1.46 +	TSecureId BackupSIDL(TUid aDbUid) const;
    1.47 +
    1.48 +	void CheckL(const RMessage2& aMessage, const MPolicy& aPolicy) const;
    1.49 +	void CheckL(TPolicyType aPolicyType, const RMessage2& aMessage, const MPolicy& aPolicy) const;
    1.50 +
    1.51 +private:
    1.52 +	inline CPolicyProxy(RFs& aFs);
    1.53 +	void ConstructL(const TDesC& aPrivatePath);
    1.54 +
    1.55 +private:
    1.56 +	RFs				iFs;
    1.57 +	MPolicySpace*	iPolicySpace;	//secure releases related
    1.58 +	MPolicy*		iPolicy;		//non-secure releases related
    1.59 +
    1.60 +	};
    1.61 +
    1.62 +#endif//__SD_POLICYPROXY_H__
    1.63 +