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 application/vnd.symbian.install x-epoc/x-app268436505" );
00033 _LIT8( KPipApplication, "application/x-pip" );
00034 _LIT8( KWidgetMimeType, "application/x-nokia-widget" );
00035 _LIT8( KSharingConfig, "application/isf.sharing.config" );
00036
00037
00038 enum TClientAppExitType
00039 {
00040 ETerminatedByUser,
00041 ETerminatedBySystem
00042 };
00043
00044
00045 class CUserInteractionsUtils;
00046 class CDownloadMgrUiLibRegistry;
00047 class CAsyncEventHandlerArray;
00048 class CEikAppUi;
00049 class CUserInteractionsExtension;
00050
00051
00052
00065 NONSHARABLE_CLASS( CDownloadMgrUiUserInteractions ) :
00066 public CDownloadMgrUiBase,
00067 public MHttpDownloadMgrObserver
00068 {
00069 public:
00070
00074 static CDownloadMgrUiUserInteractions* NewL
00075 ( CDownloadMgrUiLibRegistry& aRegistryModel );
00076
00080 virtual ~CDownloadMgrUiUserInteractions();
00081
00082 public:
00083
00090 IMPORT_C TBool OkToExitL();
00091
00106 IMPORT_C TInt PrepareToExit( CEikAppUi& aAppUi,
00107 TClientAppExitType aExitType,
00108 TVwsViewId aViewId,
00109 TUid aCustomMessageId,
00110 const TDesC8& aViewActivationMsg );
00111
00121 IMPORT_C TInt PrepareToExit( TUint32 aAppUid,
00122 TUint32 aViewId,
00123 TUint32 aCustomMessageId );
00124
00132 IMPORT_C void HandleDownloadL( RHttpDownload& aDownload );
00133
00138 TInt DownloadConfirmationsShown() const;
00139
00145 TBool IsUiBusy() const;
00146
00151 TBool IsCodServiceFlowRunning() const;
00152
00158 TBool IsCodServiceFlowRunning( RHttpDownload& aDownload ) const;
00159
00165 TBool IsCodServiceFlowRunningL() const;
00166
00173 TBool IsCodServiceFlowRunningL( RHttpDownload& aDownload ) const;
00174
00181 void PostponeCodHandlingL( RHttpDownload& aDownload );
00182
00188 TBool IsPostponed( RHttpDownload& aDownload ) const;
00189
00193 void SchedulePostponedDownloadL();
00194
00195 public:
00196
00198 enum TDownloadMgrUiUserInteractionsAttr
00199 {
00200 EAttrSuppressDownloadConfirmation
00201 };
00202
00203 IMPORT_C virtual void GetIntAttributeL( const TUint aAttribute, TInt32& aValue );
00204 IMPORT_C virtual void GetBoolAttributeL( const TUint aAttribute, TBool& aValue );
00205 IMPORT_C virtual void GetStringAttributeL( const TUint aAttribute, TDes16& aValue );
00206 IMPORT_C virtual void GetStringAttributeL( const TUint aAttribute, TDes8& aValue );
00207 IMPORT_C virtual void SetIntAttributeL( const TUint aAttribute, TInt32 aValue );
00208 IMPORT_C virtual void SetBoolAttributeL( const TUint aAttribute, TBool aValue );
00209 IMPORT_C virtual void SetStringAttributeL( const TUint aAttribute, const TDesC16& aValue );
00210 IMPORT_C virtual void SetStringAttributeL( const TUint aAttribute, const TDesC8& aValue );
00211
00212 protected:
00213
00217 CDownloadMgrUiUserInteractions( CDownloadMgrUiLibRegistry& aRegistryModel );
00218
00222 void ConstructL();
00223
00224 protected:
00225
00226
00227
00234 void HandleCompletionWithQueryL( RHttpDownload& aDownload,
00235 TBool aIsUiBusy,
00236 TBool aIsSupported,
00237 TBool aIsDrm,
00238 TBool aDrmRightsOnPhone );
00244 void DoHandleCompletionWithQueryL( RHttpDownload& aDownload,
00245 TBool aIsUiBusy,
00246 TBool aIsSupported,
00247 TBool aIsDrm,
00248 TBool aDrmRightsOnPhone );
00249
00254 void PrepareToExitL( CEikAppUi* aAppUi,
00255 TClientAppExitType aExitType,
00256 TVwsViewId aViewId,
00257 TUid aCustomMessageId,
00258 const TDesC8& aViewActivationMsg );
00259
00264 TBool IsStandAloneAppRunning();
00265
00270 void DeleteEventHandlerShowingDlConfirmation( RHttpDownload& aDownload );
00271
00276 void DeleteEventHandlers( RHttpDownload& aDownload );
00277
00283 void HandleNormalDownloadL( RHttpDownload& aDownload );
00284
00290 TBool CodDownloadL( RHttpDownload& aDownload ) const;
00291
00292 protected:
00293
00294 virtual void HandleDMgrEventL( RHttpDownload& aDownload,
00295 THttpDownloadEvent aEvent );
00296
00297 private:
00298
00299 CUserInteractionsExtension* iExtension;
00300
00301 CUserInteractionsUtils* iUiUtils;
00303 CAsyncEventHandlerArray* iEventHandlerArray;
00304
00305 TBool iDlgActive;
00306
00307 private:
00308
00309 friend class CUserInteractionsExtension;
00310 };
00311
00312 #endif