appinstaller/AppinstUi/Daemon/Inc/installationFailedAppsCache.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 15 Mar 2010 12:41:05 +0200
branchRCL_3
changeset 19 7ca52d38f8c3
parent 0 ba25891c3a9e
permissions -rw-r--r--
Revision: 201009 Kit: 201010

/*
* Copyright (c) 2004 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: 
*
*/


#ifndef _INSTALLATIONFAILEDAPPSCACHE_H
#define _INSTALLATIONFAILEDAPPSCACHE_H

#include <e32base.h>
#include <e32cmn.h>

// It is assumed there is only ever ONE instance of this class
class CInstallationFailedAppsCache : public CBase
	{
public:

	static CInstallationFailedAppsCache *NewL();
	
	~CInstallationFailedAppsCache();

	/**
	 * Read the cache from disk 
	 */
	void InitFromCacheFileL();
	
	/**
	 * Add new UID to cache.
	 */	
	void AddPackageUID( TUid aUid );  
	
	/**
	 * Check if given UID is found in cache.
	 */	
	TBool HasPreviousInstallationFailed( TUid aUid );

	/**
	 * Flush cache to disk. Create new file if file not found.
	 */
	void FlushToDiskL();
	
private:

	CInstallationFailedAppsCache();
	
	void ConstructL();
	
private:	
	
	RArray<TUid> iUidsArray; // Array containing UIDs	
	RFs          iFs;
	TBool        iNewUID; // Defines if new UID is added to array.
	};

#endif