Revision: 201018 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 25 May 2010 14:32:39 +0300
branchRCL_3
changeset 27 3a7375419266
parent 25 7701629b34a6
child 28 7cd994b812ca
child 33 6896b031c3e1
Revision: 201018 Kit: 2010121
compressionlibs/ziplib/group/libz/libz.mmp
compressionlibs/ziplib/group/libz/libzcore.mmp
genericopenlibs/cppstdlib/group/libstdcpp.mmp
genericopenlibs/openenvcore/backend/group/StdioServer.mmp
genericopenlibs/openenvcore/backend/group/backend.mmp
genericopenlibs/openenvcore/backend/group/signalserver.mmp
genericopenlibs/openenvcore/backend/ipcserver/ipcsrv/group/ipcserver.mmp
genericopenlibs/openenvcore/libc/group/libc.mmp
genericopenlibs/openenvcore/libdl/group/libdl.mmp
genericopenlibs/openenvcore/libm/group/libm.mmp
genericopenlibs/openenvcore/libpthread/group/libpthread.mmp
genericservices/httputils/Authentication/TConvBase64.cpp
genericservices/httputils/UriParser/GenericUriParser.cpp
genericservices/httputils/UriParser/SipUriParser.cpp
genericservices/httputils/UriParser/TUriParser.cpp
genericservices/httputils/bwins/INETPROTUTILU.DEF
genericservices/httputils/eabi/InetProtUtilU.Def
genericservices/httputils/inc/TConvBase64.h
ossrv_pub/compiler_specific_runtime_support/inc/stdapis/stlport/runtime/new.h
--- a/compressionlibs/ziplib/group/libz/libz.mmp	Tue May 11 17:47:24 2010 +0300
+++ b/compressionlibs/ziplib/group/libz/libz.mmp	Tue May 25 14:32:39 2010 +0300
@@ -54,3 +54,4 @@
 MACRO __wchar_t_defined
 #endif //GCCXML
 SMPSAFE
+PAGED
--- a/compressionlibs/ziplib/group/libz/libzcore.mmp	Tue May 11 17:47:24 2010 +0300
+++ b/compressionlibs/ziplib/group/libz/libzcore.mmp	Tue May 25 14:32:39 2010 +0300
@@ -53,3 +53,4 @@
 DEFFILE ../../~/libzcore.def
 
 SMPSAFE
+PAGED
--- a/genericopenlibs/cppstdlib/group/libstdcpp.mmp	Tue May 11 17:47:24 2010 +0300
+++ b/genericopenlibs/cppstdlib/group/libstdcpp.mmp	Tue May 25 14:32:39 2010 +0300
@@ -347,3 +347,4 @@
 /* End of file */
 
 SMPSAFE
+PAGED
--- a/genericopenlibs/openenvcore/backend/group/StdioServer.mmp	Tue May 11 17:47:24 2010 +0300
+++ b/genericopenlibs/openenvcore/backend/group/StdioServer.mmp	Tue May 25 14:32:39 2010 +0300
@@ -54,3 +54,4 @@
 
 
 SMPSAFE
+PAGED
--- a/genericopenlibs/openenvcore/backend/group/backend.mmp	Tue May 11 17:47:24 2010 +0300
+++ b/genericopenlibs/openenvcore/backend/group/backend.mmp	Tue May 25 14:32:39 2010 +0300
@@ -156,6 +156,7 @@
 #endif
 
 
+PAGED
 // End of File
 
 
--- a/genericopenlibs/openenvcore/backend/group/signalserver.mmp	Tue May 11 17:47:24 2010 +0300
+++ b/genericopenlibs/openenvcore/backend/group/signalserver.mmp	Tue May 25 14:32:39 2010 +0300
@@ -46,3 +46,4 @@
 
 
 SMPSAFE
+PAGED
--- a/genericopenlibs/openenvcore/backend/ipcserver/ipcsrv/group/ipcserver.mmp	Tue May 11 17:47:24 2010 +0300
+++ b/genericopenlibs/openenvcore/backend/ipcserver/ipcsrv/group/ipcserver.mmp	Tue May 25 14:32:39 2010 +0300
@@ -66,3 +66,4 @@
 
 
 SMPSAFE
+PAGED
--- a/genericopenlibs/openenvcore/libc/group/libc.mmp	Tue May 11 17:47:24 2010 +0300
+++ b/genericopenlibs/openenvcore/libc/group/libc.mmp	Tue May 25 14:32:39 2010 +0300
@@ -286,5 +286,6 @@
 
 
 
+PAGED
 // End of File
 SMPSAFE
--- a/genericopenlibs/openenvcore/libdl/group/libdl.mmp	Tue May 11 17:47:24 2010 +0300
+++ b/genericopenlibs/openenvcore/libdl/group/libdl.mmp	Tue May 25 14:32:39 2010 +0300
@@ -72,3 +72,4 @@
 
 
 SMPSAFE
+PAGED
--- a/genericopenlibs/openenvcore/libm/group/libm.mmp	Tue May 11 17:47:24 2010 +0300
+++ b/genericopenlibs/openenvcore/libm/group/libm.mmp	Tue May 25 14:32:39 2010 +0300
@@ -216,6 +216,7 @@
 #ifdef WINSCW
 LIBRARY ewsd.lib
 #endif
+PAGED
 // End of File
 
 SMPSAFE
--- a/genericopenlibs/openenvcore/libpthread/group/libpthread.mmp	Tue May 11 17:47:24 2010 +0300
+++ b/genericopenlibs/openenvcore/libpthread/group/libpthread.mmp	Tue May 25 14:32:39 2010 +0300
@@ -131,6 +131,7 @@
 LIBRARY        backend.lib
 
 
+PAGED
 // End of File
 
 #ifdef WINSCW
--- a/genericservices/httputils/Authentication/TConvBase64.cpp	Tue May 11 17:47:24 2010 +0300
+++ b/genericservices/httputils/Authentication/TConvBase64.cpp	Tue May 25 14:32:39 2010 +0300
@@ -174,3 +174,86 @@
 	
 	return maskShift<ESix;
 	}
+
+
+/**
+    Encodes an ASCII string to Base64 string.
+
+    @param aSrcString The source string in ASCII.
+    @param aDestString The destination string with converted base64 values.
+    @param aLineLength The maximum line length of the encoded base64 values.
+         A CR/LF sequence will be added after these many characters. 
+         The default value is -1, which means no CR/LF is added to output. The encoding is compliant with RFC 4648 
+    @return Number of characters in the source string that were not encoded.
+*/  
+EXPORT_C TInt TBase64::PortableEncode(const TDesC8& aSrcString, TDes8& aDestString, TInt aLineLength)
+    {
+    // Clears the destination string
+    aDestString.Zero();
+    // Initialise variables
+    const TUint8* srcStringPtr=aSrcString.Ptr();
+    const TUint8* srcStringEnd=aSrcString.Length()+srcStringPtr;
+    TUint8* destStringPtr=(TUint8*)aDestString.Ptr();
+    TUint8* destStringPtrBase=destStringPtr;
+    TInt character=0;
+    TUint8 encodedChar=0;
+    TInt charStorage=0;
+    TInt maskShift=EZero;
+    TInt destStringCharNum = 0;
+
+    while(srcStringPtr<=srcStringEnd)
+        {
+        // maskShift is used as a char read counter
+        if(maskShift==ESix)
+            {
+            // If the 3rd char read is also the last char then the while loop
+            // is broken on the next check.
+            if(srcStringPtr==srcStringEnd)
+                srcStringPtr++;
+            maskShift=EZero;
+            character=0;   
+            }
+        else
+            {
+            if(srcStringPtr==srcStringEnd)
+                character=0;
+            else
+                character=*srcStringPtr;
+ 
+            srcStringPtr++;
+            // Shifts charStorage ready for the next char
+            charStorage=charStorage<<8;
+            maskShift+=ETwo;
+            }
+        charStorage=charStorage|character;
+        // Shifts the mask to the correct bit location
+        // Masks (AND's) the valid bits from charStorage
+        // Shifts the valid bits into the low order 8bits
+        // Converts to BASE64 char, Casts the result to an unsigned char (which it should be ?....I hope)
+        encodedChar=(TUint8)Base64ToAscii[((charStorage>>maskShift)&ESixBitMask)];
+
+        *destStringPtr++=encodedChar;
+        destStringCharNum++;
+
+        // Add a CRLF every aLineLength number of characters 
+        if (destStringCharNum == aLineLength)
+            {
+            destStringCharNum = 0;
+            *destStringPtr++ = '\r';
+            *destStringPtr++ = '\n';
+            }
+        }
+     
+    // Check for not enough chars and pad if required
+    if (maskShift==EFour)
+        {
+        *destStringPtr++=KImcvConvEquals;
+        *destStringPtr++=KImcvConvEquals;
+        }
+    else
+        if(maskShift==ESix)
+            *destStringPtr++=KImcvConvEquals;   
+            
+    aDestString.SetLength((TInt)(destStringPtr-destStringPtrBase));
+    return ((TInt)(srcStringPtr-srcStringEnd));
+    }
--- a/genericservices/httputils/UriParser/GenericUriParser.cpp	Tue May 11 17:47:24 2010 +0300
+++ b/genericservices/httputils/UriParser/GenericUriParser.cpp	Tue May 25 14:32:39 2010 +0300
@@ -169,6 +169,11 @@
 			}
 		else
 			{
+		
+	    // First, move past the opening brace
+	            authority.Set(authority.Mid(startHostIPv6 + 1));
+	            // auth now = X:X:X]?????
+
 			// This is an IPv6 address, so it MUST have the closing brace too....
 			TInt endIPv6Host = authority.Locate(KIPv6UriCloseBrace);
 
@@ -182,16 +187,13 @@
 			// It's an ipv6  address, with an opening and closing brace. So now just extract it
 			// auth = [X:X:X]?????
 
-			// First, move past the opening brace
-			authority.Set(authority.Mid(startHostIPv6 + 1));
-			// auth now = X:X:X]?????
 
 			// Set the host, and need to remove the closing brace
-			aHost.Set(authority.Left(endIPv6Host - 1));
+			aHost.Set(authority.Left(endIPv6Host));
 			// host = X:X:X
 
 			// Move past the host
-			authority.Set(authority.Mid(endIPv6Host));
+			authority.Set(authority.Mid(endIPv6Host + 1));
 			}
 		
 		// Get the port...
--- a/genericservices/httputils/UriParser/SipUriParser.cpp	Tue May 11 17:47:24 2010 +0300
+++ b/genericservices/httputils/UriParser/SipUriParser.cpp	Tue May 25 14:32:39 2010 +0300
@@ -168,6 +168,10 @@
 			}
 		else
 			{
+		// First, move past the opening brace
+		    authority.Set(authority.Mid(startHostIPv6 + 1));
+		    // auth now = X:X:X]?????
+
 			// This is an IPv6 address, so it MUST have the closing brace too....
 			TInt endIPv6Host = authority.Locate(KIPv6UriCloseBrace);
 
@@ -181,16 +185,13 @@
 			// It's an ipv6  address, with an opening and closing brace. So now just extract it
 			// auth = [X:X:X]?????
 
-			// First, move past the opening brace
-			authority.Set(authority.Mid(startHostIPv6 + 1));
-			// auth now = X:X:X]?????
 
 			// Set the host, and need to remove the closing brace
-			aHost.Set(authority.Left(endIPv6Host - 1));
+			aHost.Set(authority.Left(endIPv6Host));
 			// host = X:X:X
 
 			// Move past the host
-			authority.Set(authority.Mid(endIPv6Host));
+			authority.Set(authority.Mid(endIPv6Host + 1 ));
 			}
 		
 		// Get the port...
--- a/genericservices/httputils/UriParser/TUriParser.cpp	Tue May 11 17:47:24 2010 +0300
+++ b/genericservices/httputils/UriParser/TUriParser.cpp	Tue May 25 14:32:39 2010 +0300
@@ -324,6 +324,11 @@
 			}
 		else
 			{
+		
+	    // First, move past the opening brace
+	        authority.Set(authority.Mid(startHostIPv6 + 1));
+	            // auth now = X:X:X]?????
+	            
 			// This is an IPv6 address, so it MUST have the closing brace too....
 			TInt endIPv6Host = authority.Locate(KIPv6UriCloseBrace);
 
@@ -334,16 +339,13 @@
 			// It's an ipv6  address, with an opening and closing brace. So now just extract it
 			// auth = [X:X:X]?????
 
-			// First, move past the opening brace
-			authority.Set(authority.Mid(startHostIPv6 + 1));
-			// auth now = X:X:X]?????
 
 			// Set the host, and need to remove the closing brace
-			aHost.Set(authority.Left(endIPv6Host -1));
+			aHost.Set(authority.Left(endIPv6Host));
 			// host = X:X:X
 
 			// Move past the host
-			authority.Set(authority.Mid(endIPv6Host));
+			authority.Set(authority.Mid(endIPv6Host + 1 ));
 			}
 		
 		// Get the port...
--- a/genericservices/httputils/bwins/INETPROTUTILU.DEF	Tue May 11 17:47:24 2010 +0300
+++ b/genericservices/httputils/bwins/INETPROTUTILU.DEF	Tue May 25 14:32:39 2010 +0300
@@ -290,4 +290,5 @@
 	?DummyForwardingFunctionForCompatibility@EscapeUtils@@CAPAVHBufC8@@ABVTDesC8@@0@Z @ 289 NONAME ; class HBufC8 * EscapeUtils::DummyForwardingFunctionForCompatibility(class TDesC8 const &, class TDesC8 const &)
 	??0TBase64@@QAE@XZ @ 290 NONAME ; TBase64::TBase64(void)
 	?NormaliseUriL@UriUtils@@SAPAVCUri8@@ABVTUriC8@@@Z @ 291 NONAME ; class CUri8 * UriUtils::NormaliseUriL(class TUriC8 const &)
+	?PortableEncode@TBase64@@QAEHABVTDesC8@@AAVTDes8@@H@Z @ 292 NONAME ; int TBase64::PortableEncode(class TDesC8 const &, class TDes8 &, int)
 
--- a/genericservices/httputils/eabi/InetProtUtilU.Def	Tue May 11 17:47:24 2010 +0300
+++ b/genericservices/httputils/eabi/InetProtUtilU.Def	Tue May 25 14:32:39 2010 +0300
@@ -377,4 +377,5 @@
 	_ZTV17CGenericUriParser @ 376 NONAME
 	_ZN7TBase646DecodeERK6TDesC8R5TDes8 @ 377 NONAME
 	_ZN8UriUtils13NormaliseUriLERK6TUriC8 @ 378 NONAME
+	_ZN7TBase6414PortableEncodeERK6TDesC8R5TDes8i @ 379 NONAME
         
\ No newline at end of file
--- a/genericservices/httputils/inc/TConvBase64.h	Tue May 11 17:47:24 2010 +0300
+++ b/genericservices/httputils/inc/TConvBase64.h	Tue May 25 14:32:39 2010 +0300
@@ -56,7 +56,7 @@
     };
     
 /**
-Base64 encoding and decoding class, complaint with RFC-3548.
+Base64 encoding and decoding class.
 @internalAll
 @released
 */    
@@ -102,7 +102,7 @@
 	IMPORT_C TBase64();
 	IMPORT_C TInt Encode( const TDesC8& aSrcString, TDes8& rDestString);
 	IMPORT_C TBool Decode( const TDesC8& aSrcString, TDes8& rDestString);
-
+	IMPORT_C TInt PortableEncode(const TDesC8& aSrcString, TDes8& aDestString, TInt aLineLength=-1);
 private:
 
 	TInt iShiftStored;
--- a/ossrv_pub/compiler_specific_runtime_support/inc/stdapis/stlport/runtime/new.h	Tue May 11 17:47:24 2010 +0300
+++ b/ossrv_pub/compiler_specific_runtime_support/inc/stdapis/stlport/runtime/new.h	Tue May 25 14:32:39 2010 +0300
@@ -15,6 +15,9 @@
  *
  */
 
+#ifndef _STLP_NEW_H
+#define _STLP_NEW_H
+
 # if !defined (_STLP_OUTERMOST_HEADER_ID)
 #  define _STLP_OUTERMOST_HEADER_ID 0x848
 #  include <stl/_prolog.h>
@@ -22,11 +25,7 @@
 #  define _STLP_DONT_POP_0x848
 # endif
 
-#ifndef _STLP_NEW_H
-#define _STLP_NEW_H
-
-
-# if (!(defined( _STLP_WINCE ) || defined (__SYMBIAN32__)) 
+# if (!(defined( _STLP_WINCE ) || defined (__SYMBIAN32__)))
 # if defined (__BORLANDC__)
 #  include <new.>
 # elif (__INTEL_COMPILER >= 800)
@@ -40,8 +39,6 @@
 # endif
 # endif /* STL_WINCE */
 
-#endif //_STLP_NEW_H
-
 # if (_STLP_OUTERMOST_HEADER_ID == 0x848)
 #  if ! defined (_STLP_DONT_POP_0x848)
 #   include <stl/_epilog.h>
@@ -50,6 +47,8 @@
 #   undef  _STLP_DONT_POP_0x848
 # endif
 
+#endif //_STLP_NEW_H
+
 // Local Variables:
 // mode:C++
 // End: