contentstorage/casoftwareregistry/s60/src/casoftwareregistry_p.cpp
author hgs
Fri, 11 Jun 2010 16:13:51 +0300
changeset 98 d2f833ab7940
parent 96 5d243a69bdda
child 99 7aaf39b772ac
permissions -rw-r--r--
201023
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
94
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
 * All rights reserved.
hgs
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
 *
hgs
parents:
diff changeset
     9
 * Initial Contributors:
hgs
parents:
diff changeset
    10
 * Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
 *
hgs
parents:
diff changeset
    12
 * Contributors:
hgs
parents:
diff changeset
    13
 *
hgs
parents:
diff changeset
    14
 * Description:  ?Description
hgs
parents:
diff changeset
    15
 *
hgs
parents:
diff changeset
    16
 */
98
hgs
parents: 96
diff changeset
    17
#include <HbParameterLengthLimiter>
94
hgs
parents:
diff changeset
    18
#include <QMetaType>
hgs
parents:
diff changeset
    19
#include <QScopedPointer>
98
hgs
parents: 96
diff changeset
    20
#include <QStringList>
94
hgs
parents:
diff changeset
    21
hgs
parents:
diff changeset
    22
#include <usif/scr/scr.h>
hgs
parents:
diff changeset
    23
#include <usif/scr/screntries.h>
hgs
parents:
diff changeset
    24
#include <xqconversions.h>
96
hgs
parents: 94
diff changeset
    25
#include <driveinfo.h>
94
hgs
parents:
diff changeset
    26
hgs
parents:
diff changeset
    27
#include "casoftwareregistry.h"
hgs
parents:
diff changeset
    28
#include "casoftwareregistry_p.h"
hgs
parents:
diff changeset
    29
hgs
parents:
diff changeset
    30
using namespace Usif;
hgs
parents:
diff changeset
    31
98
hgs
parents: 96
diff changeset
    32
_LIT(KConfirmMessageKey, "MIDlet-Delete-Confirm");
hgs
parents: 96
diff changeset
    33
94
hgs
parents:
diff changeset
    34
template <typename RClass>
hgs
parents:
diff changeset
    35
struct RClassDeleter
hgs
parents:
diff changeset
    36
{
hgs
parents:
diff changeset
    37
    static inline void cleanup(RClass *ptr)
hgs
parents:
diff changeset
    38
    {
hgs
parents:
diff changeset
    39
        ptr->Close();
hgs
parents:
diff changeset
    40
    }
hgs
parents:
diff changeset
    41
};
hgs
parents:
diff changeset
    42
hgs
parents:
diff changeset
    43
typedef QScopedPointer<RSoftwareComponentRegistry, 
hgs
parents:
diff changeset
    44
    RClassDeleter<RSoftwareComponentRegistry> > ScrScopedPointer;
96
hgs
parents: 94
diff changeset
    45
    
hgs
parents: 94
diff changeset
    46
typedef QScopedPointer<RFs, 
hgs
parents: 94
diff changeset
    47
    RClassDeleter<RFs> > RFSScopedPointer;
94
hgs
parents:
diff changeset
    48
/*!
hgs
parents:
diff changeset
    49
 Constructor
hgs
parents:
diff changeset
    50
 \param servicePublic Pointer to object of the public class.
hgs
parents:
diff changeset
    51
 */
hgs
parents:
diff changeset
    52
CaSoftwareRegistryPrivate::CaSoftwareRegistryPrivate(
hgs
parents:
diff changeset
    53
    CaSoftwareRegistry *servicePublic):
hgs
parents:
diff changeset
    54
    m_q(servicePublic)
hgs
parents:
diff changeset
    55
{
hgs
parents:
diff changeset
    56
}
hgs
parents:
diff changeset
    57
hgs
parents:
diff changeset
    58
/*!
hgs
parents:
diff changeset
    59
 Destructor.
hgs
parents:
diff changeset
    60
 */
hgs
parents:
diff changeset
    61
CaSoftwareRegistryPrivate::~CaSoftwareRegistryPrivate()
hgs
parents:
diff changeset
    62
{
hgs
parents:
diff changeset
    63
}
hgs
parents:
diff changeset
    64
hgs
parents:
diff changeset
    65
/*!
98
hgs
parents: 96
diff changeset
    66
 Provides details needed for uninstalling process of Java applications.
hgs
parents: 96
diff changeset
    67
 \param[in] componentId component id of an application to be uninstalled.
hgs
parents: 96
diff changeset
    68
 \param[out] componentName a name of the component.
hgs
parents: 96
diff changeset
    69
 \param[out] applicationsUids a list of uids of applications in the package
hgs
parents: 96
diff changeset
    70
      of the given component id.
hgs
parents: 96
diff changeset
    71
 \param[out] confirmationMessage optional deletion confirmation message,
hgs
parents: 96
diff changeset
    72
      null string means the lack of the message.
hgs
parents: 96
diff changeset
    73
 \retval true if there is no error.
hgs
parents: 96
diff changeset
    74
 */
hgs
parents: 96
diff changeset
    75
hgs
parents: 96
diff changeset
    76
bool CaSoftwareRegistryPrivate::getUninstallDetails(int componentId,
hgs
parents: 96
diff changeset
    77
    QString &componentName,
hgs
parents: 96
diff changeset
    78
    QStringList &applicationsUids,
hgs
parents: 96
diff changeset
    79
    QString &confirmationMessage)
hgs
parents: 96
diff changeset
    80
{
hgs
parents: 96
diff changeset
    81
    TRAPD(error, getUninstallDetailsL(componentId,
hgs
parents: 96
diff changeset
    82
        componentName,
hgs
parents: 96
diff changeset
    83
        applicationsUids,
hgs
parents: 96
diff changeset
    84
        confirmationMessage)
hgs
parents: 96
diff changeset
    85
         );
hgs
parents: 96
diff changeset
    86
    return error == KErrNone;
hgs
parents: 96
diff changeset
    87
}
hgs
parents: 96
diff changeset
    88
hgs
parents: 96
diff changeset
    89
/*!
hgs
parents: 96
diff changeset
    90
 Provides a list of uids of applications installed by the given package.
hgs
parents: 96
diff changeset
    91
 \param[in] componentId component id of an application to be uninstalled.
hgs
parents: 96
diff changeset
    92
 \param[out] applicationsUids a list of uids of applications in the package
hgs
parents: 96
diff changeset
    93
      of the given component id.
hgs
parents: 96
diff changeset
    94
 \retval true if there is no error.
hgs
parents: 96
diff changeset
    95
 */
hgs
parents: 96
diff changeset
    96
hgs
parents: 96
diff changeset
    97
bool CaSoftwareRegistryPrivate::getApplicationsUids(int componentId,
hgs
parents: 96
diff changeset
    98
    QStringList &applicationsUids)
hgs
parents: 96
diff changeset
    99
{
hgs
parents: 96
diff changeset
   100
    TRAPD(error, getApplicationsUidsL(componentId, applicationsUids));
hgs
parents: 96
diff changeset
   101
    return error == KErrNone;
hgs
parents: 96
diff changeset
   102
}
hgs
parents: 96
diff changeset
   103
hgs
parents: 96
diff changeset
   104
/*!
hgs
parents: 96
diff changeset
   105
 Provides details needed for uninstalling process of Java applications
hgs
parents: 96
diff changeset
   106
   (leaving version).
hgs
parents: 96
diff changeset
   107
 \param[in] componentId component id of an application to be uninstalled.
hgs
parents: 96
diff changeset
   108
 \param[out] componentName a name of the component.
hgs
parents: 96
diff changeset
   109
 \param[out] applicationsUids a list of uids of applications in the package
hgs
parents: 96
diff changeset
   110
      of the given component id.
hgs
parents: 96
diff changeset
   111
 \param[out] confirmationMessage optional deletion confirmation message,
hgs
parents: 96
diff changeset
   112
      null string means the lack of the message.
hgs
parents: 96
diff changeset
   113
 */
hgs
parents: 96
diff changeset
   114
void CaSoftwareRegistryPrivate::getUninstallDetailsL(int componentId,
hgs
parents: 96
diff changeset
   115
    QString &componentName,
hgs
parents: 96
diff changeset
   116
    QStringList &appUids,
hgs
parents: 96
diff changeset
   117
    QString &confirmationMessage)
hgs
parents: 96
diff changeset
   118
{
hgs
parents: 96
diff changeset
   119
    componentName.clear();
hgs
parents: 96
diff changeset
   120
    appUids.clear();
hgs
parents: 96
diff changeset
   121
    confirmationMessage.clear();
hgs
parents: 96
diff changeset
   122
hgs
parents: 96
diff changeset
   123
    if (componentId >= 1) {
hgs
parents: 96
diff changeset
   124
        TComponentId componentIdValue(componentId);
hgs
parents: 96
diff changeset
   125
        RArray<TUid> appUidsArray;
hgs
parents: 96
diff changeset
   126
        CleanupClosePushL(appUidsArray);
hgs
parents: 96
diff changeset
   127
        CLocalizablePropertyEntry *confirmationMessageProperty = NULL;
hgs
parents: 96
diff changeset
   128
hgs
parents: 96
diff changeset
   129
        RSoftwareComponentRegistry softwareComponentRegistry;
hgs
parents: 96
diff changeset
   130
        CleanupClosePushL(softwareComponentRegistry);
hgs
parents: 96
diff changeset
   131
        User::LeaveIfError(softwareComponentRegistry.Connect());
hgs
parents: 96
diff changeset
   132
hgs
parents: 96
diff changeset
   133
        CComponentEntry *entry = CComponentEntry::NewLC();
hgs
parents: 96
diff changeset
   134
        softwareComponentRegistry.GetComponentL(componentId, *entry);
hgs
parents: 96
diff changeset
   135
        softwareComponentRegistry.GetAppUidsForComponentL(componentIdValue,
hgs
parents: 96
diff changeset
   136
            appUidsArray);
hgs
parents: 96
diff changeset
   137
hgs
parents: 96
diff changeset
   138
        CPropertyEntry *confirmationProperty =
hgs
parents: 96
diff changeset
   139
            softwareComponentRegistry.GetComponentPropertyL(componentId,
hgs
parents: 96
diff changeset
   140
            KConfirmMessageKey);
hgs
parents: 96
diff changeset
   141
        if (confirmationProperty &&
hgs
parents: 96
diff changeset
   142
            confirmationProperty->PropertyType() ==
hgs
parents: 96
diff changeset
   143
                CPropertyEntry::ELocalizedProperty) {
hgs
parents: 96
diff changeset
   144
            confirmationMessageProperty =
hgs
parents: 96
diff changeset
   145
                static_cast<CLocalizablePropertyEntry *>(
hgs
parents: 96
diff changeset
   146
                    confirmationProperty);
hgs
parents: 96
diff changeset
   147
        } else {
hgs
parents: 96
diff changeset
   148
            delete confirmationProperty;
hgs
parents: 96
diff changeset
   149
            confirmationProperty = NULL;
hgs
parents: 96
diff changeset
   150
        }
hgs
parents: 96
diff changeset
   151
hgs
parents: 96
diff changeset
   152
        QT_TRYCATCH_LEAVING(componentName =
hgs
parents: 96
diff changeset
   153
            XQConversions::s60DescToQString(entry->Name());
hgs
parents: 96
diff changeset
   154
            for (TInt i = 0; i<appUidsArray.Count(); i++) {
hgs
parents: 96
diff changeset
   155
                appUids.append(QString::number(appUidsArray[i].iUid));
hgs
parents: 96
diff changeset
   156
            }
hgs
parents: 96
diff changeset
   157
            if (confirmationMessageProperty) {
hgs
parents: 96
diff changeset
   158
                confirmationMessage = XQConversions::s60DescToQString(
hgs
parents: 96
diff changeset
   159
                    confirmationMessageProperty->StrValue());
hgs
parents: 96
diff changeset
   160
            }
hgs
parents: 96
diff changeset
   161
        );
hgs
parents: 96
diff changeset
   162
hgs
parents: 96
diff changeset
   163
        CleanupStack::PopAndDestroy(3, &appUidsArray);
hgs
parents: 96
diff changeset
   164
    }
hgs
parents: 96
diff changeset
   165
}
hgs
parents: 96
diff changeset
   166
hgs
parents: 96
diff changeset
   167
/*!
hgs
parents: 96
diff changeset
   168
 Provides details needed for uninstalling process of Java applications
hgs
parents: 96
diff changeset
   169
   (leaving version).
hgs
parents: 96
diff changeset
   170
 \param[in] componentId component id of an application to be uninstalled.
hgs
parents: 96
diff changeset
   171
 \param[out] applicationsUids a list of uids of applications in the package
hgs
parents: 96
diff changeset
   172
      of the given component id.
hgs
parents: 96
diff changeset
   173
 */
hgs
parents: 96
diff changeset
   174
void CaSoftwareRegistryPrivate::getApplicationsUidsL(int componentId,
hgs
parents: 96
diff changeset
   175
    QStringList &appUids)
hgs
parents: 96
diff changeset
   176
{
hgs
parents: 96
diff changeset
   177
    appUids.clear();
hgs
parents: 96
diff changeset
   178
    if (componentId >= 1) {
hgs
parents: 96
diff changeset
   179
        TComponentId componentIdValue(componentId);
hgs
parents: 96
diff changeset
   180
        RArray<TUid> appUidsArray;
hgs
parents: 96
diff changeset
   181
        CleanupClosePushL(appUidsArray);
hgs
parents: 96
diff changeset
   182
hgs
parents: 96
diff changeset
   183
        RSoftwareComponentRegistry softwareComponentRegistry;
hgs
parents: 96
diff changeset
   184
        CleanupClosePushL(softwareComponentRegistry);
hgs
parents: 96
diff changeset
   185
        User::LeaveIfError(softwareComponentRegistry.Connect());
hgs
parents: 96
diff changeset
   186
hgs
parents: 96
diff changeset
   187
        softwareComponentRegistry.GetAppUidsForComponentL(componentIdValue,
hgs
parents: 96
diff changeset
   188
            appUidsArray);
hgs
parents: 96
diff changeset
   189
hgs
parents: 96
diff changeset
   190
        QT_TRYCATCH_LEAVING(
hgs
parents: 96
diff changeset
   191
            for (TInt i = 0; i<appUidsArray.Count(); i++) {
hgs
parents: 96
diff changeset
   192
                appUids.append(QString::number(appUidsArray[i].iUid));
hgs
parents: 96
diff changeset
   193
            }
hgs
parents: 96
diff changeset
   194
        );
hgs
parents: 96
diff changeset
   195
        CleanupStack::PopAndDestroy(2, &appUidsArray);
hgs
parents: 96
diff changeset
   196
    }
hgs
parents: 96
diff changeset
   197
}
hgs
parents: 96
diff changeset
   198
hgs
parents: 96
diff changeset
   199
/*!
94
hgs
parents:
diff changeset
   200
 \param componentId Component id of the entry which details are requested for.
hgs
parents:
diff changeset
   201
 \return Map of component details if component id was greater than 0 or
hgs
parents:
diff changeset
   202
 empty map otherwise. 
hgs
parents:
diff changeset
   203
 */
hgs
parents:
diff changeset
   204
CaSoftwareRegistryPrivate::DetailMap CaSoftwareRegistryPrivate::entryDetails(
hgs
parents:
diff changeset
   205
    int componentId) const
hgs
parents:
diff changeset
   206
{
hgs
parents:
diff changeset
   207
    CaSoftwareRegistry::DetailMap result;
hgs
parents:
diff changeset
   208
hgs
parents:
diff changeset
   209
    if (componentId >= 1) {
96
hgs
parents: 94
diff changeset
   210
        RSoftwareComponentRegistry softwareComponentRegistry;
hgs
parents: 94
diff changeset
   211
        ScrScopedPointer scr(&softwareComponentRegistry);
98
hgs
parents: 96
diff changeset
   212
        if (scr->Connect() == KErrNone) {
hgs
parents: 96
diff changeset
   213
            
hgs
parents: 96
diff changeset
   214
            QScopedPointer<CComponentEntry> entry;
hgs
parents: 96
diff changeset
   215
            
hgs
parents: 96
diff changeset
   216
            QT_TRAP_THROWING(entry.reset(CComponentEntry::NewL()));
hgs
parents: 96
diff changeset
   217
            
hgs
parents: 96
diff changeset
   218
            TBool resultCode = EFalse;
hgs
parents: 96
diff changeset
   219
            TRAPD(leaveCode, resultCode = scr->GetComponentL(componentId, *entry));
hgs
parents: 96
diff changeset
   220
            if (leaveCode == KErrNone && resultCode) {
hgs
parents: 96
diff changeset
   221
                result = entryDetails(*entry);
hgs
parents: 96
diff changeset
   222
            }
hgs
parents: 96
diff changeset
   223
        }
94
hgs
parents:
diff changeset
   224
    }
hgs
parents:
diff changeset
   225
    
hgs
parents:
diff changeset
   226
    return result;
hgs
parents:
diff changeset
   227
}
hgs
parents:
diff changeset
   228
hgs
parents:
diff changeset
   229
/*!
hgs
parents:
diff changeset
   230
 \param entry Software registry entry providing details.
hgs
parents:
diff changeset
   231
 \return Map with details for the component represented by \entry.
hgs
parents:
diff changeset
   232
 */
hgs
parents:
diff changeset
   233
CaSoftwareRegistryPrivate::DetailMap CaSoftwareRegistryPrivate::entryDetails(
hgs
parents:
diff changeset
   234
    const CComponentEntry& entry) const
hgs
parents:
diff changeset
   235
{
hgs
parents:
diff changeset
   236
    CaSoftwareRegistry::DetailMap detailMap;
hgs
parents:
diff changeset
   237
    
hgs
parents:
diff changeset
   238
    detailMap[CaSoftwareRegistry::componentNameKey()] = 
hgs
parents:
diff changeset
   239
        XQConversions::s60DescToQString(entry.Name());
hgs
parents:
diff changeset
   240
        
hgs
parents:
diff changeset
   241
    detailMap[CaSoftwareRegistry::componentVersionKey()] = 
hgs
parents:
diff changeset
   242
        XQConversions::s60DescToQString(entry.Version());
hgs
parents:
diff changeset
   243
    
hgs
parents:
diff changeset
   244
    detailMap[CaSoftwareRegistry::componentVendorKey()] = 
hgs
parents:
diff changeset
   245
        XQConversions::s60DescToQString(entry.Vendor());
hgs
parents:
diff changeset
   246
        
hgs
parents:
diff changeset
   247
    QString drives;
98
hgs
parents: 96
diff changeset
   248
    QString drv;
hgs
parents: 96
diff changeset
   249
    TChar drive;    
96
hgs
parents: 94
diff changeset
   250
    
94
hgs
parents:
diff changeset
   251
    const TInt driveListLen(entry.InstalledDrives().Length());
hgs
parents:
diff changeset
   252
    for (TInt i( 0 ); i < driveListLen; ++i) {
hgs
parents:
diff changeset
   253
        if (entry.InstalledDrives()[i] != '\0') {
96
hgs
parents: 94
diff changeset
   254
            
94
hgs
parents:
diff changeset
   255
            if (!drives.isEmpty()) {
hgs
parents:
diff changeset
   256
                drives = drives.append(",");
98
hgs
parents: 96
diff changeset
   257
            }  
hgs
parents: 96
diff changeset
   258
            drv = QString(QChar('A'+ i)).append(":");
hgs
parents: 96
diff changeset
   259
            if(DriveInfo::GetDefaultDrive(
hgs
parents: 96
diff changeset
   260
                    DriveInfo::EDefaultPhoneMemory, drive ) == KErrNone 
96
hgs
parents: 94
diff changeset
   261
                    && QChar('A'+ i) == QChar(drive))
hgs
parents: 94
diff changeset
   262
                {
98
hgs
parents: 96
diff changeset
   263
                drives = drives.append(
hgs
parents: 96
diff changeset
   264
                        HbParameterLengthLimiter("txt_applib_dialog_1_device_memory").arg(
hgs
parents: 96
diff changeset
   265
                          QString(QChar('A'+ i)).append(":")));
96
hgs
parents: 94
diff changeset
   266
                }
98
hgs
parents: 96
diff changeset
   267
            else if(DriveInfo::GetDefaultDrive(
hgs
parents: 96
diff changeset
   268
                    DriveInfo::EDefaultMassStorage, drive ) == KErrNone 
96
hgs
parents: 94
diff changeset
   269
                    && QChar('A'+ i) == QChar(drive))
hgs
parents: 94
diff changeset
   270
                {
98
hgs
parents: 96
diff changeset
   271
                drives = drives.append(
hgs
parents: 96
diff changeset
   272
                        HbParameterLengthLimiter("txt_applib_dialog_1_mass_storage").arg(
hgs
parents: 96
diff changeset
   273
                          QString(QChar('A'+ i)).append(":")));
96
hgs
parents: 94
diff changeset
   274
                }
98
hgs
parents: 96
diff changeset
   275
            else if(DriveInfo::GetDefaultDrive(
hgs
parents: 96
diff changeset
   276
                    DriveInfo::EDefaultRemovableMassStorage, drive ) == KErrNone 
96
hgs
parents: 94
diff changeset
   277
                    && QChar('A'+ i) == QChar(drive))
hgs
parents: 94
diff changeset
   278
                {
hgs
parents: 94
diff changeset
   279
                RFs fs;
hgs
parents: 94
diff changeset
   280
                RFSScopedPointer fSPointer(&fs);
98
hgs
parents: 96
diff changeset
   281
                if (fs.Connect() == KErrNone) {
hgs
parents: 96
diff changeset
   282
                    TInt driveNumber;
hgs
parents: 96
diff changeset
   283
                    TVolumeInfo tv;
hgs
parents: 96
diff changeset
   284
                    DriveInfo::GetDefaultDrive(
hgs
parents: 96
diff changeset
   285
                            DriveInfo::EDefaultRemovableMassStorage, driveNumber );
hgs
parents: 96
diff changeset
   286
                    qt_symbian_throwIfError(fs.Volume(tv, driveNumber));
hgs
parents: 96
diff changeset
   287
                    if(tv.iName.Length()) { 
hgs
parents: 96
diff changeset
   288
                        drives = drives.append(
hgs
parents: 96
diff changeset
   289
                                HbParameterLengthLimiter("txt_applib_dialog_1_2").arg(
hgs
parents: 96
diff changeset
   290
                                   QString(QChar('A'+ i)).append(":")).arg(
hgs
parents: 96
diff changeset
   291
                                           XQConversions::s60DescToQString(tv.iName)));                       
hgs
parents: 96
diff changeset
   292
                    }
hgs
parents: 96
diff changeset
   293
                    else {
hgs
parents: 96
diff changeset
   294
                        drives = drives.append(
hgs
parents: 96
diff changeset
   295
                            HbParameterLengthLimiter("txt_applib_dialog_1_memory_card").arg(
hgs
parents: 96
diff changeset
   296
                              QString(QChar('A'+ i)).append(":")));           
hgs
parents: 96
diff changeset
   297
                    }
96
hgs
parents: 94
diff changeset
   298
                }
98
hgs
parents: 96
diff changeset
   299
            } else {
96
hgs
parents: 94
diff changeset
   300
                drives = drives.append(QChar('A'+ i)).append(":");   
hgs
parents: 94
diff changeset
   301
            }
94
hgs
parents:
diff changeset
   302
        }
hgs
parents:
diff changeset
   303
    }
hgs
parents:
diff changeset
   304
    
hgs
parents:
diff changeset
   305
    detailMap[CaSoftwareRegistry::componentDriveInfoKey()] = drives;
98
hgs
parents: 96
diff changeset
   306
    
hgs
parents: 96
diff changeset
   307
hgs
parents: 96
diff changeset
   308
    static const TInt64 KKilo = 1024;
hgs
parents: 96
diff changeset
   309
    static const TInt64 KMega = KKilo * KKilo;
hgs
parents: 96
diff changeset
   310
    if(entry.ComponentSize() >= KMega) {
hgs
parents: 96
diff changeset
   311
        detailMap[CaSoftwareRegistry::componentSizeKey()] = 
hgs
parents: 96
diff changeset
   312
            HbParameterLengthLimiter("txt_applib_dialog_l1_mb").arg(QString().setNum(
hgs
parents: 96
diff changeset
   313
                    static_cast<double>(entry.ComponentSize() / KMega)));
hgs
parents: 96
diff changeset
   314
    }
hgs
parents: 96
diff changeset
   315
    else {
hgs
parents: 96
diff changeset
   316
        detailMap[CaSoftwareRegistry::componentSizeKey()] = 
hgs
parents: 96
diff changeset
   317
            HbParameterLengthLimiter("txt_applib_dialog_l1_kb").arg(QString().setNum(
hgs
parents: 96
diff changeset
   318
                    static_cast<double>(entry.ComponentSize() / KKilo)));
hgs
parents: 96
diff changeset
   319
    }
hgs
parents: 96
diff changeset
   320
94
hgs
parents:
diff changeset
   321
    
hgs
parents:
diff changeset
   322
    detailMap[CaSoftwareRegistry::componentTypeKey()] = 
hgs
parents:
diff changeset
   323
        XQConversions::s60DescToQString(entry.SoftwareType());
hgs
parents:
diff changeset
   324
hgs
parents:
diff changeset
   325
    return detailMap;
hgs
parents:
diff changeset
   326
}