diff -r 000000000000 -r b16258d2340f applayerpluginsandutils/bookmarksupport/test/cenrepsrv/install.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/applayerpluginsandutils/bookmarksupport/test/cenrepsrv/install.h Tue Feb 02 01:09:52 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.h" +#include + +using namespace Swi; + +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); + + //From CActive +protected: + void RunL(); + TInt RunError(TInt aError); + void DoCancel(); +private: + CCentRepSWIWatcher(RFs& aFs); + void NotifyChange(); + void ConstructL(); + + void ReadInstallDirL(RPointerArray& aEntryArray); + void FindChangedEntriesL(TBool aStartup=EFalse); + + void SaveInstallDirL(); + void GetInstallDirL(); + + static TBool MatchEntries(const CInstallEntry &aSource, const CInstallEntry &aTarget); + + TDesC& iInstallDir; + RFs& iFs; + RPointerArray iInstallEntryArray; + RPointerArray iCurrentInstallDirEntries; + RProperty iSWIKey; + TInt iSWIOperation; + TInt iSWIStatus; + }; +#endif