inc/DrmUtilityDmgrWrapper.h
changeset 49 69d8e75812b7
parent 29 3bdc3b853094
--- a/inc/DrmUtilityDmgrWrapper.h	Fri Jun 11 15:44:45 2010 +0300
+++ b/inc/DrmUtilityDmgrWrapper.h	Thu Jun 24 12:39:58 2010 +0300
@@ -20,10 +20,13 @@
 #define CDRMUTILITYDMGRWRAPPER_H
 
 #include <f32file.h> // RFs
-#include <DownloadMgrClient.h>
 #include <RoapObserver.h> // Roap::MRoapObserver
 #include <AknProgressDialog.h> // MAknProgressDialogCallback CAknProgressDialog
 
+// download apis
+#include <downloadmanager.h>
+#include <download.h>
+#include <downloadevent.h>
 
 namespace Roap
     {
@@ -36,7 +39,8 @@
     }
 class CDRMRights;
 class CEikProgressInfo;
-
+class DrmUtilityEventHandler;
+class QDrmUtilityDmgrEventHandler;
 
 /**
 * Environment gate function
@@ -67,7 +71,6 @@
 */
 class CDrmUtilityDmgrWrapper :
     public CActive,
-    public MHttpDownloadMgrObserver,
     public Roap::MRoapObserver,
     public MDrmUtilityDmgrWrapper,
     public MProgressDialogCallback
@@ -105,18 +108,6 @@
 
     HBufC8* GetErrorUrlL();
 
-
-    // from base class MHttpDownloadMgrObserver
-
-    /**
-    * From MHttpDownloadMgrObserver.
-    * Handle download manager events
-    *
-    * @param aDownload the download
-    * @param aEvent the event
-    */
-    void HandleDMgrEventL( RHttpDownload& aDownload, THttpDownloadEvent aEvent );
-
 // From Roap::MRoapObserver
     /**
     * ConnectionConfL
@@ -252,6 +243,14 @@
     * @param aButtonId ID of the button pressed
     */
     void DialogDismissedL( TInt aButtonId );
+    
+    /**
+	* Handle download manager events
+	*
+	* @param aEvent the event
+	*/
+            
+    void HandleDownloadEventL( WRT::DownloadEvent* aEvent );
 
 protected:
     //from Cactive
@@ -287,15 +286,22 @@
     void DoHandleRoapTriggerL( TDownloadState aNextState );
 
     void CompleteToState( TDownloadState aNextState, TInt aError );
+    
+    void ProcessDownloadEventL( WRT::Download& aDownload, WRT::DownloadEvent& aEvent );
 
 private: // data
 
     /**
     * Download manager session
     */
-    RHttpDownloadMgr iDlMgr;
+    WRT::DownloadManager* iDlMgr;
 
     /**
+     * Download instance needs to be stored for handling signal slot mechanism
+     */
+    WRT::Download* iDownload;
+    
+    /**
     * Used to make downloads synchronous
     */
     CActiveSchedulerWait iWait;
@@ -360,6 +366,8 @@
     HBufC* iFileName;
 
     DRM::CDrmUtilityConnection* iConnection;
+    
+    QDrmUtilityDmgrEventHandler* iDrmUtilityDmgrEventHandler; 
     };
 
 #endif // CDRMUTILITYDMGRWRAPPER_H