mmserv/metadatautility/Src/MetaDataParser.cpp
changeset 16 43d09473c595
parent 0 71ca22bcf22a
child 18 2eb3b066cc7d
child 20 b67dd1fc57c5
--- a/mmserv/metadatautility/Src/MetaDataParser.cpp	Mon May 03 12:59:52 2010 +0300
+++ b/mmserv/metadatautility/Src/MetaDataParser.cpp	Fri May 14 16:22:35 2010 +0300
@@ -19,13 +19,16 @@
 
 
 // INCLUDE FILES
-#include "MetaDataParser.h"
 #include <syslangutil.h>
 #include <languages.hrh>
 #include <TopCharacterSet.rsg>
 #include <data_caging_path_literals.hrh>
 #include <bautils.h>
 
+#include "MetaDataParser.h"
+#include "MetaDataSourceFile.h"
+#include "MetaDataFieldContainer.h"
+
 _LIT(KCharacterSetRscFile, "TopCharacterSet.rsc");
 
 // ============================ MEMBER FUNCTIONS ===============================
@@ -121,6 +124,10 @@
 TInt CMetaDataParser::UnicodeBOM(
 	const TDesC8& aUnicode )
 	{
+#ifdef _DEBUG
+     RDebug::Print(_L("CMetaDataParser::UnicodeBOM"));
+#endif
+    
 	TPtrC8 bomData( aUnicode.Left( 2 ) );
 
 	TBuf8<2> BEbom; // Big endian BOM
@@ -162,6 +169,10 @@
 //
 void CMetaDataParser::MapID3GenreToStringL(TInt aNum, TDes& aGenrePtr)
 {
+#ifdef _DEBUG
+     RDebug::Print(_L("CMetaDataParser::MapID3GenreToStringL"));
+#endif
+    
 	if(aNum < 0 || aNum > 125 && aNum != 199)
 		{
 		return;
@@ -560,6 +571,10 @@
 //
 void CMetaDataParser::MapID3GenreToStringL(TInt aNum, TDes8& aGenrePtr)
 {
+#ifdef _DEBUG
+     RDebug::Print(_L("CMetaDataParser::MapID3GenreToStringL"));
+#endif
+
 	if(aNum < 0 || aNum > 125 && aNum != 199)
 		{
 		return;
@@ -1242,4 +1257,46 @@
 		}
 	return EFalse;
 	}
+
+
+// -----------------------------------------------------------------------------
+// CMetaDataParser::CommonParseL
+// -----------------------------------------------------------------------------
+//
+void CMetaDataParser::CommonParseL(
+    CMetaDataSourceFile* aSource,
+    const RArray<TMetaDataFieldId>& aWantedFields,
+    CMetaDataFieldContainer& aContainer )
+    {
+#ifdef _DEBUG
+     RDebug::Print(_L("CMetaDataParser::CommonParseL"));
+#endif
+
+    GetProtectedL(aSource, aContainer);
+    ParseL(aWantedFields, aContainer);
+    }
+
+// -----------------------------------------------------------------------------
+// CMetaDataParser::GetProtectedL
+// -----------------------------------------------------------------------------
+//
+void CMetaDataParser::GetProtectedL( CMetaDataSourceFile* aSource,
+        CMetaDataFieldContainer& aContainer )
+    {
+#ifdef _DEBUG
+     RDebug::Print(_L("CMetaDataParser::GetProtectedL"));
+#endif
+
+    TBool fileProtected = aSource->FileProtected();
+    TBuf16<5> desc16;
+    desc16.AppendNum(fileProtected);
+
+    aContainer.AppendL( EMetaDataProtected, desc16 );
+    
+#ifdef _DEBUG
+     RDebug::Print(_L("CMetaDataParser::GetProtectedL, Protected=%S "), &desc16);
+#endif
+    
+    }
+
 //  End of File