2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Supports common base functionality for DMgr user interfaces
20 #ifndef CDOWNLOADMGRUIBASE_H
21 #define CDOWNLOADMGRUIBASE_H
25 #include <ConeResLoader.h>
27 // FORWARD DECLARATIONS
29 class CDownloadMgrUiLibRegistry;
30 class CUiBaseExtension;
31 class MAknServerAppExitObserver;
36 * Abstaract base class for UI Lib classes with UI controls.
37 * It owns a set of downloads that belong to the derived concrete class.
38 * Derived classes must implement MHttpDownloadMgrObserver.
39 * When constructing one Download Manager must be added.
41 * @lib Download Manager UI Lib
42 * @since Series 60 2.8
44 NONSHARABLE_CLASS( CDownloadMgrUiBase ) : public CBase
46 public: // New functions
48 TPtrC ResourceFileName() const;
51 * Set an oberver for embedded application exit events.
52 * @param aObserver Exit observer. Can be NULL.
55 IMPORT_C void SetServerAppExitObserver( MAknServerAppExitObserver* aObserver );
58 * Gets the value for a TInt attribute.
59 * Leaves with KErrNotSupported, if the attribute is not supported.
60 * @param aAttribute Identifies the attribute to be retrived.
61 * @param aValue On completion, contains the requested TInt attribute.
64 IMPORT_C virtual void GetIntAttributeL( const TUint aAttribute, TInt32& aValue ) = 0;
67 * Gets the value for a TBool attribute.
68 * Leaves with KErrNotSupported, if the attribute is not supported.
69 * @param aAttribute Identifies the attribute to be retrived.
70 * @param aValue On completion, contains the requested TBool attribute.
73 IMPORT_C virtual void GetBoolAttributeL( const TUint aAttribute, TBool& aValue ) = 0;
76 * Gets the value for a TDes16 attribute.
77 * Leaves with KErrNotSupported, if the attribute is not supported.
78 * @param aAttribute Identifies the attribute to be retrived.
79 * @param aValue On completion, contains the requested TDes16 attribute.
82 IMPORT_C virtual void GetStringAttributeL( const TUint aAttribute, TDes16& aValue ) = 0;
85 * Gets the value for a TDes8 attribute.
86 * Leaves with KErrNotSupported, if the attribute is not supported.
87 * @param aAttribute Identifies the attribute to be retrived.
88 * @param aValue On completion, contains the requested TDes8 attribute.
91 IMPORT_C virtual void GetStringAttributeL( const TUint aAttribute, TDes8& aValue ) = 0;
94 * Sets the value for a TInt attribute.
95 * Leaves with KErrNotSupported, if the attribute is not supported.
96 * @param aAttribute Identifies the attribute to be set.
97 * @param aValue The value to be set.
100 IMPORT_C virtual void SetIntAttributeL( const TUint aAttribute, TInt32 aValue ) = 0;
103 * Sets the value for a TBool attribute.
104 * Leaves with KErrNotSupported, if the attribute is not supported.
105 * @param aAttribute Identifies the attribute to be set.
106 * @param aValue The value to be set.
109 IMPORT_C virtual void SetBoolAttributeL( const TUint aAttribute, TBool aValue ) = 0;
112 * Sets the value for a TDesC attribute.
113 * Leaves with KErrNotSupported, if the attribute is not supported.
114 * @param aAttribute Identifies the attribute to be set.
115 * @param aValue The value to be set.
118 IMPORT_C virtual void SetStringAttributeL( const TUint aAttribute, const TDesC16& aValue ) = 0;
121 * Sets the value for a TDesC8 attribute.
122 * Leaves with KErrNotSupported, if the attribute is not supported.
123 * @param aAttribute Identifies the attribute to be set.
124 * @param aValue The value to be set.
127 IMPORT_C virtual void SetStringAttributeL( const TUint aAttribute, const TDesC8& aValue ) = 0;
129 protected: // Constructors
132 * C++ default constructor.
134 CDownloadMgrUiBase( CDownloadMgrUiLibRegistry& aRegistryModel );
137 * By default Symbian 2nd phase constructor is private.
139 void BaseConstructL();
144 virtual ~CDownloadMgrUiBase();
148 CCoeEnv& iCoeEnv; ///< Reference to CONE environment.
152 CDownloadMgrUiLibRegistry& iRegistryModel; ///< Reference to the Registry.
153 MAknServerAppExitObserver* iServerAppExitObserver; ///< Reference to the observer.
157 TFileName iResourceFileName; ///< Temp storage for the file name.
158 RConeResourceLoader iResourceLoader; ///< Resource loader.
159 TBool iResourceOpened; ///< Indicate if the resource is opened.
161 CUiBaseExtension* iExtension; ///< Reserved pointer for future extension
165 #endif /* CDOWNLOADMGRUIBASE_H */