harvester/harvesterplugins/WMVPlugin/src/harvesterwmvplugin.cpp
branchRCL_3
changeset 8 6752808b2036
parent 0 c53acadfccc6
child 15 3cebc1a84278
child 21 50bf9db68373
--- a/harvester/harvesterplugins/WMVPlugin/src/harvesterwmvplugin.cpp	Tue Feb 02 00:24:33 2010 +0200
+++ b/harvester/harvesterplugins/WMVPlugin/src/harvesterwmvplugin.cpp	Fri Feb 19 23:14:48 2010 +0200
@@ -122,6 +122,24 @@
     }
 
 // ---------------------------------------------------------------------------
+// CHarvesterWMVPlugin::GetMimeType (from CHarvesterPlugin)
+// ---------------------------------------------------------------------------
+//    
+void CHarvesterWMVPlugin::GetMimeType( const TDesC& aUri, TDes& aMimeType )
+    {
+    aMimeType.Zero();
+    
+    ContentAccess::CContent* content = NULL;
+    
+    TRAPD( err, content = ContentAccess::CContent::NewL( aUri ) );
+    if (err == KErrNone) 
+        {
+        err = content->GetStringAttribute( ContentAccess::EMimeType, aMimeType );
+        delete content;
+        }
+    }
+
+// ---------------------------------------------------------------------------
 // Default constructor
 // ---------------------------------------------------------------------------
 //
@@ -204,9 +222,9 @@
     	// File size
     	CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, 
     			*iPropDefs->iSizePropertyDef, &aClipDetails.iFileSize, aIsAdd );
+        // Mime Type
+        CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, 
+                *iPropDefs->iItemTypePropertyDef, &aClipDetails.iMimeType, aIsAdd );
     	}
+    }
 
-    // Mime Type
-    CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, 
-    		*iPropDefs->iItemTypePropertyDef, &aClipDetails.iMimeType, aIsAdd );
-    }