1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/persistentstorage/dbms/security/SC_TextOut.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,61 @@
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 +// CPDTextPersister
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef __SC_TEXTOUT_H__
1.22 +#define __SC_TEXTOUT_H__
1.23 +
1.24 +#include <f32file.h>
1.25 +#include "SC_Defs.h"
1.26 +#include "SC_Policy.h"
1.27 +
1.28 +namespace DBSC
1.29 +{
1.30 +
1.31 +/**
1.32 +CPDTextPersister class is an implementation of MPolicyDomainPersister interface and is used
1.33 +for storing security policies to a text policy file. The class uses TPolicyDomainReader
1.34 +class functionality for retrieving the policies of the controlled by TPolicyDomainReader
1.35 +instance CPolicyDomain collection.
1.36 +@see MPolicyDomainPersister
1.37 +@see TPolicyDomainReader
1.38 +@see CPolicyBase::RPolicyCollection
1.39 +@see CPolicyDomain
1.40 +@internalComponent
1.41 +*/
1.42 +class CPDTextPersister : public CBase, public MPolicyDomainPersister
1.43 + {
1.44 +public:
1.45 + static CPDTextPersister* NewLC(RFs& aFs, const TDesC& aTextFileName);
1.46 + virtual ~CPDTextPersister();
1.47 + virtual void RunL(const TPolicyDomainReader& aPolicyDomainReader);
1.48 +
1.49 +private:
1.50 + inline CPDTextPersister();
1.51 + void ConstructL(RFs& aFs, const TDesC& aTextFileName);
1.52 + void WriteDbPolicyL(const TPolicyDomainReader& aPolicyDomainReader);
1.53 + void WriteTblPoliciesL(const TPolicyDomainReader& aPolicyDomainReader);
1.54 + void WritePolicyCollection(const CPolicyBase::RPolicyCollection& aPolicyCollection);
1.55 +
1.56 +private:
1.57 + RFile iOutFile;
1.58 + TBuf8<KMaxStmtLength> iStmt;
1.59 +
1.60 + };
1.61 +
1.62 +} //end of - namespace DBSC
1.63 +
1.64 +#endif//__SC_TEXTOUT_H__