messagingfw/wappushfw/tpush/RefTestAgent/RTAParser/rightscriteriacount.h
changeset 0 8e480a14352b
child 22 d2c4c66342f3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingfw/wappushfw/tpush/RefTestAgent/RTAParser/rightscriteriacount.h	Mon Jan 18 20:36:02 2010 +0200
@@ -0,0 +1,66 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+/**
+ @file
+ @internalComponent
+ @released
+*/
+
+#ifndef __RIGHTSCRITERIACOUNT_H__
+#define __RIGHTSCRITERIACOUNT_H__
+
+#include <f32file.h>
+#include <caf/caf.h>
+#include "intent.h"
+
+class RReadStream;
+class RWriteStream;
+
+namespace ReferenceTestAgent
+	{
+	/** Interface used to define any implementation of a restriction
+	*/
+	class CRightsCriteriaCount : public MCriteria
+		{
+	public:
+		static CRightsCriteriaCount* NewL(TInt aCount);
+		static CRightsCriteriaCount* NewL(RReadStream& aStream);
+		
+		virtual ~CRightsCriteriaCount();
+		
+		virtual TInt Evaluate();
+		virtual void ExecuteL();
+		virtual TBool IsStateless() const;
+		virtual ECriteriaType Type() const;
+		virtual MCriteria* CopyL() const;
+		virtual TBool Merge(MCriteria& aCriteria);
+		virtual void WriteDescription(RFile& aFile);
+			
+		// Rights must be streamable over IPC
+		virtual void ExternalizeL(RWriteStream& aStream);
+	private:
+		CRightsCriteriaCount();
+		CRightsCriteriaCount(TInt aCount);
+		TInt Count() const;	
+		virtual void InternalizeL(RReadStream& aStream);	
+		
+	private:
+		TInt iCount;
+		};
+	}
+
+#endif
+