00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef CDOWNLOADMGRUIDOWNLOADSLIST_H
00023 #define CDOWNLOADMGRUIDOWNLOADSLIST_H
00024
00025
00026 #include <CDownloadMgrUiBase.h>
00027 #include <DownloadMgrClient.h>
00028 #include <HttpDownloadMgrCommon.h>
00029 #include <DownloadsListDlgObserver.h>
00030
00031 #include <AiwServiceHandler.h>
00032 #include <AiwCommon.hrh>
00033
00034
00035 class CDownloadMgrUiDownloadMenu;
00036 class CDownloadMgrUiUserInteractions;
00037 class CDownloadsListArray;
00038 class CDownloadsListDlg;
00039 class CUserInteractionsUtils;
00040 class CDownloadMgrUiLibRegistry;
00041 class CAsyncEventHandlerArray;
00042 class CAsyncEventHandlerBase;
00043 class CDownloadsListExtension;
00044
00045
00046
00053 NONSHARABLE_CLASS( CDownloadMgrUiDownloadsList ) :
00054 public CDownloadMgrUiBase,
00055 public MHttpDownloadMgrObserver,
00056 public MDownloadsListDlgObserver,
00057 public MAiwNotifyCallback
00058 {
00059 public:
00060
00064 static CDownloadMgrUiDownloadsList* NewL
00065 ( CDownloadMgrUiLibRegistry& aRegistryModel );
00066
00070 virtual ~CDownloadMgrUiDownloadsList();
00071
00072 public:
00073
00074
00075
00076
00077
00083 IMPORT_C CDownloadMgrUiDownloadMenu& DownloadMenu() const;
00084
00085
00086
00087
00088
00097 IMPORT_C void DisplayDownloadsListL();
00098
00109 void DisplayDownloadsListL( RHttpDownload& aHighlightDl );
00110
00116 IMPORT_C void CancelDisplayingDownloadsList();
00117
00123 IMPORT_C TBool IsVisible() const;
00124
00130 IMPORT_C TInt Count() const;
00131
00135 void DeleteDownloadL( RHttpDownload& aDownload );
00136
00142 TBool IsOneProgressive();
00143
00144 public:
00145
00146 IMPORT_C virtual void GetIntAttributeL( const TUint aAttribute, TInt32& aValue );
00147 IMPORT_C virtual void GetBoolAttributeL( const TUint aAttribute, TBool& aValue );
00148 IMPORT_C virtual void GetStringAttributeL( const TUint aAttribute, TDes16& aValue );
00149 IMPORT_C virtual void GetStringAttributeL( const TUint aAttribute, TDes8& aValue );
00150 IMPORT_C virtual void SetIntAttributeL( const TUint aAttribute, TInt32 aValue );
00151 IMPORT_C virtual void SetBoolAttributeL( const TUint aAttribute, TBool aValue );
00152 IMPORT_C virtual void SetStringAttributeL( const TUint aAttribute, const TDesC16& aValue );
00153 IMPORT_C virtual void SetStringAttributeL( const TUint aAttribute, const TDesC8& aValue );
00154
00155 protected:
00156
00160 CDownloadMgrUiDownloadsList( CDownloadMgrUiLibRegistry& aRegistryModel );
00161
00165 void ConstructL();
00166
00167 protected:
00168
00169
00170
00171
00172
00177 void AddDownloadsToListModelL( CDownloadsListArray& aLBModel,
00178 RHttpDownloadMgr& aDownloadMgr );
00179
00187 TInt AddDownloadToListModelL( CDownloadsListArray& aLBModel,
00188 RHttpDownload& aDownload );
00189
00190
00191
00192
00193
00194 void NewDownloadCreatedL( RHttpDownload& aDownload );
00195 void UpdateProgressInfoL( RHttpDownload& aDownload, THttpDownloadEvent aEvent );
00196 void DownloadPausedL( RHttpDownload& aDownload, THttpDownloadEvent aEvent );
00197 void DownloadCompletedL( RHttpDownload& aDownload, THttpDownloadEvent aEvent );
00198 void DownloadFailedL( RHttpDownload& aDownload, THttpDownloadEvent aEvent );
00199 void PauseableStateChangedL( RHttpDownload& aDownload, TBool aPausable );
00200
00201
00202
00203
00204
00205 void HideMenu();
00206
00207 protected:
00208
00209 virtual void HandleDMgrEventL( RHttpDownload& aDownload, THttpDownloadEvent aEvent );
00210
00211 protected:
00212
00213 virtual void PreLayoutDynInitL( CDownloadsListDlg& aDialog );
00214 virtual void ProcessCommandL( CDownloadsListDlg& aDialog, TInt aCommandId );
00215 virtual void DynInitMenuPaneL( CDownloadsListDlg& aDialog, TInt aResourceId, CEikMenuPane* aMenuPane );
00216 virtual TKeyResponse OfferKeyEventL( CDownloadsListDlg& aDialog, const TKeyEvent& aKeyEvent, TEventCode aType );
00217
00218
00219 protected:
00220 TInt HandleNotifyL( TInt ,
00221 TInt ,
00222 CAiwGenericParamList& ,
00223 const CAiwGenericParamList& ){return KErrNone;}
00224 private:
00225 void AttachAIWInterestL();
00226 void HandleAIWCommandL(TInt aCommand, RHttpDownload& aDownload);
00227 void InitializeAIWPlugInMenusL( TInt aResourceId,
00228 CEikMenuPane* aMenuPane,
00229 RHttpDownload& aDownload );
00230 void ProvideInputParametersL( CAiwGenericParamList& aParams,
00231 TInt& ,
00232 RHttpDownload& aDownload);
00233
00234 private:
00235
00236 CDownloadsListExtension* iExtension;
00237
00238 CUserInteractionsUtils* iUiUtils;
00239 CDownloadMgrUiDownloadMenu* iDownloadMenu;
00240 CAsyncEventHandlerArray* iEventHandlerArray;
00241 CDownloadsListArray* iListModel;
00242 CDownloadsListDlg* iDialog;
00243 TBool iIsVisible;
00244 TBool iIsTimerStarted;
00245 CAiwServiceHandler* iAIWServiceHandler;
00246
00247 private:
00248
00249 friend class CDownloadsListExtension;
00250 };
00251
00252 #endif