// AGSTRANS.H
//
// Copyright (c) 1997-1999 Symbian Ltd.  All rights reserved.
//



#if !defined(__AGSMAIN_H__)
#include "agsmain.h"
#endif


#if !defined(__AGSTRANS_H__)
#define __AGSTRANS_H__


// TAgnEntryTransaction
// Contains details of a entry transaction to notify the UI about

class TAgnEntryTransaction
	{
public:
	enum TType {EDeleted, EUpdated};
	TAgnEntryTransaction();
	// Static functions used to create specific transaction types
	static TAgnEntryTransaction DeletedEntry(TAgnEntryId aId);
	static TAgnEntryTransaction UpdatedEntry(TAgnEntryId aOldId, TAgnEntryId aNewId);
public:
	TType iTransactionType;		// Type of transaction
	TAgnEntryId iEntryId;		// EntryID involved in transaction
	TAgnEntryId iUpdatedId;		// New EntryId for updated entries
	};


// CAgnTransactionList
// Stores a list of transaction entries

class CAgnTransactionList : public CBase
	{
public:
	CAgnTransactionList();
	~CAgnTransactionList();
	static CAgnTransactionList* NewL();
	void ConstructL();
	void AddTransactionL(TAgnEntryTransaction aTransaction);
	TAgnEntryId CheckTransactions(TAgnEntryId aEntryId);
	void Reset();
private:
	CArrayFixFlat<TAgnEntryTransaction>* iTransactionList;
	};

#endif
