harvester/blacklistserver/src/blacklistserver.cpp
changeset 1 acef663c1218
parent 0 c53acadfccc6
child 8 6752808b2036
equal deleted inserted replaced
0:c53acadfccc6 1:acef663c1218
    21 #include "blacklistitem.h"
    21 #include "blacklistitem.h"
    22 #include "harvesterlog.h"
    22 #include "harvesterlog.h"
    23 #include "mdssqliteconnection.h"
    23 #include "mdssqliteconnection.h"
    24 #include "mdcserializationbuffer.h"
    24 #include "mdcserializationbuffer.h"
    25 
    25 
    26 #include <PathInfo.h>
    26 #include <pathinfo.h>
    27 
    27 
    28 // Security policy
    28 // Security policy
    29 const TUint KServerPolicyRangeCount = 6;
    29 const TUint KServerPolicyRangeCount = 6;
    30 // Database file without the drive letter
    30 // Database file without the drive letter
    31 _LIT( KBlacklistDatabaseFile, ":[2001B2EB]blacklistdb.sq" );
    31 _LIT( KBlacklistDatabaseFile, ":[2001B2EB]blacklistdb.sq" );
   152 
   152 
   153 void CBlacklistServer::ConstructL()
   153 void CBlacklistServer::ConstructL()
   154     {
   154     {
   155     WRITELOG( "CBlacklistServer::ConstructL - begin" );
   155     WRITELOG( "CBlacklistServer::ConstructL - begin" );
   156 
   156 
   157     TInt error = Start( KBlacklistServerName );
   157     const TInt error = Start( KBlacklistServerName );
   158 
   158 
   159     if ( error != KErrNone )
   159     if ( error != KErrNone )
   160         {
   160         {
   161         __ASSERT_DEBUG( EFalse, User::Panic( KBlacklistServerName, error ));
   161         __ASSERT_DEBUG( EFalse, User::Panic( KBlacklistServerName, error ));
   162         }
   162         }
   472         const TUint32 aMediaId )
   472         const TUint32 aMediaId )
   473     {
   473     {
   474 
   474 
   475     WRITELOG( "CBlacklistServer::RemoveFromMemoryTable - begin" );
   475     WRITELOG( "CBlacklistServer::RemoveFromMemoryTable - begin" );
   476 
   476 
   477     TInt index = GetMemoryTableIndex( aUri, aMediaId );
   477     const TInt index = GetMemoryTableIndex( aUri, aMediaId );
   478     if ( index >= 0 )
   478     if ( index >= 0 )
   479         {
   479         {
   480         CBlacklistItem * item = iBlacklistMemoryTable[index];
   480         CBlacklistItem * item = iBlacklistMemoryTable[index];
   481         delete item;
   481         delete item;
   482         iBlacklistMemoryTable.Remove( index );
   482         iBlacklistMemoryTable.Remove( index );