Revision: 201015 RCL_3 PDK_3.0.i
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 27 Apr 2010 17:03:39 +0300
branchRCL_3
changeset 14 de84881f4ac3
parent 11 b4758b4b2d20
child 18 52d91a16fec3
Revision: 201015 Kit: 201017
XDMEngine/group/XdmEngine.mmp
XDMEngine/src/XdmNodeAttribute.cpp
simpledatamodeladapter/src/presencepluginwatcher.cpp
simpleengine/siputils/src/simplesipconnection.cpp
--- a/XDMEngine/group/XdmEngine.mmp	Wed Apr 14 16:22:17 2010 +0300
+++ b/XDMEngine/group/XdmEngine.mmp	Tue Apr 27 17:03:39 2010 +0300
@@ -50,6 +50,7 @@
 LIBRARY                         charconv.lib
 LIBRARY                         flogger.lib
 LIBRARY                         xdmsettingsapi.lib
+LIBRARY                         inetprotutil.lib
 
 
 #if defined( ARMCC )
--- a/XDMEngine/src/XdmNodeAttribute.cpp	Wed Apr 14 16:22:17 2010 +0300
+++ b/XDMEngine/src/XdmNodeAttribute.cpp	Tue Apr 27 17:03:39 2010 +0300
@@ -19,6 +19,8 @@
 
 
 // INCLUDE FILES
+#include <escapeutils.h>
+
 #include "XdmEngine.h"
 #include "XdmNodeFactory.h"
 #include "XdmNodeAttribute.h"
@@ -142,14 +144,19 @@
 //
 EXPORT_C void CXdmNodeAttribute::SetAttributeValueL( const TDesC8& aAttributeValue )
     {
+    // change to UNICODE from UTF8 format
+    HBufC* unicode = EscapeUtils::ConvertToUnicodeFromUtf8L( aAttributeValue );
+    CleanupStack::PushL( unicode );
+    
     #ifdef _DEBUG
         iXdmEngine.WriteToLog( _L8( "CXdmNodeAttribute::SetAttributeValueL() - Value: %S" ),
-                                &aAttributeValue );
+                                unicode );
     #endif
     delete iAttributeValue;
     iAttributeValue = NULL;
-    iAttributeValue = HBufC::NewL( aAttributeValue.Length() );
-    iAttributeValue->Des().Copy( aAttributeValue );
+    iAttributeValue = HBufC::NewL( unicode->Length() );
+    iAttributeValue->Des().Copy( *unicode );
+    CleanupStack::PopAndDestroy( unicode );
     }
 
 
--- a/simpledatamodeladapter/src/presencepluginwatcher.cpp	Wed Apr 14 16:22:17 2010 +0300
+++ b/simpledatamodeladapter/src/presencepluginwatcher.cpp	Tue Apr 27 17:03:39 2010 +0300
@@ -29,6 +29,7 @@
 #include <ximpobjectcollection.h>
 #include <ximpobjectfactory.h>
 #include <presenceobjectfactory.h>
+#include <escapeutils.h>
 
 #include "presencepluginvirtualgroup.h"
 #include "mpresencepluginconnectionobs.h"
@@ -139,11 +140,16 @@
     pres8 =
         CnvUtfConverter::ConvertFromUnicodeToUtf8L( iPresIdentity->Des() );
     CleanupStack::PushL( pres8 ); // << pres8
-        
+    
+    // remove escapes
+    HBufC8* encodedUsername = EscapeUtils::EscapeEncodeL( *pres8, EscapeUtils::EEscapeNormal );
+    CleanupStack::PopAndDestroy( pres8 );
+    CleanupStack::PushL( encodedUsername );
+    
     CPresencePluginEntityWatcher* watcher =
-        MatchWatcherL( pres8->Des(), ETrue );      
-    watcher->StartSubscribeL( pres8->Des(), aStatus );
-    CleanupStack::PopAndDestroy( pres8 );  // >> pres8
+        MatchWatcherL( encodedUsername->Des(), ETrue );      
+    watcher->StartSubscribeL( encodedUsername->Des(), aStatus );
+    CleanupStack::PopAndDestroy( encodedUsername );
     }
 
 // ---------------------------------------------------------------------------
--- a/simpleengine/siputils/src/simplesipconnection.cpp	Wed Apr 14 16:22:17 2010 +0300
+++ b/simpleengine/siputils/src/simplesipconnection.cpp	Tue Apr 27 17:03:39 2010 +0300
@@ -1607,11 +1607,10 @@
     // get request uri from a request
     TUriParser8 parser;
     User::LeaveIfError( parser.Parse( aRemoteURI ));
-    CUri8* uri = CUri8::NewLC( parser );
+    CUri8* uri = CUri8::NewL( parser );
 
     // Start to fill headres,  Remote URI
-    CSIPRequestElements* elems = CSIPRequestElements::NewL(uri);
-    CleanupStack::Pop( uri); // ownership given to elems
+    CSIPRequestElements* elems = CSIPRequestElements::NewL( uri );
     CleanupStack::PushL( elems );
     // To header not needed when remote uri set