messagingfw/wappushfw/tpush/RefTestAgent/RTAParser/rightscriteriacount.h
changeset 0 8e480a14352b
child 22 d2c4c66342f3
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     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 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef __RIGHTSCRITERIACOUNT_H__
       
    23 #define __RIGHTSCRITERIACOUNT_H__
       
    24 
       
    25 #include <f32file.h>
       
    26 #include <caf/caf.h>
       
    27 #include "intent.h"
       
    28 
       
    29 class RReadStream;
       
    30 class RWriteStream;
       
    31 
       
    32 namespace ReferenceTestAgent
       
    33 	{
       
    34 	/** Interface used to define any implementation of a restriction
       
    35 	*/
       
    36 	class CRightsCriteriaCount : public MCriteria
       
    37 		{
       
    38 	public:
       
    39 		static CRightsCriteriaCount* NewL(TInt aCount);
       
    40 		static CRightsCriteriaCount* NewL(RReadStream& aStream);
       
    41 		
       
    42 		virtual ~CRightsCriteriaCount();
       
    43 		
       
    44 		virtual TInt Evaluate();
       
    45 		virtual void ExecuteL();
       
    46 		virtual TBool IsStateless() const;
       
    47 		virtual ECriteriaType Type() const;
       
    48 		virtual MCriteria* CopyL() const;
       
    49 		virtual TBool Merge(MCriteria& aCriteria);
       
    50 		virtual void WriteDescription(RFile& aFile);
       
    51 			
       
    52 		// Rights must be streamable over IPC
       
    53 		virtual void ExternalizeL(RWriteStream& aStream);
       
    54 	private:
       
    55 		CRightsCriteriaCount();
       
    56 		CRightsCriteriaCount(TInt aCount);
       
    57 		TInt Count() const;	
       
    58 		virtual void InternalizeL(RReadStream& aStream);	
       
    59 		
       
    60 	private:
       
    61 		TInt iCount;
       
    62 		};
       
    63 	}
       
    64 
       
    65 #endif
       
    66