|
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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CA_SOFTWARE_REGISTRY_H |
|
19 #define CA_SOFTWARE_REGISTRY_H |
|
20 |
|
21 #include <QHash> |
|
22 #include <QObject> |
|
23 #include <QSharedPointer> |
|
24 #include <QString> |
|
25 |
|
26 #include "caclient_global.h" |
|
27 |
|
28 //FORWARD DECLARATIONS |
|
29 class QStringList; |
|
30 class CaSoftwareRegistryPrivate; |
|
31 class CaUninstallNotifier; |
|
32 |
|
33 /** |
|
34 * Class provides Usif specific services |
|
35 */ |
|
36 class CACLIENT_EXPORT CaSoftwareRegistry: public QObject |
|
37 { |
|
38 |
|
39 Q_OBJECT |
|
40 |
|
41 explicit CaSoftwareRegistry(QObject *parent = 0); |
|
42 |
|
43 ~CaSoftwareRegistry(); |
|
44 |
|
45 public: |
|
46 |
|
47 static QSharedPointer<CaSoftwareRegistry> create(); |
|
48 |
|
49 typedef QHash<QString, QString> DetailMap; |
|
50 |
|
51 bool getUninstallDetails(int componentId, |
|
52 QString &componentName, |
|
53 QStringList &applicationsUids, |
|
54 QString &confirmationMessage); |
|
55 |
|
56 bool getApplicationsUids(int componentId, QStringList &applicationsUids); |
|
57 |
|
58 DetailMap entryDetails(int componentId) const; |
|
59 |
|
60 QList<DetailMap> retrieveLogEntries() const; |
|
61 |
|
62 CaUninstallNotifier *createUninstallNotifier() const; |
|
63 |
|
64 static QString componentNameKey(); |
|
65 static QString componentVersionKey(); |
|
66 static QString componentVendorKey(); |
|
67 static QString componentDriveInfoKey(); |
|
68 static QString componentProtectionDomainKey(); |
|
69 static QString componentSizeKey(); |
|
70 static QString componentTypeKey(); |
|
71 static QString componentDescriptionKey(); |
|
72 static QString componentTimeKey(); |
|
73 static QString componentOperationTypeKey(); |
|
74 static QString componentInstallValue(); |
|
75 static QString componentUninstallValue(); |
|
76 static QString componentUpgradeValue(); |
|
77 static QString componentHiddenValue(); |
|
78 private: |
|
79 /** |
|
80 * Pointer to a private implementation. |
|
81 */ |
|
82 CaSoftwareRegistryPrivate *const m_d; |
|
83 |
|
84 /** |
|
85 * The static pointer to the instance of CaSoftwareRegistry. |
|
86 */ |
|
87 static QWeakPointer<CaSoftwareRegistry> m_instance; |
|
88 |
|
89 friend class CaSoftwareRegistryPrivate; |
|
90 friend class QtSharedPointer::ExternalRefCount<CaSoftwareRegistry>; |
|
91 |
|
92 Q_DISABLE_COPY(CaSoftwareRegistry) |
|
93 |
|
94 }; |
|
95 |
|
96 #endif // CA_SOFTWARE_REGISTRY_H |