persistentstorage/dbms/security/SC_StrmOut.h
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     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 // TPDStreamPersister class
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __SC_STRMOUT_H__
       
    19 #define __SC_STRMOUT_H__
       
    20 
       
    21 #include "SC_Policy.h"
       
    22 
       
    23 //Forward declarations
       
    24 class RWriteStream;
       
    25 
       
    26 namespace DBSC
       
    27 {
       
    28 
       
    29 /**
       
    30 TPDStreamPersister class is an implementation of MPolicyDomainPersister interface and is used
       
    31 for storing security policies to a binary policy file. The class uses TPolicyDomainReader
       
    32 class functionality for retrieving the policies of the controlled by TPolicyDomainReader
       
    33 instance CPolicyDomain collection.
       
    34 @see MPolicyDomainPersister
       
    35 @see TPolicyDomainReader
       
    36 @see CPolicyBase::RPolicyCollection
       
    37 @see CPolicyDomain
       
    38 @internalComponent
       
    39 */
       
    40 class TPDStreamPersister : public MPolicyDomainPersister
       
    41 	{
       
    42 public:
       
    43 	inline TPDStreamPersister(RWriteStream& aStream) :
       
    44 		iStream(aStream)
       
    45 		{
       
    46 		}
       
    47 	virtual void RunL(const TPolicyDomainReader& aPolicyDomainReader);
       
    48 
       
    49 private:
       
    50 	void ExternalizePolicyCollectionL(const CPolicyBase::RPolicyCollection& aPolicyCollection);
       
    51 
       
    52 private:
       
    53 	RWriteStream& iStream;
       
    54 
       
    55 	};
       
    56 
       
    57 } //end of - namespace DBSC
       
    58 
       
    59 #endif//__SC_STRMOUT_H__