201031_01
authorhgs
Thu, 12 Aug 2010 21:07:10 +0530
changeset 90 8c545fea2798
parent 86 465613364af0
child 94 0e6c5a9328b5
201031_01
contentmgmt/contentaccessfwfordrm/source/reccaf/CafApaRecognizer.cpp
cryptoservices/certificateandkeymgmt/tx509/comparisontest.cpp
securityanddataprivacytools/securityconfig/ups/romstub/bld.inf
securityanddataprivacytools/securityconfig/ups/romstub/buildstub.mak
securityanddataprivacytools/securityconfig/ups/romstub/upsromstubsis.flm
securityanddataprivacytools/securityconfig/ups/romstub/upsromstubsis.xml
--- a/contentmgmt/contentaccessfwfordrm/source/reccaf/CafApaRecognizer.cpp	Thu Jul 22 20:18:20 2010 +0530
+++ b/contentmgmt/contentaccessfwfordrm/source/reccaf/CafApaRecognizer.cpp	Thu Aug 12 21:07:10 2010 +0530
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -227,36 +227,45 @@
 	else 
 		{
 		RFile* fileHandle = CApaCafRecognizer::FilePassedByHandleL();
+		
+		if( fileHandle == NULL )
+		{
+			return;
+		}
+
 		TBuf<KMaxDataTypeLength> fileName;
 		User::LeaveIfError(fileHandle->Name(fileName));
 		isRecognized = iResolver->DoRecognizeL(fileName, aBuffer, FileMimeType, ContentMimeType);
 		}
 	
-	if (isRecognized)
-		{
-		// If there is no content type but the file is recognized it is assumed
-		// to be a file that can be processed through the supplier interface
-		
-		// dummy object for comparison in match function
-		CMimeTypeMapping* mimeTypeMapping = (ContentMimeType.Length() == 0) ?  
-												CMimeTypeMapping::NewL(FileMimeType) :
-												CMimeTypeMapping::NewL(ContentMimeType);
+	if (isRecognized == EFalse)
+	{
+		return;
+	}
 
 
-		// check that the content mime type is one of the ones we
-		// told Apparc we can recognize in the beginning
-		// The mime type should always be found as the file has been recognised.
-		// If not it is because an agent, when recognising the file, has set a mime type not in its supplier list.
-		// Mime types are always forced to lower case therefore this match can be case sensitive.
-		TInt index = iContentTypes.Find(mimeTypeMapping, CMimeTypeMapping::ContentMimeTypeMatch);
-		if (index != KErrNotFound)
-			{
-			iDataType = TDataType(iContentTypes[index]->CafMimeType());
-			iConfidence=ECertain;
-			}
+	// If there is no content type but the file is recognized it is assumed
+	// to be a file that can be processed through the supplier interface
+		
+	// dummy object for comparison in match function
+	CMimeTypeMapping* mimeTypeMapping = (ContentMimeType.Length() == 0) ?  
+										 CMimeTypeMapping::NewL(FileMimeType) :
+										 CMimeTypeMapping::NewL(ContentMimeType);
+
 
-		delete mimeTypeMapping;
-		}
+	// check that the content mime type is one of the ones we
+	// told Apparc we can recognize in the beginning
+	// The mime type should always be found as the file has been recognised.
+	// If not it is because an agent, when recognising the file, has set a mime type not in its supplier list.
+	// Mime types are always forced to lower case therefore this match can be case sensitive.
+	TInt index = iContentTypes.Find(mimeTypeMapping, CMimeTypeMapping::ContentMimeTypeMatch);
+	if (index != KErrNotFound)
+	{
+	    iDataType = TDataType(iContentTypes[index]->CafMimeType());
+		iConfidence=ECertain;
+	}
+
+	delete mimeTypeMapping;
 	}
 
 const TImplementationProxy ImplementationTable[] = 
--- a/cryptoservices/certificateandkeymgmt/tx509/comparisontest.cpp	Thu Jul 22 20:18:20 2010 +0530
+++ b/cryptoservices/certificateandkeymgmt/tx509/comparisontest.cpp	Thu Aug 12 21:07:10 2010 +0530
@@ -123,7 +123,7 @@
 	TInt size;
 	User::LeaveIfError(file.Size(size));
 	RBuf8 buf;
-	buf.Create(size);
+	buf.CreateL(size);
 	CleanupClosePushL(buf);
 	
 	User::LeaveIfError(file.Read(buf, size));
--- a/securityanddataprivacytools/securityconfig/ups/romstub/bld.inf	Thu Jul 22 20:18:20 2010 +0530
+++ b/securityanddataprivacytools/securityconfig/ups/romstub/bld.inf	Thu Aug 12 21:07:10 2010 +0530
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -19,6 +19,10 @@
 PRJ_EXPORTS
 ../ups_config.iby /epoc32/rom/include/ups_config.iby
 
+// FLM interface and implementation
+upsromstubsis.xml /epoc32/tools/makefile_templates/security/upsromstubsis.xml
+upsromstubsis.flm /epoc32/tools/makefile_templates/security/upsromstubsis.flm
+
 PRJ_TESTEXPORTS
 
 PRJ_MMPFILES
@@ -26,7 +30,13 @@
 #ifndef TOOLS
 #ifndef TOOLS2
 
-gnumakefile buildstub.mak
+// FLM calls
+PRJ_EXTENSIONS
+
+start extension security.upsromstubsis.export
+option SISNAME upsserver
+option SRCDIR  .
+end
 
 #endif
 #endif
--- a/securityanddataprivacytools/securityconfig/ups/romstub/buildstub.mak	Thu Jul 22 20:18:20 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-ifeq "$(PLATFORM)" "WINSCW"
-ZDIR:=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\z
-SISFILE=$(ZDIR)\system\install\upsserver.sis
-endif
-
-ifeq "$(PLATFORM)" "ARMV5"
-ZDIR:=$(EPOCROOT)epoc32\data\z
-SISFILE=$(ZDIR)\system\install\upsserver.sis
-endif
-
-#
-# The targets invoked by abld...
-#
-
-MAKMAKE : DO_NOTHING
-FREEZE : DO_NOTHING
-LIB : DO_NOTHING
-RESOURCE : DO_NOTHING
-CLEANLIB : DO_NOTHING
-FINAL : DO_NOTHING
-SAVESPACE : BLD
-BLD : MAKEDATA
-
-DO_NOTHING:
-
-
-ifndef SISFILE
-#
-# Not supported on this target so nothing to do
-#
-MAKEDATA :
-	@echo ----------------
-	@echo  Do nothing ...
-	@echo ----------------
-
-CLEAN:
-
-RELEASABLES:
-
-else
-#
-# WINSCW or ARM
-#
-MAKEDATA : $(SISFILE)
-
-$(SISFILE) : upsserver.pkg
-	@cd
-	@echo ---------------------------
-	@echo Building UPS ROM stub
-	@echo ---------------------------
-	@echo nb. The stub does not contain any exes, just mentions them.
-	makesis -s $< $@
-
-DO_NOTHING:
-	rem do nothing
-
-CLEAN :     
-	-@erase $(SISFILE) /f
-
-RELEASABLES :
-	@echo $(SISFILE)
-endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securityanddataprivacytools/securityconfig/ups/romstub/upsromstubsis.flm	Thu Aug 12 21:07:10 2010 +0530
@@ -0,0 +1,51 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+#
+
+# FLM to build upsromstubsis libraries.
+
+## Outputs - upsserver.sis
+
+TARGETDIR:=$(EPOCROOT)/epoc32/data/z/system/install
+
+ifeq ($(PLATFORM),WINSCW)
+	TARGETDIR:=$(EPOCROOT)/epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/z/system/install
+endif
+
+$(call makepath,$(TARGETDIR))
+
+define SisFileCreation
+$(SISFILE): $(EXTENSION_ROOT)/$(SRCDIR)/$(SISNAME).pkg
+	$(call startrule,stubsis) \
+	$(EPOCROOT)/epoc32/tools/makesis$(DOTEXE) -s $$? $$@ \
+	$(call endrule,stubsis)
+endef
+
+# Build stub SIS file
+SISFILE:= $(TARGETDIR)/$(SISNAME).sis
+
+GUARD:=done_$(call sanitise,$(SISFILE))
+
+ifeq ($($(GUARD)),)
+$(GUARD):=1
+
+ALL:: $(SISFILE)
+$(eval $(call SisFileCreation))
+$(eval $(call whatmacro,$(SISFILE)))
+$(eval $(call GenerateStandardCleanTarget,$(SISFILE),$(TARGETDIR)))
+endif
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securityanddataprivacytools/securityconfig/ups/romstub/upsromstubsis.xml	Thu Aug 12 21:07:10 2010 +0530
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+-->
+
+<build xmlns="http://symbian.com/xml/build"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://symbian.com/xml/build build/2_0.xsd">
+
+	<interface name="security.upsromstubsis.export" extends="Symbian.UserFLM" flm="upsromstubsis.flm">
+		<param name='SISNAME'/>
+		<param name='SRCDIR'/>
+	</interface>
+</build>
+