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" );
00033 _LIT8( KPipApplication, "application/x-pip" );
00034 
00035 // DATA TYPES
00036 enum TClientAppExitType
00037     {
00038     ETerminatedByUser,
00039     ETerminatedBySystem
00040     };
00041 
00042 // FORWARD DECLARATIONS
00043 class CUserInteractionsUtils;
00044 class CDownloadMgrUiLibRegistry;
00045 class CAsyncEventHandlerArray;
00046 class CEikAppUi;
00047 class CUserInteractionsExtension;
00048 
00049 // CLASS DECLARATION
00050 
00063 NONSHARABLE_CLASS( CDownloadMgrUiUserInteractions ) : 
00064                                                 public CDownloadMgrUiBase,
00065                                                 public MHttpDownloadMgrObserver
00066     {
00067     public:  // Constructors and destructor
00068         
00072         static CDownloadMgrUiUserInteractions* NewL
00073                ( CDownloadMgrUiLibRegistry& aRegistryModel );
00074         
00078         virtual ~CDownloadMgrUiUserInteractions();
00079 
00080     public: // New functions
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: // Functions from CDownloadMgrUiBase
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: // Constructors
00211 
00215         CDownloadMgrUiUserInteractions( CDownloadMgrUiLibRegistry& aRegistryModel );
00216 
00220         void ConstructL();
00221 
00222     protected: // New functions
00223 
00224         // Event handler functions
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: // Functions from MHttpDownloadMgrObserver
00291 
00292         virtual void HandleDMgrEventL( RHttpDownload& aDownload, 
00293                                        THttpDownloadEvent aEvent );
00294 
00295     private:  // Data
00296         
00297         CUserInteractionsExtension* iExtension; 
00298 
00299         CUserInteractionsUtils*     iUiUtils; 
00301         CAsyncEventHandlerArray*    iEventHandlerArray; 
00302 
00303         TBool                       iDlgActive;
00304 
00305     private: // Friend classes
00306 
00307         friend class CUserInteractionsExtension;
00308     };
00309 
00310 #endif /* CDOWNLOADMGRUIUSERINTERACTIONS_H */

Copyright © Nokia Corporation 2001-2008
Back to top