CDownloadMgrUiUserInteractions.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : CDownloadMgrUiUserInteractions.h
00004 *  Part of     : Download Manager / UI Lib
00005 *  Interface   : UI Lib, User Interaction and Dialogs
00006 *  Description : Supports user interaction dialogs for downloads
00007 *  Version     : -
00008 *
00009 *  Copyright © 2002-2004 Nokia. All rights reserved.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia. All rights are reserved. Copying, including 
00013 *  reproducing, storing, adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia.
00018 * ==============================================================================
00019 */
00020 
00021 
00022 #ifndef CDOWNLOADMGRUIUSERINTERACTIONS_H
00023 #define CDOWNLOADMGRUIUSERINTERACTIONS_H
00024 
00025 //  INCLUDES
00026 #include <CDownloadMgrUiBase.h>
00027 #include <DownloadMgrClient.h>
00028 #include <vwsdef.h>
00029 
00030 // CONSTANTS
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 // DATA TYPES
00038 enum TClientAppExitType
00039     {
00040     ETerminatedByUser,
00041     ETerminatedBySystem
00042     };
00043 
00044 // FORWARD DECLARATIONS
00045 class CUserInteractionsUtils;
00046 class CDownloadMgrUiLibRegistry;
00047 class CAsyncEventHandlerArray;
00048 class CEikAppUi;
00049 class CUserInteractionsExtension;
00050 
00051 // CLASS DECLARATION
00052 
00065 NONSHARABLE_CLASS( CDownloadMgrUiUserInteractions ) : 
00066                                                 public CDownloadMgrUiBase,
00067                                                 public MHttpDownloadMgrObserver
00068     {
00069     public:  // Constructors and destructor
00070         
00074         static CDownloadMgrUiUserInteractions* NewL
00075                ( CDownloadMgrUiLibRegistry& aRegistryModel );
00076         
00080         virtual ~CDownloadMgrUiUserInteractions();
00081 
00082     public: // New functions
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: // Functions from CDownloadMgrUiBase
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: // Constructors
00213 
00217         CDownloadMgrUiUserInteractions( CDownloadMgrUiLibRegistry& aRegistryModel );
00218 
00222         void ConstructL();
00223 
00224     protected: // New functions
00225 
00226         // Event handler functions
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: // Functions from MHttpDownloadMgrObserver
00293 
00294         virtual void HandleDMgrEventL( RHttpDownload& aDownload, 
00295                                        THttpDownloadEvent aEvent );
00296 
00297     private:  // Data
00298         
00299         CUserInteractionsExtension* iExtension; 
00300 
00301         CUserInteractionsUtils*     iUiUtils; 
00303         CAsyncEventHandlerArray*    iEventHandlerArray; 
00304 
00305         TBool                       iDlgActive;
00306 
00307     private: // Friend classes
00308 
00309         friend class CUserInteractionsExtension;
00310     };
00311 
00312 #endif /* CDOWNLOADMGRUIUSERINTERACTIONS_H */

Copyright © Nokia Corporation 2001-2007
Back to top