|
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 #include <QtGlobal> |
|
18 #include <QMetaType> |
|
19 #include <QStringList> |
|
20 |
|
21 #include "cauninstallnotifier.h" |
|
22 #include "cauninstallnotifier_p.h" |
|
23 #include "casoftwareregistry.h" |
|
24 #include "casoftwareregistry_p.h" |
|
25 |
|
26 |
|
27 /* |
|
28 Constructor |
|
29 \param servicePublic Pointer to object of the public class. |
|
30 */ |
|
31 CaSoftwareRegistryPrivate::CaSoftwareRegistryPrivate(CaSoftwareRegistry *servicePublic) : |
|
32 m_q(servicePublic) |
|
33 { |
|
34 } |
|
35 |
|
36 /* |
|
37 Destructor. |
|
38 */ |
|
39 CaSoftwareRegistryPrivate::~CaSoftwareRegistryPrivate() |
|
40 { |
|
41 } |
|
42 |
|
43 /*! |
|
44 Provides details needed for uninstalling process of Java applications |
|
45 (windows stub). |
|
46 \param[in] componentId component id of an application to be uninstalled. |
|
47 \param[out] componentName a name of the component. |
|
48 \param[out] applicationsUids a list of uids of applications in the package |
|
49 of the given component id. |
|
50 \param[out] confirmationMessage optional deletion confirmation message, |
|
51 null string means the lack of the message. |
|
52 \retval true if there is no error. |
|
53 */ |
|
54 bool CaSoftwareRegistryPrivate::getUninstallDetails(int componentId, |
|
55 QString &componentName, |
|
56 QStringList &applicationsUids, |
|
57 QString &confirmationMessage) |
|
58 { |
|
59 Q_UNUSED(componentId); |
|
60 componentName.clear(); |
|
61 applicationsUids.clear(); |
|
62 confirmationMessage.clear(); |
|
63 return true; |
|
64 } |
|
65 |
|
66 /*! |
|
67 Provides a list of uids of applications installed by the given package |
|
68 (windows stub). |
|
69 \param[in] componentId component id of an application to be uninstalled. |
|
70 \param[out] applicationsUids a list of uids of applications in the package |
|
71 of the given component id. |
|
72 \retval true if there is no error. |
|
73 */ |
|
74 bool CaSoftwareRegistryPrivate::getApplicationsUids(int componentId, |
|
75 QStringList &applicationsUids) |
|
76 { |
|
77 Q_UNUSED(componentId); |
|
78 applicationsUids.clear(); |
|
79 return true; |
|
80 } |
|
81 |
|
82 /* |
|
83 Stub for windows development. |
|
84 \param Component id. |
|
85 \return Map with dummy entries when component id is greater than 0, otherwise |
|
86 empty map. |
|
87 */ |
|
88 CaSoftwareRegistryPrivate::DetailMap CaSoftwareRegistryPrivate::entryDetails( |
|
89 int componentId) const |
|
90 { |
|
91 CaSoftwareRegistry::DetailMap detailMap; |
|
92 |
|
93 if (componentId >=1) { |
|
94 detailMap[CaSoftwareRegistry::componentNameKey()] = "no data"; |
|
95 detailMap[CaSoftwareRegistry::componentVersionKey()] = "no data"; |
|
96 detailMap[CaSoftwareRegistry::componentVendorKey()] = "no data"; |
|
97 detailMap[CaSoftwareRegistry::componentProtectionDomainKey()] = "no data"; |
|
98 detailMap[CaSoftwareRegistry::componentDriveInfoKey()] = "no data"; |
|
99 detailMap[CaSoftwareRegistry::componentSizeKey()] = "no data"; |
|
100 detailMap[CaSoftwareRegistry::componentTypeKey()] = "no data"; |
|
101 detailMap[CaSoftwareRegistry::componentDescriptionKey()] = "no data"; |
|
102 } |
|
103 return detailMap; |
|
104 } |
|
105 |
|
106 /*! |
|
107 \param entry Software registry entry providing details. |
|
108 \return Map with details for the component represented by \entry. |
|
109 */ |
|
110 QList<CaSoftwareRegistryPrivate::DetailMap> |
|
111 CaSoftwareRegistryPrivate::retrieveLogEntries() const |
|
112 { |
|
113 QList<CaSoftwareRegistryPrivate::DetailMap> logList; |
|
114 DetailMap logMap; |
|
115 logMap[CaSoftwareRegistry::componentNameKey()] = "no data"; |
|
116 logMap[CaSoftwareRegistry::componentVersionKey()] = "no data"; |
|
117 logMap[CaSoftwareRegistry::componentTimeKey()] = "no data"; |
|
118 logMap[CaSoftwareRegistry::componentOperationTypeKey()] = "no data"; |
|
119 logList.append(logMap); |
|
120 return logList; |
|
121 } |
|
122 |
|
123 /*! |
|
124 Creating uninstall notifier |
|
125 \return CaUninstallNotifier instance |
|
126 */ |
|
127 CaUninstallNotifier *CaSoftwareRegistryPrivate::createUninstallNotifier() const |
|
128 { |
|
129 return CaUninstallNotifier::notifier(); |
|
130 } |