|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials re 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: Declaration of VideoIadUpdateWrapper |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: |
|
19 |
|
20 #ifndef __VIDEOIADUPDATEWRAPPER_H__ |
|
21 #define __VIDEOIADUPDATEWRAPPER_H__ |
|
22 |
|
23 #include <qobject.h> |
|
24 #include <iaupdateobserver.h> |
|
25 |
|
26 class CIAUpdate; |
|
27 class CIAUpdateParameters; |
|
28 class MMPXViewUtility; |
|
29 |
|
30 class VideoIadUpdateWrapper : public QObject, public MIAUpdateObserver |
|
31 { |
|
32 /** |
|
33 * Define to be able to use signals and slots. |
|
34 */ |
|
35 Q_OBJECT |
|
36 |
|
37 /** |
|
38 * Disable copy-constructor and assignment operator. |
|
39 */ |
|
40 Q_DISABLE_COPY(VideoIadUpdateWrapper) |
|
41 |
|
42 public: |
|
43 |
|
44 /** |
|
45 * Constructor |
|
46 */ |
|
47 VideoIadUpdateWrapper(); |
|
48 |
|
49 /** |
|
50 * Destructor |
|
51 */ |
|
52 virtual ~VideoIadUpdateWrapper(); |
|
53 |
|
54 /** |
|
55 * Starts the update process. |
|
56 */ |
|
57 void checkForUpdates(); |
|
58 |
|
59 private: // New methods |
|
60 |
|
61 /** |
|
62 * From MIAUpdateObserver. |
|
63 * This callback function is called when the update checking operation has completed. |
|
64 * |
|
65 * @param errorCode The error code of the observed update operation. |
|
66 * KErrNone for successful completion, |
|
67 * otherwise a system wide error code. |
|
68 * @param availableUpdates Number of the updates that were found available. |
|
69 * |
|
70 */ |
|
71 void CheckUpdatesComplete(TInt errorCode, TInt availableUpdates); |
|
72 |
|
73 /** |
|
74 * From MIAUpdateObserver. |
|
75 * This callback function is called when an update operation has completed. |
|
76 * Even if multiple functions re provided to start different update operations, |
|
77 * this callback function is always called after an update operation has completed. |
|
78 * |
|
79 * @param errorCode The error code of the completed update operation. |
|
80 * KErrNone for successful completion, |
|
81 * otherwise a system wide error code. |
|
82 * @param result Details about the completed update operation. |
|
83 * Ownership is transferred. |
|
84 * |
|
85 */ |
|
86 void UpdateComplete(TInt errorCode, CIAUpdateResult* resultDetails); |
|
87 |
|
88 /** |
|
89 * From MIAUpdateObserver. |
|
90 * This callback function is called when an update query operation has completed. |
|
91 * |
|
92 * @param errorCode The error code of the observed query operation. |
|
93 * KErrNone for successful completion, |
|
94 * otherwise a system wide error code. |
|
95 * @param updateNow ETrue informs that an update operation should be started. |
|
96 * EFalse informs that there is no need to start an update |
|
97 * operation. |
|
98 * |
|
99 */ |
|
100 void UpdateQueryComplete(TInt errorCode, TBool updateNow); |
|
101 |
|
102 private: |
|
103 |
|
104 void doCheckForUpdatesL(); |
|
105 |
|
106 void cleanup(); |
|
107 |
|
108 private: |
|
109 |
|
110 /** |
|
111 * IAD update API. |
|
112 */ |
|
113 CIAUpdate* mUpdate; |
|
114 |
|
115 /** |
|
116 * IAD update parameters. |
|
117 */ |
|
118 CIAUpdateParameters* mParameters; |
|
119 |
|
120 }; |
|
121 |
|
122 #endif // __VIDEOIADUPDATEWRAPPER_H__ |
|
123 |
|
124 // End of file. |