1 /* |
1 /* |
2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2007 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 |
27 #include <AknGlobalNote.h> |
28 #include <hbdeviceprogressdialogsymbian.h> |
|
29 |
28 |
30 // FORWARD DECLARATIONS |
29 // FORWARD DECLARATIONS |
31 class MIAUpdaterCancelObserver; |
30 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 |
34 */ |
39 */ |
35 class CIAUpdaterDialog : public CBase, |
40 class CIAUpdaterDialog : public CActive |
36 public MHbDeviceProgressDialogObserver |
|
37 { |
41 { |
38 public: |
42 public: |
39 |
43 |
40 /** |
44 /** |
41 * Two-phased constructor. |
45 * Two-phased constructor. |
42 */ |
46 */ |
43 static CIAUpdaterDialog* NewL( MIAUpdaterCancelObserver& aObserver ); |
47 static CIAUpdaterDialog* NewL( RFs& aFs, MIAUpdaterCancelObserver& aObserver ); |
|
48 |
44 /** |
49 /** |
45 * Two-phased constructor. |
50 * Two-phased constructor. |
46 */ |
51 */ |
47 static CIAUpdaterDialog* NewLC( MIAUpdaterCancelObserver& aObserver ); |
52 static CIAUpdaterDialog* NewLC( RFs& aFs, MIAUpdaterCancelObserver& aObserver ); |
48 |
53 |
49 |
54 |
50 /** |
55 /** |
51 * Destructor. |
56 * Destructor. |
52 */ |
57 */ |
67 /** |
72 /** |
68 * Cancel global waiting note (after installing). |
73 * Cancel global waiting note (after installing). |
69 */ |
74 */ |
70 void CancelWaitingNoteL(); |
75 void CancelWaitingNoteL(); |
71 |
76 |
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 |
|
85 |
77 |
86 private: |
78 private: |
87 |
79 |
88 /** |
80 /** |
89 * Constructor. |
81 * Constructor. |
90 */ |
82 */ |
91 CIAUpdaterDialog( MIAUpdaterCancelObserver& aObserver ); |
83 CIAUpdaterDialog( RFs& aFs, MIAUpdaterCancelObserver& aObserver ); |
92 |
84 |
93 /** |
85 /** |
94 * 2nd phase constructor. |
86 * 2nd phase constructor. |
95 */ |
87 */ |
96 void ConstructL(); |
88 void ConstructL(); |
97 |
89 |
98 |
90 |
99 /** |
91 /** |
100 * Destroy wait note. |
92 * Read resource string. |
|
93 * @since |
|
94 * @param aResourceId Id of the resource. |
|
95 * @return Resource buffer. |
101 */ |
96 */ |
102 void CIAUpdaterDialog::DestroyGlobalWaitNote(); |
97 HBufC* ReadResourceLC( TInt aResourceId ); |
103 |
98 |
|
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(); |
104 |
116 |
105 private: // data |
117 private: // data |
106 |
118 |
107 /** |
119 // Resource file. |
108 * Not owned, install observer. |
120 RResourceFile iResourceFile; |
109 */ |
121 |
110 MIAUpdaterCancelObserver* iObserver; |
122 // File server handle. |
111 /** |
123 RFs& iFs; |
112 * Own, Global wait note. |
124 |
113 */ |
125 CAknGlobalNote* iNote; |
114 CHbDeviceProgressDialogSymbian* iGlobalWaitNote; |
|
115 |
126 |
116 /** |
127 // Dialog id for canceling dialog. |
117 * Own, resouce of global note. |
128 TInt iNoteId; |
118 */ |
129 |
119 HBufC* iGlobalResource; |
130 MIAUpdaterCancelObserver* iObserver; //not owned |
120 |
|
121 /** |
|
122 * Check Load Success .ts file successfully or not |
|
123 */ |
|
124 TBool iIsResolverSuccess; |
|
125 |
131 |
126 }; |
132 }; |
127 |
133 |
128 #endif // CIAUPDATERDIALOG_H |
134 #endif // CIAUPDATERDIALOG_H |
129 |
135 |