diff -r 000000000000 -r 08ec8eefde2f persistentstorage/centralrepository/cenrepsrv/install.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/cenrepsrv/install.h Fri Jan 22 11:06:30 2010 +0200 @@ -0,0 +1,91 @@ +// Copyright (c) 1997-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: +// + +/** + @internalTechnology +*/ + +#ifndef __INSTALL_H__ +#define __INSTALL_H__ + +#include +#include +#include +#include "srvrepos_noc.h" +#include +#include + +class CInstallEntry : public CBase + { +public: + static CInstallEntry* NewL(); + CInstallEntry(); + ~CInstallEntry(); + void ConstructL(); + void SetL(TEntry& aEntry); + void HandleFileDeleteL(TInt aOperation); + void HandleFileCreateL(TInt aOperation); + void HandleFileUpdateL(TInt aOperation); + + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + + TUid Uid() const; + TTime Modified() const; + TCentRepFileType FileExt() const; +private: + TUid iUid; + TTime iModified; + TCentRepFileType iFileExt; + CServerRepository* iRepository; + CSessionNotifier* iNotifier; + }; + +class CCentRepSWIWatcher: public CActive + { +public: + static CCentRepSWIWatcher* NewL(RFs& aFs); + void Start(); + ~CCentRepSWIWatcher(); + void HandleSWIEventL(TInt swiProperty); + void FindChangedEntriesL(TBool aStartup=EFalse); + //From CActive +protected: + void RunL(); + TInt RunError(TInt aError); + void DoCancel(); +private: + CCentRepSWIWatcher(RFs& aFs); + void NotifyChange(); + void ConstructL(); + + void ReadInstallDirL(RPointerArray& aEntryArray); + + + void SaveInstallDirL(); + void GetInstallDirL(); + void ReadAndInternalizeInstallDirL(const TDesC& aInstallDirFilePath); + + static TBool MatchEntries(const CInstallEntry &aSource, const CInstallEntry &aTarget); + + TDesC& iInstallDir; + RFs& iFs; + RPointerArray iInstallEntryArray; + RPointerArray iCurrentInstallDirEntries; + RProperty iSWIKey; + TInt iSWIOperation; + TInt iSWIStatus; + }; +#endif