1 /* |
1 /* |
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
22 |
22 |
23 // INCLUDES |
23 // INCLUDES |
24 #include <e32base.h> |
24 #include <e32base.h> |
25 #include <f32file.h> |
25 #include <f32file.h> |
26 #include <barsc.h> |
26 #include <barsc.h> |
27 #include <AknGlobalNote.h> |
27 |
|
28 #include <hbdeviceprogressdialogsymbian.h> |
28 |
29 |
29 // FORWARD DECLARATIONS |
30 // FORWARD DECLARATIONS |
30 class MIAUpdaterCancelObserver; |
31 class MIAUpdaterCancelObserver; |
31 |
|
32 /** |
32 /** |
33 * Class for showing the global note dialog when installing self update. |
33 * Class for showing the global note dialog when installing self update. |
34 * |
|
35 * @code |
|
36 * @endcode |
|
37 * @lib |
|
38 * @since S60 |
|
39 */ |
34 */ |
40 class CIAUpdaterDialog : public CActive |
35 class CIAUpdaterDialog : public CBase, |
|
36 public MHbDeviceProgressDialogObserver |
41 { |
37 { |
42 public: |
38 public: |
43 |
39 |
44 /** |
40 /** |
45 * Two-phased constructor. |
41 * Two-phased constructor. |
46 */ |
42 */ |
47 static CIAUpdaterDialog* NewL( RFs& aFs, MIAUpdaterCancelObserver& aObserver ); |
43 static CIAUpdaterDialog* NewL( MIAUpdaterCancelObserver& aObserver ); |
48 |
|
49 /** |
44 /** |
50 * Two-phased constructor. |
45 * Two-phased constructor. |
51 */ |
46 */ |
52 static CIAUpdaterDialog* NewLC( RFs& aFs, MIAUpdaterCancelObserver& aObserver ); |
47 static CIAUpdaterDialog* NewLC( MIAUpdaterCancelObserver& aObserver ); |
53 |
48 |
54 |
49 |
55 /** |
50 /** |
56 * Destructor. |
51 * Destructor. |
57 */ |
52 */ |
72 /** |
67 /** |
73 * Cancel global waiting note (after installing). |
68 * Cancel global waiting note (after installing). |
74 */ |
69 */ |
75 void CancelWaitingNoteL(); |
70 void CancelWaitingNoteL(); |
76 |
71 |
|
72 /** |
|
73 * From base class MHbDeviceProgressDialogObserver |
|
74 */ |
|
75 void ProgressDialogCancelled( |
|
76 const CHbDeviceProgressDialogSymbian* aProgressDialog); |
|
77 |
|
78 /** |
|
79 * From base class MHbDeviceProgressDialogObserver |
|
80 */ |
|
81 void ProgressDialogClosed( |
|
82 const CHbDeviceProgressDialogSymbian* aProgressDialog); |
|
83 |
|
84 |
77 |
85 |
78 private: |
86 private: |
79 |
87 |
80 /** |
88 /** |
81 * Constructor. |
89 * Constructor. |
82 */ |
90 */ |
83 CIAUpdaterDialog( RFs& aFs, MIAUpdaterCancelObserver& aObserver ); |
91 CIAUpdaterDialog( MIAUpdaterCancelObserver& aObserver ); |
84 |
92 |
85 /** |
93 /** |
86 * 2nd phase constructor. |
94 * 2nd phase constructor. |
87 */ |
95 */ |
88 void ConstructL(); |
96 void ConstructL(); |
89 |
97 |
90 |
98 |
91 /** |
99 /** |
92 * Read resource string. |
100 * Destroy wait note. |
93 * @since |
|
94 * @param aResourceId Id of the resource. |
|
95 * @return Resource buffer. |
|
96 */ |
101 */ |
97 HBufC* ReadResourceLC( TInt aResourceId ); |
102 void CIAUpdaterDialog::DestroyGlobalWaitNote(); |
98 |
103 |
99 private: // from CActive |
|
100 |
|
101 /** |
|
102 * Cancels async request |
|
103 * @see CActive::DoCancel |
|
104 * |
|
105 */ |
|
106 void DoCancel(); |
|
107 |
|
108 /** |
|
109 * When the server side has finished operation, the CActive object will |
|
110 * be informed about it, and as a result RunL will be called. This function |
|
111 * well inform the observer that the operation has been completed. |
|
112 * @see CActive::RunL |
|
113 * |
|
114 */ |
|
115 void RunL(); |
|
116 |
104 |
117 private: // data |
105 private: // data |
118 |
106 |
119 // Resource file. |
107 /** |
120 RResourceFile iResourceFile; |
108 * Not owned, install observer. |
121 |
109 */ |
122 // File server handle. |
110 MIAUpdaterCancelObserver* iObserver; |
123 RFs& iFs; |
111 /** |
124 |
112 * Own, Global wait note. |
125 CAknGlobalNote* iNote; |
113 */ |
|
114 CHbDeviceProgressDialogSymbian* iGlobalWaitNote; |
126 |
115 |
127 // Dialog id for canceling dialog. |
116 /** |
128 TInt iNoteId; |
117 * Own, resouce of global note. |
129 |
118 */ |
130 MIAUpdaterCancelObserver* iObserver; //not owned |
119 HBufC* iGlobalResource; |
|
120 |
|
121 /** |
|
122 * Check Load Success .ts file successfully or not |
|
123 */ |
|
124 TBool iIsResolverSuccess; |
131 |
125 |
132 }; |
126 }; |
133 |
127 |
134 #endif // CIAUPDATERDIALOG_H |
128 #endif // CIAUPDATERDIALOG_H |
135 |
129 |