|
1 /* |
|
2 * Copyright (c) 2008-2009 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: Updation via IAD |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef GLXIADUPDATE_H_ |
|
20 #define GLXIADUPDATE_H_ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include <e32base.h> |
|
25 #include <iaupdateobserver.h> |
|
26 |
|
27 // CONSTANTS |
|
28 // None |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CIAUpdate; |
|
32 class CIAUpdateParameters; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 |
|
37 class CGlxIadUpdate : public CBase, public MIAUpdateObserver |
|
38 { |
|
39 |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 IMPORT_C static CGlxIadUpdate* NewL(); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CGlxIadUpdate(); |
|
51 |
|
52 public: // New methods |
|
53 |
|
54 /** |
|
55 * Start IAD update process. |
|
56 */ |
|
57 IMPORT_C void StartL(); |
|
58 |
|
59 private: // Constructors and destructor |
|
60 |
|
61 /** |
|
62 * C++ default constructor. |
|
63 */ |
|
64 CGlxIadUpdate(); |
|
65 |
|
66 /** |
|
67 * By default Symbian 2nd phase constructor is private. |
|
68 */ |
|
69 void ConstructL(); |
|
70 |
|
71 private: // New methods |
|
72 |
|
73 |
|
74 /** |
|
75 * From MIAUpdateObserver. |
|
76 * This callback function is called when the update checking operation has completed. |
|
77 * |
|
78 * @param aErrorCode The error code of the observed update operation. |
|
79 * KErrNone for successful completion, |
|
80 * otherwise a system wide error code. |
|
81 * @param aAvailableUpdates Number of the updates that were found available. |
|
82 * |
|
83 * @since S60 v3.2 |
|
84 */ |
|
85 void CheckUpdatesComplete( TInt aErrorCode, TInt aAvailableUpdates ); |
|
86 |
|
87 |
|
88 /** |
|
89 * From MIAUpdateObserver. |
|
90 * This callback function is called when an update operation has completed. |
|
91 * Even if multiple functions are provided to start different update operations, |
|
92 * this callback function is always called after an update operation has completed. |
|
93 * |
|
94 * @param aErrorCode The error code of the completed update operation. |
|
95 * KErrNone for successful completion, |
|
96 * otherwise a system wide error code. |
|
97 * @param aResult Details about the completed update operation. |
|
98 * Ownership is transferred. |
|
99 * |
|
100 * @since S60 v3.2 |
|
101 */ |
|
102 void UpdateComplete( TInt aErrorCode, CIAUpdateResult* aResultDetails ); |
|
103 |
|
104 |
|
105 /** |
|
106 * From MIAUpdateObserver. |
|
107 * This callback function is called when an update query operation has completed. |
|
108 * |
|
109 * @param aErrorCode The error code of the observed query operation. |
|
110 * KErrNone for successful completion, |
|
111 * otherwise a system wide error code. |
|
112 * @param aUpdateNow ETrue informs that an update operation should be started. |
|
113 * EFalse informs that there is no need to start an update |
|
114 * operation. |
|
115 * @since Series 60 3.2 |
|
116 */ |
|
117 void UpdateQueryComplete( TInt aErrorCode, TBool aUpdateNow ); |
|
118 |
|
119 |
|
120 /** |
|
121 * Clears IAD update. |
|
122 * @since Series 60 3.2 |
|
123 * @param none. |
|
124 * @return none. |
|
125 */ |
|
126 void ReleaseIADUpdate(); |
|
127 |
|
128 private: // Data |
|
129 |
|
130 |
|
131 /** |
|
132 * IAD update API. |
|
133 */ |
|
134 CIAUpdate* iUpdate; |
|
135 |
|
136 /** |
|
137 * IAD update parameters. |
|
138 */ |
|
139 CIAUpdateParameters* iParameters; |
|
140 |
|
141 |
|
142 }; |
|
143 |
|
144 #endif /* GLXIADUPDATE_H_ */ |