contentstorage/casoftwareregistry/s60/src/casoftwareregistry_p.cpp
changeset 116 305818acdca4
parent 107 b34d53f6acdf
child 119 50e220be30d1
equal deleted inserted replaced
112:dbfb5e38438b 116:305818acdca4
    32 #include "casoftwareregistry_p.h"
    32 #include "casoftwareregistry_p.h"
    33 #include "cadefs.h"
    33 #include "cadefs.h"
    34 #include "caarraycleanup.inl"
    34 #include "caarraycleanup.inl"
    35 
    35 
    36 using namespace Usif;
    36 using namespace Usif;
    37 
       
    38 _LIT(KConfirmMessageKey, "MIDlet-Delete-Confirm");
    37 _LIT(KConfirmMessageKey, "MIDlet-Delete-Confirm");
    39 _LIT(KCaScrPropertyDomainCategory, "Domain-Category");
    38 _LIT(KCaScrPropertyDomainCategory, "Domain-Category");
    40 _LIT(KCaScrPropertyMidletDescryption, "MIDlet-Description");
    39 _LIT(KCaScrPropertyMidletDescryption, "MIDlet-Description");
    41 const int maxLogsCount = 20;  // should be 50 - workaround for 
    40 _LIT(KNotNamedMmc, "NO NAME");
       
    41 const int maxLogsCount = 20;  // should be 50 - workaround for
    42 // ou1cimx1#476143 Dialog crash when label contains big amount of lines
    42 // ou1cimx1#476143 Dialog crash when label contains big amount of lines
    43 
    43 
    44 /*!
    44 /*!
    45  Constructor
    45  Constructor
    46  \param servicePublic Pointer to object of the public class.
    46  \param servicePublic Pointer to object of the public class.
    54 /*!
    54 /*!
    55  Destructor.
    55  Destructor.
    56  */
    56  */
    57 CaSoftwareRegistryPrivate::~CaSoftwareRegistryPrivate()
    57 CaSoftwareRegistryPrivate::~CaSoftwareRegistryPrivate()
    58 {
    58 {
    59     
    59 
    60 }
    60 }
    61 
    61 
    62 /*!
    62 /*!
    63  Provides details needed for uninstalling process of Java applications.
    63  Provides details needed for uninstalling process of Java applications.
    64  \param[in] componentId component id of an application to be uninstalled.
    64  \param[in] componentId component id of an application to be uninstalled.
   288 
   288 
   289             if (!drives.isEmpty()) {
   289             if (!drives.isEmpty()) {
   290                 drives = drives.append(",");
   290                 drives = drives.append(",");
   291             }
   291             }
   292             drv = QString(QChar('A'+ i)).append(":");
   292             drv = QString(QChar('A'+ i)).append(":");
   293             if(DriveInfo::GetDefaultDrive(
   293             if (DriveInfo::GetDefaultDrive(
   294                     DriveInfo::EDefaultPhoneMemory, drive ) == KErrNone
   294                     DriveInfo::EDefaultPhoneMemory, drive ) == KErrNone
   295                     && QChar('A'+ i) == QChar(drive)) {
   295                     && QChar('A'+ i) == QChar(drive)) {
   296                 drives = drives.append(HbParameterLengthLimiter(
   296                 drives = drives.append(HbParameterLengthLimiter(
   297                         "txt_applib_dialog_1_device_memory").arg(
   297                         "txt_applib_dialog_1_device_memory").arg(
   298                                 QString(QChar('A'+ i))));
   298                                 QString(QChar('A'+ i))));
   299             } else if(DriveInfo::GetDefaultDrive(
   299             } else if (DriveInfo::GetDefaultDrive(
   300                     DriveInfo::EDefaultMassStorage, drive ) == KErrNone
   300                     DriveInfo::EDefaultMassStorage, drive ) == KErrNone
   301                     && QChar('A'+ i) == QChar(drive)) {
   301                     && QChar('A'+ i) == QChar(drive)) {
   302                 drives = drives.append(HbParameterLengthLimiter(
   302                 drives = drives.append(HbParameterLengthLimiter(
   303                         "txt_applib_dialog_1_mass_storage").arg(
   303                         "txt_applib_dialog_1_mass_storage").arg(
   304                                 QString(QChar('A'+ i))));
   304                                 QString(QChar('A'+ i))));
   305                 } else if(DriveInfo::GetDefaultDrive(
   305                 } else if (DriveInfo::GetDefaultDrive(
   306                     DriveInfo::EDefaultRemovableMassStorage, drive ) == KErrNone
   306                     DriveInfo::EDefaultRemovableMassStorage, drive ) == KErrNone
   307                     && QChar('A'+ i) == QChar(drive)) {
   307                     && QChar('A'+ i) == QChar(drive)) {
   308                 RFs fs;
   308                 RFs fs;
   309                 CleanupClosePushL(fs);
   309                 CleanupClosePushL(fs);
   310                 if (fs.Connect() == KErrNone) {
   310                 if (fs.Connect() == KErrNone) {
   312                     TVolumeInfo tv;
   312                     TVolumeInfo tv;
   313                     DriveInfo::GetDefaultDrive(
   313                     DriveInfo::GetDefaultDrive(
   314                             DriveInfo::EDefaultRemovableMassStorage,
   314                             DriveInfo::EDefaultRemovableMassStorage,
   315                             driveNumber );
   315                             driveNumber );
   316                     User::LeaveIfError(fs.Volume(tv, driveNumber));
   316                     User::LeaveIfError(fs.Volume(tv, driveNumber));
   317                     if(tv.iName.Length()) {
   317                     if (tv.iName.Length()
       
   318                             && tv.iName.Compare(KNotNamedMmc) != KErrNone) {
   318                         drives = drives.append(HbParameterLengthLimiter(
   319                         drives = drives.append(HbParameterLengthLimiter(
   319                                 "txt_applib_dialog_1_2").arg(
   320                                 "txt_applib_dialog_1_2").arg(
   320                                         QString(QChar('A'+ i))).arg(
   321                                         QString(QChar('A'+ i))).arg(
   321                                                 XQConversions::s60DescToQString(
   322                                                 XQConversions::s60DescToQString(
   322                                                         tv.iName)));
   323                                                         tv.iName)));