cdownloadmgruilibregistry.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : CDownloadMgrUiLibRegistry.h
00004 *  Part of     : Download Manager / UI Lib
00005 *  Interface   : UI Lib, UI Lib registration interface
00006 *  Description : Supports registration of UI Lib modules.
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 CDOWNLOADMGRUILIBREGISTRY_H
00023 #define CDOWNLOADMGRUILIBREGISTRY_H
00024 
00025 //  INCLUDES
00026 #include <e32std.H>
00027 #include <e32base.h>
00028 
00029 // FORWARD DECLARATIONS
00030 class CDownloadMgrUiUserInteractions;
00031 class CDownloadMgrUiDownloadsList;
00032 class RHttpDownloadMgr;
00033 class RHttpDownload;
00034 class CUiLibRegistryExtension;
00035 
00036 // CLASS DECLARATION
00037 
00041 NONSHARABLE_CLASS( MDownloadMgrUiLibRegModel )
00042     {
00043     public:
00044 
00049         virtual TUid ClientAppUid() const = 0;
00050 
00054         virtual TBool DownloadsListInstalled() const = 0;
00055 
00059         virtual CDownloadMgrUiDownloadsList& DownloadsList() const = 0;
00060 
00064         virtual TBool UserInteractionsInstalled() const = 0;
00065 
00069         virtual CDownloadMgrUiUserInteractions& UserInteractions() const = 0;
00070 
00074         virtual RHttpDownloadMgr& DownloadMgr() const = 0;
00075 
00079         virtual TInt DownloadCount() const = 0;
00080 
00081     };
00082 
00086 NONSHARABLE_CLASS( CDownloadMgrUiLibRegistry ) : public CBase,
00087                                                  public MDownloadMgrUiLibRegModel
00088     {
00089     public:  // Constructors and destructor
00090         
00095         IMPORT_C static CDownloadMgrUiLibRegistry* NewL( RHttpDownloadMgr& aDownloadMgr );
00096         
00100         IMPORT_C virtual ~CDownloadMgrUiLibRegistry();
00101 
00102     public: // New functions
00103 
00104         // ******* Register User Interactions and Downloads List
00105 
00111         IMPORT_C CDownloadMgrUiUserInteractions& RegisterUserInteractionsL();
00112 
00118         IMPORT_C CDownloadMgrUiDownloadsList& RegisterDownloadsListL();
00119 
00120     public: // Functions from MDownloadMgrUiLibRegModel
00121 
00122         virtual TUid ClientAppUid() const;
00123         virtual TBool DownloadsListInstalled() const;
00124         virtual CDownloadMgrUiDownloadsList& DownloadsList() const;
00125         virtual TBool UserInteractionsInstalled() const;
00126         virtual CDownloadMgrUiUserInteractions& UserInteractions() const;
00127         virtual RHttpDownloadMgr& DownloadMgr() const;
00128         virtual TInt DownloadCount() const;
00129 
00130     private: // Constructors
00131 
00135         CDownloadMgrUiLibRegistry( RHttpDownloadMgr& aDownloadMgr );
00136 
00140         void ConstructL();
00141 
00142     private: // New functions
00143 
00147         void SetUiComponentsAsObserversL();
00148 
00152         void RemoveUiComponentsAsObservers();
00153 
00154     private: // Data
00155 
00156         CUiLibRegistryExtension* iExtension; 
00157 
00158         // UI components
00159         CDownloadMgrUiUserInteractions* iUserInteractions; // Owned.
00160         CDownloadMgrUiDownloadsList*    iDownloadsList; // Owned.
00161 
00162         // Observed DM session
00163         RHttpDownloadMgr& iDownloadMgr; 
00164         TUid iClientAppUid;
00165     };
00166 
00167 #endif /* CDOWNLOADMGRUILIBREGISTRY_H */

Copyright © Nokia Corporation 2001-2008
Back to top