messagingfw/wappushfw/tpush/RefTestAgent/RTAParser/rightscriteriaexpiry.h
changeset 0 8e480a14352b
child 22 d2c4c66342f3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingfw/wappushfw/tpush/RefTestAgent/RTAParser/rightscriteriaexpiry.h	Mon Jan 18 20:36:02 2010 +0200
@@ -0,0 +1,68 @@
+// 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 __RIGHTSCRITERIAEXPIRY_H__
+#define __RIGHTSCRITERIAEXPIRY_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 CRightsCriteriaExpiry : public MCriteria
+		{
+	public:
+		static CRightsCriteriaExpiry* NewL(TInt aDay, TMonth aMonth, TInt aYear);
+		static CRightsCriteriaExpiry* NewL(RReadStream& aStream);
+		
+		virtual ~CRightsCriteriaExpiry();
+		
+		virtual TInt Evaluate();
+		virtual void ExecuteL();
+		virtual TBool IsStateless() const;
+		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:
+		CRightsCriteriaExpiry();
+		CRightsCriteriaExpiry(TInt aDay, TMonth aMonth, TInt aYear);
+		TDateTime& Expiry();
+		
+		virtual void InternalizeL(RReadStream& aStream);	
+		
+	private:
+		TDateTime iExpire;
+		};
+	}
+
+#endif
+