messagingfw/wappushfw/tpush/RefTestAgent/RTAParser/rightscriteriaexpiry.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:27:27 +0100
branchRCL_3
changeset 23 d51193d814ea
parent 22 d2c4c66342f3
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

// 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