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