mmserv/metadatautility/Src/MetaDataParser.cpp
changeset 32 94fc26b6e006
parent 22 128eb6a32b84
child 53 eabc8c503852
equal deleted inserted replaced
31:8dfd592727cb 32:94fc26b6e006
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 
    20 
    21 // INCLUDE FILES
    21 // INCLUDE FILES
       
    22 #include "MetaDataParser.h"
    22 #include <syslangutil.h>
    23 #include <syslangutil.h>
    23 #include <languages.hrh>
    24 #include <languages.hrh>
    24 #include <TopCharacterSet.rsg>
    25 #include <TopCharacterSet.rsg>
    25 #include <data_caging_path_literals.hrh>
    26 #include <data_caging_path_literals.hrh>
       
    27 #include <stdlib.h>
    26 #include <bautils.h>
    28 #include <bautils.h>
    27 
    29 
    28 #include "MetaDataParser.h"
    30 #include "MetaDataParser.h"
    29 #include "MetaDataSourceFile.h"
    31 #include "MetaDataSourceFile.h"
    30 #include "MetaDataFieldContainer.h"
    32 #include "MetaDataFieldContainer.h"
    31 
    33 
    32 _LIT(KCharacterSetRscFile, "TopCharacterSet.rsc");
    34 _LIT(KCharacterSetRscFile, "TopCharacterSet.rsc");
    33 
       
    34 
    35 
    35 // ============================ MEMBER FUNCTIONS ===============================
    36 // ============================ MEMBER FUNCTIONS ===============================
    36 
    37 
    37 // -----------------------------------------------------------------------------
    38 // -----------------------------------------------------------------------------
    38 // CMetaDataParser::CMetaDataParser
    39 // CMetaDataParser::CMetaDataParser
   171 void CMetaDataParser::MapID3GenreToStringL(TInt aNum, TDes& aGenrePtr)
   172 void CMetaDataParser::MapID3GenreToStringL(TInt aNum, TDes& aGenrePtr)
   172 {
   173 {
   173 #ifdef _DEBUG
   174 #ifdef _DEBUG
   174      RDebug::Print(_L("CMetaDataParser::MapID3GenreToStringL"));
   175      RDebug::Print(_L("CMetaDataParser::MapID3GenreToStringL"));
   175 #endif
   176 #endif
   176    		switch(aNum)
   177     
       
   178 	if(aNum < 0 || aNum > 125 && aNum != 199)
       
   179 		{
       
   180 		return;
       
   181 		}
       
   182 	switch(aNum)
   177 			{
   183 			{
   178 				case 0:
   184 				case 0:
   179 					aGenrePtr.Append(KGenreBlues);
   185 					aGenrePtr.Append(KGenreBlues);
   180 					break;
   186 					break;
   181 				case 1:
   187 				case 1:
   568 void CMetaDataParser::MapID3GenreToStringL(TInt aNum, TDes8& aGenrePtr)
   574 void CMetaDataParser::MapID3GenreToStringL(TInt aNum, TDes8& aGenrePtr)
   569 {
   575 {
   570 #ifdef _DEBUG
   576 #ifdef _DEBUG
   571      RDebug::Print(_L("CMetaDataParser::MapID3GenreToStringL"));
   577      RDebug::Print(_L("CMetaDataParser::MapID3GenreToStringL"));
   572 #endif
   578 #endif
   573 		switch(aNum)
   579 
       
   580 	if(aNum < 0 || aNum > 125 && aNum != 199)
       
   581 		{
       
   582 		return;
       
   583 		}
       
   584 	switch(aNum)
   574 			{
   585 			{
   575 				case 0:
   586 				case 0:
   576 					aGenrePtr.Append(KGenreBlues);
   587 					aGenrePtr.Append(KGenreBlues);
   577 					break;
   588 					break;
   578 				case 1:
   589 				case 1:
  1246 			return ETrue;
  1257 			return ETrue;
  1247 			}
  1258 			}
  1248 		}
  1259 		}
  1249 	return EFalse;
  1260 	return EFalse;
  1250 	}
  1261 	}
  1251 
  1262 // -----------------------------------------------------------------------------
       
  1263 // CMetaDataParser::SetID32Offset()
       
  1264 // -----------------------------------------------------------------------------
       
  1265 //
       
  1266 void CMetaDataParser::SetID32Offset( TUint aOffset )
       
  1267     {
       
  1268     iID32Offset = aOffset;
       
  1269     }
       
  1270 
       
  1271 // -----------------------------------------------------------------------------
       
  1272 // CMetaDataParser::ID32Offset()
       
  1273 // -----------------------------------------------------------------------------
       
  1274 //
       
  1275 TUint CMetaDataParser::ID32Offset()
       
  1276     {
       
  1277     return iID32Offset;
       
  1278     }
  1252 
  1279 
  1253 // -----------------------------------------------------------------------------
  1280 // -----------------------------------------------------------------------------
  1254 // CMetaDataParser::CommonParseL
  1281 // CMetaDataParser::CommonParseL
  1255 // -----------------------------------------------------------------------------
  1282 // -----------------------------------------------------------------------------
  1256 //
  1283 //