00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef CDOWNLOADMGRUIUSERINTERACTIONS_H
00023 #define CDOWNLOADMGRUIUSERINTERACTIONS_H
00024
00025
00026 #include <CDownloadMgrUiBase.h>
00027 #include <DownloadMgrClient.h>
00028 #include <vwsdef.h>
00029
00030
00031 _LIT8( KDrmInnerContentTypesToLaunch, "application/java-archive application/x-java-archive x-epoc/x-sisx-app application/x-pip" );
00032 _LIT8( KSisxApplication, "x-epoc/x-sisx-app" );
00033 _LIT8( KPipApplication, "application/x-pip" );
00034
00035
00036 enum TClientAppExitType
00037 {
00038 ETerminatedByUser,
00039 ETerminatedBySystem
00040 };
00041
00042
00043 class CUserInteractionsUtils;
00044 class CDownloadMgrUiLibRegistry;
00045 class CAsyncEventHandlerArray;
00046 class CEikAppUi;
00047 class CUserInteractionsExtension;
00048
00049
00050
00063 NONSHARABLE_CLASS( CDownloadMgrUiUserInteractions ) :
00064 public CDownloadMgrUiBase,
00065 public MHttpDownloadMgrObserver
00066 {
00067 public:
00068
00072 static CDownloadMgrUiUserInteractions* NewL
00073 ( CDownloadMgrUiLibRegistry& aRegistryModel );
00074
00078 virtual ~CDownloadMgrUiUserInteractions();
00079
00080 public:
00081
00088 IMPORT_C TBool OkToExitL();
00089
00104 IMPORT_C TInt PrepareToExit( CEikAppUi& aAppUi,
00105 TClientAppExitType aExitType,
00106 TVwsViewId aViewId,
00107 TUid aCustomMessageId,
00108 const TDesC8& aViewActivationMsg );
00109
00119 IMPORT_C TInt PrepareToExit( TUint32 aAppUid,
00120 TUint32 aViewId,
00121 TUint32 aCustomMessageId );
00122
00130 IMPORT_C void HandleDownloadL( RHttpDownload& aDownload );
00131
00136 TInt DownloadConfirmationsShown() const;
00137
00143 TBool IsUiBusy() const;
00144
00149 TBool IsCodServiceFlowRunning() const;
00150
00156 TBool IsCodServiceFlowRunning( RHttpDownload& aDownload ) const;
00157
00163 TBool IsCodServiceFlowRunningL() const;
00164
00171 TBool IsCodServiceFlowRunningL( RHttpDownload& aDownload ) const;
00172
00179 void PostponeCodHandlingL( RHttpDownload& aDownload );
00180
00186 TBool IsPostponed( RHttpDownload& aDownload ) const;
00187
00191 void SchedulePostponedDownloadL();
00192
00193 public:
00194
00196 enum TDownloadMgrUiUserInteractionsAttr
00197 {
00198 EAttrSuppressDownloadConfirmation
00199 };
00200
00201 IMPORT_C virtual void GetIntAttributeL( const TUint aAttribute, TInt32& aValue );
00202 IMPORT_C virtual void GetBoolAttributeL( const TUint aAttribute, TBool& aValue );
00203 IMPORT_C virtual void GetStringAttributeL( const TUint aAttribute, TDes16& aValue );
00204 IMPORT_C virtual void GetStringAttributeL( const TUint aAttribute, TDes8& aValue );
00205 IMPORT_C virtual void SetIntAttributeL( const TUint aAttribute, TInt32 aValue );
00206 IMPORT_C virtual void SetBoolAttributeL( const TUint aAttribute, TBool aValue );
00207 IMPORT_C virtual void SetStringAttributeL( const TUint aAttribute, const TDesC16& aValue );
00208 IMPORT_C virtual void SetStringAttributeL( const TUint aAttribute, const TDesC8& aValue );
00209
00210 protected:
00211
00215 CDownloadMgrUiUserInteractions( CDownloadMgrUiLibRegistry& aRegistryModel );
00216
00220 void ConstructL();
00221
00222 protected:
00223
00224
00225
00232 void HandleCompletionWithQueryL( RHttpDownload& aDownload,
00233 TBool aIsUiBusy,
00234 TBool aIsSupported,
00235 TBool aIsDrm,
00236 TBool aDrmRightsOnPhone );
00242 void DoHandleCompletionWithQueryL( RHttpDownload& aDownload,
00243 TBool aIsUiBusy,
00244 TBool aIsSupported,
00245 TBool aIsDrm,
00246 TBool aDrmRightsOnPhone );
00247
00252 void PrepareToExitL( CEikAppUi* aAppUi,
00253 TClientAppExitType aExitType,
00254 TVwsViewId aViewId,
00255 TUid aCustomMessageId,
00256 const TDesC8& aViewActivationMsg );
00257
00262 TBool IsStandAloneAppRunning();
00263
00268 void DeleteEventHandlerShowingDlConfirmation( RHttpDownload& aDownload );
00269
00274 void DeleteEventHandlers( RHttpDownload& aDownload );
00275
00281 void HandleNormalDownloadL( RHttpDownload& aDownload );
00282
00288 TBool CodDownloadL( RHttpDownload& aDownload ) const;
00289
00290 protected:
00291
00292 virtual void HandleDMgrEventL( RHttpDownload& aDownload,
00293 THttpDownloadEvent aEvent );
00294
00295 private:
00296
00297 CUserInteractionsExtension* iExtension;
00298
00299 CUserInteractionsUtils* iUiUtils;
00301 CAsyncEventHandlerArray* iEventHandlerArray;
00302
00303 TBool iDlgActive;
00304
00305 private:
00306
00307 friend class CUserInteractionsExtension;
00308 };
00309
00310 #endif