# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1271251337 -10800 # Node ID b4758b4b2d20274aad10aeecbef51b1129f3bc42 # Parent 96b99892dd8079976a8f5c339c639973850596e5 Revision: 201013 Kit: 201015 diff -r 96b99892dd80 -r b4758b4b2d20 XDMSettingsUI/group/XDMPlugin.mmp --- a/XDMSettingsUI/group/XDMPlugin.mmp Wed Mar 31 22:15:41 2010 +0300 +++ b/XDMSettingsUI/group/XDMPlugin.mmp Wed Apr 14 16:22:17 2010 +0300 @@ -77,6 +77,7 @@ LIBRARY featmgr.lib // Feature Manager LIBRARY hlplch.lib // HlpLauncher +LIBRARY inetprotutil.lib // conversions // This is optional - used only by Codewarrior for convenience. DOCUMENT 10207428.rss diff -r 96b99892dd80 -r b4758b4b2d20 XDMSettingsUI/src/XDMPluginSLContainer.cpp --- a/XDMSettingsUI/src/XDMPluginSLContainer.cpp Wed Mar 31 22:15:41 2010 +0300 +++ b/XDMSettingsUI/src/XDMPluginSLContainer.cpp Wed Apr 14 16:22:17 2010 +0300 @@ -36,6 +36,7 @@ #include #include #include +#include #include "XDMPluginSLContainer.h" #include "XDMPluginSettinglist.h" @@ -234,8 +235,31 @@ { iData->iAccessPoint = -1; } - - iData->iUserID = xDMSet->Property(EXdmPropAuthName); + + TBuf username = xDMSet->Property( EXdmPropAuthName ); + + // to show special chars in UI correctly + _LIT( KProcent, "%" ); + if ( username.Find( KProcent ) != KErrNotFound ) + { + // convert to 8 bit + HBufC8* tmp = HBufC8::NewLC( username.Length() ); + tmp->Des().Copy( username ); + + // Decode encoded username + HBufC8* decodedUsername = EscapeUtils::EscapeDecodeL( *tmp ); + CleanupStack::PopAndDestroy( tmp ); + CleanupStack::PushL( decodedUsername ); + + // convert to unicode + HBufC* userName16 = + EscapeUtils::ConvertToUnicodeFromUtf8L( decodedUsername->Des() ); + CleanupStack::PopAndDestroy( decodedUsername ); + username = userName16->Des(); + delete userName16; + } + + iData->iUserID = username; iData->iPassword = xDMSet->Property(EXdmPropAuthSecret); CleanupStack::PopAndDestroy(1); //xDMSet diff -r 96b99892dd80 -r b4758b4b2d20 presencesettingsui/src/psuigspluginsettingviewcontainer.cpp --- a/presencesettingsui/src/psuigspluginsettingviewcontainer.cpp Wed Mar 31 22:15:41 2010 +0300 +++ b/presencesettingsui/src/psuigspluginsettingviewcontainer.cpp Wed Apr 14 16:22:17 2010 +0300 @@ -32,6 +32,8 @@ #include "psuigsplugin.h" #include "psuigspluginids.hrh" #include +#include + // ========================= MEMBER FUNCTIONS ================================ @@ -111,10 +113,14 @@ case EPSUIMaxSubscriptionsId: settingItem = new (ELeave) CPSUIIntegerSettingItem( aSettingId, settingSet.iMaxSubscriptions ); + settingItem->SetSettingPageFlags( + CAknIntegerSettingPage::EEmptyValueAllowed);// Empty input allowed break; case EPSUIMaxContactsInListId: settingItem = new (ELeave) CPSUIIntegerSettingItem( aSettingId, settingSet.iMaxContactsInList ); + settingItem->SetSettingPageFlags( + CAknIntegerSettingPage::EEmptyValueAllowed);// Empty input allowed break; case EPSUIDomainSyntaxId: settingItem = new (ELeave) CAknTextSettingItem( @@ -140,6 +146,8 @@ // update setting to setting-object (*SettingItemArray())[aIndex]->StoreL(); + (*SettingItemArray())[aIndex]->UpdateListBoxTextL(); + ListBox()->DrawNow(); if ( EPSUIServerNameId == aIndex ) { diff -r 96b99892dd80 -r b4758b4b2d20 simpledatamodeladapter/group/presenceplugin.mmp --- a/simpledatamodeladapter/group/presenceplugin.mmp Wed Mar 31 22:15:41 2010 +0300 +++ b/simpledatamodeladapter/group/presenceplugin.mmp Wed Apr 14 16:22:17 2010 +0300 @@ -94,5 +94,6 @@ // access to Virtual Phonebook contact database LIBRARY vpbkeng.lib +LIBRARY inetprotutil.lib // End of file diff -r 96b99892dd80 -r b4758b4b2d20 simpledatamodeladapter/inc/presencepluginauthorization.h --- a/simpledatamodeladapter/inc/presencepluginauthorization.h Wed Mar 31 22:15:41 2010 +0300 +++ b/simpledatamodeladapter/inc/presencepluginauthorization.h Wed Apr 14 16:22:17 2010 +0300 @@ -79,7 +79,8 @@ EStateDoUnBlock, EStatePresenceGranted, EStateRemovePresentityFromGranted, - EStateAcceptBuddyRequest + EStateAcceptBuddyRequest, + EStateSubscribe }; /** diff -r 96b99892dd80 -r b4758b4b2d20 simpledatamodeladapter/src/presencepluginauthorization.cpp --- a/simpledatamodeladapter/src/presencepluginauthorization.cpp Wed Mar 31 22:15:41 2010 +0300 +++ b/simpledatamodeladapter/src/presencepluginauthorization.cpp Wed Apr 14 16:22:17 2010 +0300 @@ -509,8 +509,22 @@ identity->SetIdentityL( iPresIdentity->Des() ); iConnObs.WatcherHandlerL()->DoPerformSubscribePresentityPresenceL( *identity, iStatus ); CleanupStack::PopAndDestroy( ); //identity + iAuthState = EStateSubscribe; + SetActive(); + } + break; + + case EStateSubscribe: + { + DP_SDA( "CPresencePluginAuthorization::RunL -UnBlock completed" ); + HBufC* withoutPrefix = iPresenceData->RemovePrefixLC( *iPresIdentity ); + iPresenceData->WriteStatusToCacheL( *withoutPrefix, + MPresenceBuddyInfo2::ENotAvailable, + KInvisibleState(), + KNullDesC() ); + CleanupStack::PopAndDestroy( withoutPrefix ); iAuthState = EStateIdle; - SetActive(); + CompleteXIMPReq( myStatus ); } break; diff -r 96b99892dd80 -r b4758b4b2d20 simpledatamodeladapter/src/presenceplugindata.cpp --- a/simpledatamodeladapter/src/presenceplugindata.cpp Wed Mar 31 22:15:41 2010 +0300 +++ b/simpledatamodeladapter/src/presenceplugindata.cpp Wed Apr 14 16:22:17 2010 +0300 @@ -48,7 +48,7 @@ #include #include #include - +#include #include "presenceplugindata.h" #include "presenceplugincommon.h" @@ -1460,7 +1460,22 @@ TBool updateCache( ETrue ); - HBufC* cacheUri = ResolveCacheXspIdentifierL( aPresentityId ); + // Decode encoded username (spaces to %20). + HBufC* decodedUsername = EscapeUtils::EscapeDecodeL( aPresentityId ); + CleanupStack::PushL( decodedUsername ); + + // convert to 8 bit version + HBufC8* tmp = HBufC8::NewLC( decodedUsername->Length() ); + tmp->Des().Copy( *decodedUsername ); + + // convert to unicode + HBufC* userName16 = + EscapeUtils::ConvertToUnicodeFromUtf8L( tmp->Des() ); + + HBufC* cacheUri = ResolveCacheXspIdentifierL( userName16->Des() ); + CleanupStack::PopAndDestroy( tmp ); + CleanupStack::PopAndDestroy( decodedUsername ); + delete userName16; CleanupStack::PushL( cacheUri ); DP_SDA(" -> WriteStatusToCacheL - read previous values from cache"); diff -r 96b99892dd80 -r b4758b4b2d20 simpledatamodeladapter/src/presensepluginlocalstore.cpp --- a/simpledatamodeladapter/src/presensepluginlocalstore.cpp Wed Mar 31 22:15:41 2010 +0300 +++ b/simpledatamodeladapter/src/presensepluginlocalstore.cpp Wed Apr 14 16:22:17 2010 +0300 @@ -16,7 +16,7 @@ */ -#include +#include #include "presencepluginlocalstore.h" #include "presencelogger.h"