clfwrapper/ClientSrc/CCLFServerProxy.cpp
branchRCL_3
changeset 8 6752808b2036
parent 1 acef663c1218
child 14 646a02f170b9
equal deleted inserted replaced
3:b73a2e62868f 8:6752808b2036
    30 #include "mdsutils.h"
    30 #include "mdsutils.h"
    31 
    31 
    32 // CONSTANTS
    32 // CONSTANTS
    33 const TInt KCLFDefaultBufferLength( 64 );
    33 const TInt KCLFDefaultBufferLength( 64 );
    34 const TInt KCLFDefaultArrayGranularity( 4 );
    34 const TInt KCLFDefaultArrayGranularity( 4 );
    35 const TInt KCLFExtensionArrayGranularity( 49 );
    35 const TInt KCLFExtensionArrayGranularity( 50 );
    36 
    36 
    37 _LIT( KCLFDriveLetterFormatString, ":\\" );
    37 _LIT( KCLFDriveLetterFormatString, ":\\" );
    38 const TInt KCLFDriveC( 'C' );
    38 const TInt KCLFDriveC( 'C' );
    39 
    39 
    40 const TInt KDelayNotityCLFGetUpdateEventMaxTimes = 30;
    40 const TInt KDelayNotityCLFGetUpdateEventMaxTimes = 30;
    90 _LIT( KExtensionRmvb,  "rmvb" );
    90 _LIT( KExtensionRmvb,  "rmvb" );
    91 _LIT( KExtensionRam,   "ram" );
    91 _LIT( KExtensionRam,   "ram" );
    92 _LIT( KExtensionRv,    "rv" );
    92 _LIT( KExtensionRv,    "rv" );
    93 _LIT( KExtensionWmv,    "wmv" );
    93 _LIT( KExtensionWmv,    "wmv" );
    94 _LIT( KExtensionAvi,    "avi" );
    94 _LIT( KExtensionAvi,    "avi" );
       
    95 _LIT( KExtensionDivx,    "divx" );
    95 
    96 
    96 // ======== MEMBER FUNCTIONS ========
    97 // ======== MEMBER FUNCTIONS ========
    97 
    98 
    98 // -----------------------------------------------------------------------------
    99 // -----------------------------------------------------------------------------
    99 // CItemsDeletedHandler::CUpdateItemsHandler
   100 // CItemsDeletedHandler::CUpdateItemsHandler
   731 // CUpdateFoldersHandler::IsSupportedType
   732 // CUpdateFoldersHandler::IsSupportedType
   732 // -----------------------------------------------------------------------------
   733 // -----------------------------------------------------------------------------
   733 //
   734 //
   734 TBool CUpdateFoldersHandler::IsSupportedType( const TDesC& aExtension )
   735 TBool CUpdateFoldersHandler::IsSupportedType( const TDesC& aExtension )
   735     {
   736     {
   736     TCollationMethod m = *Mem::CollationMethodByIndex( 0 );
   737     TInt pos( 0 );
   737     m.iFlags = ( TCollationMethod::EIgnoreNone | TCollationMethod::EFoldCase );   
   738     if ( iExtensionArray->FindIsq( aExtension, pos ) == 0 ) // found
   738     
   739         {
   739     for( TInt i( 0 ); i < iExtensionArray->Count(); i++ )
   740         return ETrue;
   740         {
       
   741         const TDesC& ext = iExtensionArray->MdcaPoint( i );
       
   742         if ( ext.CompareC( aExtension, 3, &m ) == 0 )
       
   743             {
       
   744             return ETrue;
       
   745             }
       
   746         }
   741         }
   747     return EFalse;
   742     return EFalse;
   748     }
   743     }
   749 
   744 
   750 // -----------------------------------------------------------------------------
   745 // -----------------------------------------------------------------------------
  1236 // -----------------------------------------------------------------------------
  1231 // -----------------------------------------------------------------------------
  1237 //
  1232 //
  1238 void CCLFServerProxy::PopulateSupportedExtensionL()
  1233 void CCLFServerProxy::PopulateSupportedExtensionL()
  1239     {
  1234     {
  1240     iExtensionArray = new ( ELeave ) CDesCArraySeg( KCLFExtensionArrayGranularity );
  1235     iExtensionArray = new ( ELeave ) CDesCArraySeg( KCLFExtensionArrayGranularity );
  1241     iExtensionArray->AppendL( KExtensionMp3 );
  1236     iExtensionArray->InsertIsqL( KExtensionMp3 );
  1242     iExtensionArray->AppendL( KExtensionAac );
  1237     iExtensionArray->InsertIsqL( KExtensionAac );
  1243     iExtensionArray->AppendL( KExtensionAmr );
  1238     iExtensionArray->InsertIsqL( KExtensionAmr );
  1244     iExtensionArray->AppendL( KExtensionAwb );
  1239     iExtensionArray->InsertIsqL( KExtensionAwb );
  1245     iExtensionArray->AppendL( KExtensionMid );
  1240     iExtensionArray->InsertIsqL( KExtensionMid );
  1246     iExtensionArray->AppendL( KExtensionMidi );
  1241     iExtensionArray->InsertIsqL( KExtensionMidi );
  1247     iExtensionArray->AppendL( KExtensionSpMid );
  1242     iExtensionArray->InsertIsqL( KExtensionSpMid );
  1248     iExtensionArray->AppendL( KExtensionRng );
  1243     iExtensionArray->InsertIsqL( KExtensionRng );
  1249     iExtensionArray->AppendL( KExtensionMxmf );
  1244     iExtensionArray->InsertIsqL( KExtensionMxmf );
  1250     iExtensionArray->AppendL( KExtensionWav );
  1245     iExtensionArray->InsertIsqL( KExtensionWav );
  1251     iExtensionArray->AppendL( KExtensionAu );
  1246     iExtensionArray->InsertIsqL( KExtensionAu );
  1252     iExtensionArray->AppendL( KExtensionNrt );
  1247     iExtensionArray->InsertIsqL( KExtensionNrt );
  1253     iExtensionArray->AppendL( KExtensionWma );
  1248     iExtensionArray->InsertIsqL( KExtensionWma );
  1254     iExtensionArray->AppendL( KExtensionRa );
  1249     iExtensionArray->InsertIsqL( KExtensionRa );
  1255     
  1250     
  1256     iExtensionArray->AppendL( KExtJpg );
  1251     iExtensionArray->InsertIsqL( KExtJpg );
  1257     iExtensionArray->AppendL( KExtJpeg );
  1252     iExtensionArray->InsertIsqL( KExtJpeg );
  1258     iExtensionArray->AppendL( KExtJp2 );
  1253     iExtensionArray->InsertIsqL( KExtJp2 );
  1259     iExtensionArray->AppendL( KExtJ2k );
  1254     iExtensionArray->InsertIsqL( KExtJ2k );
  1260     iExtensionArray->AppendL( KExtJpx );
  1255     iExtensionArray->InsertIsqL( KExtJpx );
  1261     iExtensionArray->AppendL( KExtJpf );
  1256     iExtensionArray->InsertIsqL( KExtJpf );
  1262     iExtensionArray->AppendL( KExtMbm );
  1257     iExtensionArray->InsertIsqL( KExtMbm );
  1263     iExtensionArray->AppendL( KExtPng );
  1258     iExtensionArray->InsertIsqL( KExtPng );
  1264     iExtensionArray->AppendL( KExtGif );
  1259     iExtensionArray->InsertIsqL( KExtGif );
  1265     iExtensionArray->AppendL( KExtBmp );
  1260     iExtensionArray->InsertIsqL( KExtBmp );
  1266     iExtensionArray->AppendL( KExtTif );
  1261     iExtensionArray->InsertIsqL( KExtTif );
  1267     iExtensionArray->AppendL( KExtTiff );
  1262     iExtensionArray->InsertIsqL( KExtTiff );
  1268     iExtensionArray->AppendL( KExtOta );
  1263     iExtensionArray->InsertIsqL( KExtOta );
  1269     iExtensionArray->AppendL( KExtWbmp );
  1264     iExtensionArray->InsertIsqL( KExtWbmp );
  1270     iExtensionArray->AppendL( KExtWmf );
  1265     iExtensionArray->InsertIsqL( KExtWmf );
  1271     iExtensionArray->AppendL( KExtOtb );
  1266     iExtensionArray->InsertIsqL( KExtOtb );
  1272     
  1267     
  1273     iExtensionArray->AppendL( KExtOma1 );
  1268     iExtensionArray->InsertIsqL( KExtOma1 );
  1274     iExtensionArray->AppendL( KExtOma2 );
  1269     iExtensionArray->InsertIsqL( KExtOma2 );
  1275     iExtensionArray->AppendL( KExtOma3 );
  1270     iExtensionArray->InsertIsqL( KExtOma3 );
  1276     iExtensionArray->AppendL( KExtOma4 );
  1271     iExtensionArray->InsertIsqL( KExtOma4 );
  1277     iExtensionArray->AppendL( KExtOma5 );
  1272     iExtensionArray->InsertIsqL( KExtOma5 );
  1278     
  1273     
  1279     iExtensionArray->AppendL( KExtensionMp4 );
  1274     iExtensionArray->InsertIsqL( KExtensionMp4 );
  1280     iExtensionArray->AppendL( KExtensionMpg4 );
  1275     iExtensionArray->InsertIsqL( KExtensionMpg4 );
  1281     iExtensionArray->AppendL( KExtensionMpeg4 );
  1276     iExtensionArray->InsertIsqL( KExtensionMpeg4 );
  1282     iExtensionArray->AppendL( KExtensionM4v );
  1277     iExtensionArray->InsertIsqL( KExtensionM4v );
  1283     iExtensionArray->AppendL( KExtensionM4a );
  1278     iExtensionArray->InsertIsqL( KExtensionM4a );
  1284     iExtensionArray->AppendL( KExtension3gp );
  1279     iExtensionArray->InsertIsqL( KExtension3gp );
  1285     iExtensionArray->AppendL( KExtension3gpp );
  1280     iExtensionArray->InsertIsqL( KExtension3gpp );
  1286     iExtensionArray->AppendL( KExtension3g2 );
  1281     iExtensionArray->InsertIsqL( KExtension3g2 );
  1287     iExtensionArray->AppendL( KExtensionRm );
  1282     iExtensionArray->InsertIsqL( KExtensionRm );
  1288     iExtensionArray->AppendL( KExtensionRmvb );
  1283     iExtensionArray->InsertIsqL( KExtensionRmvb );
  1289     iExtensionArray->AppendL( KExtensionRam );
  1284     iExtensionArray->InsertIsqL( KExtensionRam );
  1290     iExtensionArray->AppendL( KExtensionRv );
  1285     iExtensionArray->InsertIsqL( KExtensionRv );
  1291     iExtensionArray->AppendL( KExtensionWmv );
  1286     iExtensionArray->InsertIsqL( KExtensionWmv );
  1292     iExtensionArray->AppendL( KExtensionAvi );
  1287     iExtensionArray->InsertIsqL( KExtensionAvi );
       
  1288     iExtensionArray->InsertIsqL( KExtensionDivx );
  1293     }
  1289     }
  1294 
  1290 
  1295 //  End of File
  1291 //  End of File