javamanager/javabackup/midp2backup/src.s60/javastoragebackuputil.cpp
changeset 49 35baca0e7a2e
parent 21 2a9601315dfc
child 67 63b81d807542
equal deleted inserted replaced
35:85266cc22c7f 49:35baca0e7a2e
    17 
    17 
    18 
    18 
    19 #include "javastoragebackuputil.h"
    19 #include "javastoragebackuputil.h"
    20 #include "midp2backupplugin.h"
    20 #include "midp2backupplugin.h"
    21 #include "midp2backupdataids.h"
    21 #include "midp2backupdataids.h"
       
    22 #include "mediaidupdater.h"
    22 
    23 
    23 #include "javastorageentry.h"
    24 #include "javastorageentry.h"
    24 #include "javastorage.h"
    25 #include "javastorage.h"
    25 #include "javastoragenames.h"
    26 #include "javastoragenames.h"
    26 
    27 
   168         if (err != KErrNone)
   169         if (err != KErrNone)
   169         {
   170         {
   170             CleanupStack::PopAndDestroy(&aStream);
   171             CleanupStack::PopAndDestroy(&aStream);
   171             User::Leave(KErrGeneral);
   172             User::Leave(KErrGeneral);
   172         }
   173         }
       
   174 
       
   175         // ensure that storage contains correct removable media ids
       
   176         MediaIdUpdater updater;
       
   177         updater.update();
   173 
   178 
   174         // Storage restore is over; Set state to EAppArc
   179         // Storage restore is over; Set state to EAppArc
   175         aRestoreState = EAppArc;
   180         aRestoreState = EAppArc;
   176         aBufferSpaceLeft = iBufferSpaceLeft;
   181         aBufferSpaceLeft = iBufferSpaceLeft;
   177     }
   182     }
   879             attribute.setEntry(VALID_CERTS, iStringVector[count++]);
   884             attribute.setEntry(VALID_CERTS, iStringVector[count++]);
   880             insertEntry.insert(attribute);
   885             insertEntry.insert(attribute);
   881 
   886 
   882             attribute.setEntry(ON_SCREEN_KEYPAD, iStringVector[count++]);
   887             attribute.setEntry(ON_SCREEN_KEYPAD, iStringVector[count++]);
   883             insertEntry.insert(attribute);
   888             insertEntry.insert(attribute);
       
   889             
       
   890             attribute.setEntry(SECURITY_WARNINGS, iStringVector[count++]);
       
   891             insertEntry.insert(attribute);
   884 
   892 
   885             try
   893             try
   886             {
   894             {
   887                 js->write(MIDP_PACKAGE_TABLE, insertEntry);
   895                 js->write(MIDP_PACKAGE_TABLE, insertEntry);
   888                 ILOG(EBackup, "Writing to table succeded");
   896                 ILOG(EBackup, "Writing to table succeded");
  1618         if (findIterator != (*applications).end())
  1626         if (findIterator != (*applications).end())
  1619         {
  1627         {
  1620             str = (*findIterator).entryValue();
  1628             str = (*findIterator).entryValue();
  1621         }
  1629         }
  1622         iStringVector.push_back(str);
  1630         iStringVector.push_back(str);
       
  1631         
       
  1632         attribute.setEntry(SECURITY_WARNINGS, L"");
       
  1633         str = emptyString;
       
  1634         findIterator = (*applications).find(attribute);
       
  1635 
       
  1636         if (findIterator != (*applications).end())
       
  1637         {
       
  1638             str = (*findIterator).entryValue();
       
  1639         }
       
  1640         iStringVector.push_back(str);
  1623 
  1641 
  1624         rowsCount++;
  1642         rowsCount++;
  1625     }
  1643     }
  1626     ILOG1(EBackup, "for loop crossed with i = %d", rowsCount);
  1644     ILOG1(EBackup, "for loop crossed with i = %d", rowsCount);
  1627     return rowsCount;
  1645     return rowsCount;