1 /* |
|
2 * Copyright (c) 2005 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 "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: header file fot CFotaDLProgressDlg class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CFOTADLPROGRESSDLG_H |
|
21 #define CFOTADLPROGRESSDLG_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <AknProgressDialog.h> |
|
25 |
|
26 // Set to progress bar, when download starts |
|
27 const TInt KInitialProgressFinalValue( 100 ); |
|
28 |
|
29 // Constant to identify the type of progress note displayed at that moment |
|
30 enum { |
|
31 EDownloadingNote=0, //downloading note is shown |
|
32 EConnectingNote //connecting note is shown |
|
33 }; |
|
34 // FORWARD DECLARATIONS |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 |
|
39 /** |
|
40 * Dialog observer interface |
|
41 * |
|
42 * @lib fotaserver |
|
43 * @since S60 v3.1 |
|
44 */ |
|
45 class MDLProgressDlgObserver |
|
46 { |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Called when the dialog is going to be closed. |
|
51 * |
|
52 * @since S60 v3.1 |
|
53 * @param aButtonId Id of the button, which was used to cancel |
|
54 * the dialog. |
|
55 * @return TBool Can dlg be exited |
|
56 */ |
|
57 virtual TBool HandleDLProgressDialogExitL( TInt aButtonId ) = 0; |
|
58 }; |
|
59 |
|
60 |
|
61 /** |
|
62 * Progress dialog for download. |
|
63 * |
|
64 * @lib fotaserver.exe |
|
65 * @since S60 v3.1 |
|
66 */ |
|
67 NONSHARABLE_CLASS(CFotaDLProgressDlg) : public CAknProgressDialog |
|
68 { |
|
69 |
|
70 public: |
|
71 |
|
72 /** |
|
73 * Constructor. |
|
74 * |
|
75 * @since S60 v3.1 |
|
76 * @param aSelfPtr Pointer to self |
|
77 * @param aVisibilityDelayOff Visibility in delay |
|
78 * @param aObserver Observer |
|
79 * @return None |
|
80 */ |
|
81 CFotaDLProgressDlg( CEikDialog** aSelfPtr, TBool aVisibilityDelayOff |
|
82 , MDLProgressDlgObserver* aObserver, TInt aNoteType); |
|
83 |
|
84 virtual ~CFotaDLProgressDlg(); |
|
85 |
|
86 /** |
|
87 * Offers key event for progress dialog. |
|
88 * |
|
89 * @since S60 v3.1 |
|
90 * @param aKeyEvent Key event |
|
91 * @param aType Event type |
|
92 * @return None |
|
93 */ |
|
94 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
95 |
|
96 public: // from base classes |
|
97 |
|
98 |
|
99 /** |
|
100 * From CEikDialog, respond to softkey inputs. |
|
101 * |
|
102 * @since S60 v3.1 |
|
103 * @para aButtonId, type of pressed Button or Softkey |
|
104 * @return TBool, ETrue if exit the dialog, otherwise EFalse. |
|
105 */ |
|
106 TBool OkToExitL( TInt aButtonId ); |
|
107 |
|
108 /** |
|
109 * Type of note shown or displayed |
|
110 */ |
|
111 const TInt iNoteType; |
|
112 private: // data |
|
113 |
|
114 /** |
|
115 * Progress dialog observer |
|
116 */ |
|
117 MDLProgressDlgObserver* iObserver; |
|
118 |
|
119 }; |
|
120 |
|
121 #endif // |
|
122 |
|
123 // End of file |
|