diff -r 5cc91383ab1e -r 7333d7932ef7 ncdengine/engine/transport/inc/catalogshttpdownloadmanagerimpl.h --- a/ncdengine/engine/transport/inc/catalogshttpdownloadmanagerimpl.h Thu Aug 19 10:02:49 2010 +0300 +++ b/ncdengine/engine/transport/inc/catalogshttpdownloadmanagerimpl.h Tue Aug 31 15:21:33 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 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" @@ -19,13 +19,19 @@ #ifndef C_CATALOGSHTTPDOWNLOADMANAGER_H #define C_CATALOGSHTTPDOWNLOADMANAGER_H -#include +// #include #include "catalogstransportoperationid.h" #include "catalogshttpsession.h" // RCatalogsHttpOperationArray #include "catalogshttpsessionmanager.h" + #include "catalogsconnectionmethod.h" #include "catalogsaccesspointobserver.h" +#include +#include +#include + +#include //HLa class MCatalogsHttpConfig; class CCatalogsHttpConfig; @@ -38,16 +44,22 @@ class CCatalogsHttpSession; class CCatalogsConnection; class CCatalogsNetworkManager; +class CCatalogsHttpQTDownloadManager; +using namespace WRT; + +const TInt KNCDEngineAppID = 0X2002E685; + /** * HTTP file download manager * */ class CCatalogsHttpDownloadManager : + public CActive, - public MHttpDownloadMgrObserver, public MCatalogsAccessPointObserver { + public: // Constructors and destructor /** @@ -69,7 +81,7 @@ * Destructor */ virtual ~CCatalogsHttpDownloadManager(); - + public: // New methods /** @@ -159,7 +171,7 @@ void AddRef(); - + DownloadManager* GetDownloadManager(); TInt Release(); void SetConnectionMethodL( @@ -202,15 +214,9 @@ TInt NewDownloadId(); - RHttpDownload& CreatePlatformDownloadL( const TDesC8& aUrl ); - - public: // From MHttpDownloadMngrObserver - - /** - * Handles events from Download manager - */ - virtual void HandleDMgrEventL( RHttpDownload& aDownload, - THttpDownloadEvent aEvent ); + WRT::Download& CreatePlatformDownloadL( const TDesC8& aUrl ); + void downloadMgrEventRecieved(DownloadManagerEvent* dlmEvent); + public: // from MCatalogsAccessPointObserver @@ -259,11 +265,12 @@ * @param aArray Array to search from * @param aDownload Download to find * @return Index to the download in iDownloads - */ + */ + /* HLa TInt FindInDownloads( const RCatalogsHttpOperationArray& aArray, RHttpDownload* aDownload ) const; - + */ /** * Searches for the given download from the given array and returns @@ -283,6 +290,7 @@ /** * Download events */ + /* HLa class TDownloadEvent { public: @@ -295,7 +303,7 @@ { } }; - + */ /** * Sets this object active if event queue has unhandled events @@ -306,18 +314,19 @@ * Removes events from event queue that belong to the same * RHttpDownload as aEvent */ + /* void RemoveUnhandledEvents( const TDownloadEvent& aEvent ); void RemoveUnhandledProgressEvents( const TDownloadEvent& aEvent ); - + */ + /** * Deletes downloads that have not been paused by the user */ void DeleteHangingDownloads(); - - + private: MCatalogsHttpSessionManager& iManager; @@ -326,8 +335,9 @@ CCatalogsHttpConnectionManager& iConnectionManager; CCatalogsNetworkManager* iNetworkManager; // Not owned TInt32 iSessionId; - RHttpDownloadMgr iDmgr; - + DownloadManager *iDmgr; + CCatalogsHttpQTDownloadManager* iQTmgr; + WRT::Download* iDownload; // Platform download // All downloads except those that are in Restored RCatalogsHttpOperationArray iDownloads; RCatalogsHttpOperationArray iRestoredDownloads; @@ -340,8 +350,22 @@ RFs iFs; TCatalogsConnectionMethod iCurrentAp; - RArray iEventQueue; + // RArray iEventQueue; //HLa TInt iCurrentDlId; // id of the last created download }; -#endif // C_CATALOGSHTTPDOWNLOADMANAGER_H + + +class CCatalogsHttpQTDownloadManager: public QObject + { + Q_OBJECT + public: + CCatalogsHttpQTDownloadManager(CCatalogsHttpDownloadManager* aDownloadManager,DownloadManager* aDmgr); + public slots: + void downloadMgrEventRecieved(DownloadManagerEvent*); + public: + CCatalogsHttpDownloadManager* iDownloadManager; + DownloadManager* iDmgr ; + }; + + #endif // C_CATALOGSHTTPDOWNLOADMANAGER_H \ No newline at end of file