1 cdownloadmgruibase.h |
1 /* |
|
2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Supports common base functionality for DMgr user interfaces |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CDOWNLOADMGRUIBASE_H |
|
21 #define CDOWNLOADMGRUIBASE_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <E32BASE.H> |
|
25 #include <ConeResLoader.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CCoeEnv; |
|
29 class CDownloadMgrUiLibRegistry; |
|
30 class CUiBaseExtension; |
|
31 class MAknServerAppExitObserver; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
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. |
|
40 * |
|
41 * @lib Download Manager UI Lib |
|
42 * @since Series 60 2.8 |
|
43 */ |
|
44 NONSHARABLE_CLASS( CDownloadMgrUiBase ) : public CBase |
|
45 { |
|
46 public: // New functions |
|
47 |
|
48 TPtrC ResourceFileName() const; |
|
49 |
|
50 /** |
|
51 * Set an oberver for embedded application exit events. |
|
52 * @param aObserver Exit observer. Can be NULL. |
|
53 * @return None. |
|
54 */ |
|
55 IMPORT_C void SetServerAppExitObserver( MAknServerAppExitObserver* aObserver ); |
|
56 |
|
57 /** |
|
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. |
|
62 * @return None. |
|
63 */ |
|
64 IMPORT_C virtual void GetIntAttributeL( const TUint aAttribute, TInt32& aValue ) = 0; |
|
65 |
|
66 /** |
|
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. |
|
71 * @return None. |
|
72 */ |
|
73 IMPORT_C virtual void GetBoolAttributeL( const TUint aAttribute, TBool& aValue ) = 0; |
|
74 |
|
75 /** |
|
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. |
|
80 * @return None. |
|
81 */ |
|
82 IMPORT_C virtual void GetStringAttributeL( const TUint aAttribute, TDes16& aValue ) = 0; |
|
83 |
|
84 /** |
|
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. |
|
89 * @return None. |
|
90 */ |
|
91 IMPORT_C virtual void GetStringAttributeL( const TUint aAttribute, TDes8& aValue ) = 0; |
|
92 |
|
93 /** |
|
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. |
|
98 * @return None. |
|
99 */ |
|
100 IMPORT_C virtual void SetIntAttributeL( const TUint aAttribute, TInt32 aValue ) = 0; |
|
101 |
|
102 /** |
|
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. |
|
107 * @return None. |
|
108 */ |
|
109 IMPORT_C virtual void SetBoolAttributeL( const TUint aAttribute, TBool aValue ) = 0; |
|
110 |
|
111 /** |
|
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. |
|
116 * @return None. |
|
117 */ |
|
118 IMPORT_C virtual void SetStringAttributeL( const TUint aAttribute, const TDesC16& aValue ) = 0; |
|
119 |
|
120 /** |
|
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. |
|
125 * @return None. |
|
126 */ |
|
127 IMPORT_C virtual void SetStringAttributeL( const TUint aAttribute, const TDesC8& aValue ) = 0; |
|
128 |
|
129 protected: // Constructors |
|
130 |
|
131 /** |
|
132 * C++ default constructor. |
|
133 */ |
|
134 CDownloadMgrUiBase( CDownloadMgrUiLibRegistry& aRegistryModel ); |
|
135 |
|
136 /** |
|
137 * By default Symbian 2nd phase constructor is private. |
|
138 */ |
|
139 void BaseConstructL(); |
|
140 |
|
141 /** |
|
142 * Destructor. |
|
143 */ |
|
144 virtual ~CDownloadMgrUiBase(); |
|
145 |
|
146 protected: // Data |
|
147 |
|
148 CCoeEnv& iCoeEnv; ///< Reference to CONE environment. |
|
149 |
|
150 protected: // Data |
|
151 |
|
152 CDownloadMgrUiLibRegistry& iRegistryModel; ///< Reference to the Registry. |
|
153 MAknServerAppExitObserver* iServerAppExitObserver; ///< Reference to the observer. |
|
154 |
|
155 private: // Data |
|
156 |
|
157 TFileName iResourceFileName; ///< Temp storage for the file name. |
|
158 RConeResourceLoader iResourceLoader; ///< Resource loader. |
|
159 TBool iResourceOpened; ///< Indicate if the resource is opened. |
|
160 |
|
161 CUiBaseExtension* iExtension; ///< Reserved pointer for future extension |
|
162 |
|
163 }; |
|
164 |
|
165 #endif /* CDOWNLOADMGRUIBASE_H */ |