|
1 /* |
|
2 * Copyright (c) 2010 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: This file contains the header file of the IAUpdateServiceProvider class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef IAUPDATESERVICEPROVIDER_H |
|
21 #define IAUPDATESERVICEPROVIDER_H |
|
22 |
|
23 #include <QtCore/qmetaobject.h> |
|
24 #include <xqserviceprovider.h> |
|
25 |
|
26 class CIAUpdateParameters; |
|
27 class CIAUpdateResult; |
|
28 class IAUpdateEngine; |
|
29 |
|
30 class IAUpdateServiceProvider : public XQServiceProvider |
|
31 { |
|
32 Q_OBJECT |
|
33 |
|
34 public: |
|
35 |
|
36 enum RequestType |
|
37 { |
|
38 /** |
|
39 * No operation is going on. |
|
40 */ |
|
41 NoOperation, |
|
42 |
|
43 /** |
|
44 * Update check has been requested. |
|
45 */ |
|
46 CheckUpdates, |
|
47 |
|
48 /** |
|
49 * Show Update operation has been requested. |
|
50 */ |
|
51 ShowUpdates, |
|
52 |
|
53 /** |
|
54 * Update query has been requested. |
|
55 */ |
|
56 UpdateQuery, |
|
57 /** |
|
58 * Bring to foreground has been requested. |
|
59 */ |
|
60 BroughtToForeground |
|
61 }; |
|
62 |
|
63 |
|
64 IAUpdateServiceProvider(IAUpdateEngine& engine); |
|
65 ~IAUpdateServiceProvider(); |
|
66 |
|
67 public slots: |
|
68 void startedByLauncher(QString refreshFromNetworkDenied); |
|
69 void checkUpdates(QString stringWgId, |
|
70 QString stringUid, |
|
71 QString searchCriteria, |
|
72 QString commandLineExecutable, |
|
73 QString commandLineArguments, |
|
74 QString stringShowProgress, |
|
75 QString stringImportance, |
|
76 QString stringType, |
|
77 QString stringRefresh); |
|
78 void showUpdates(QString stringWgId, |
|
79 QString stringUid, |
|
80 QString searchCriteria, |
|
81 QString commandLineExecutable, |
|
82 QString commandLineArguments, |
|
83 QString stringShowProgress, |
|
84 QString stringImportance, |
|
85 QString stringType, |
|
86 QString stringRefresh); |
|
87 |
|
88 void updateQuery(QString stringWgId); |
|
89 |
|
90 private: |
|
91 |
|
92 void SetParams(CIAUpdateParameters& params, |
|
93 QString& stringUid, |
|
94 QString& searchCriteria, |
|
95 QString& commandLineExecutable, |
|
96 QString& commandLineArguments, |
|
97 QString& stringShowProgress, |
|
98 QString& stringImportance, |
|
99 QString& stringType, |
|
100 QString& stringRefresh) const; |
|
101 |
|
102 public: //temp |
|
103 |
|
104 void completeLauncherLaunch(int error); |
|
105 void completeCheckUpdates(int countOfAvailableUpdates, int error); |
|
106 void completeShowUpdates(const CIAUpdateResult* updateResult, int error); |
|
107 void completeUpdateQuery(bool updateNow, int error); |
|
108 |
|
109 private: |
|
110 |
|
111 IAUpdateEngine* mEngine; //not owned |
|
112 int mAsyncReqId; |
|
113 RequestType mCurrentRequest; |
|
114 }; |
|
115 |
|
116 #endif // IAUPDATESERVICEPROVIDER_H |
|
117 |
|
118 // End of File |