# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1277125606 -10800 # Node ID e53c01f160bc8c403c29f7fc5d7e66f9aab34ee0 # Parent 10246e066a502cb221708673f08c4bd23d247f07 Revision: 201023 Kit: 2010125 diff -r 10246e066a50 -r e53c01f160bc XDMEngine/XdmProvisioning/inc/xdmprovitem.h --- a/XDMEngine/XdmProvisioning/inc/xdmprovitem.h Tue May 25 13:08:20 2010 +0300 +++ b/XDMEngine/XdmProvisioning/inc/xdmprovitem.h Mon Jun 21 16:06:46 2010 +0300 @@ -137,7 +137,7 @@ * @param aName Name of the parameter * @param aValue Value of the parameter */ - void DetermineNamedParameter( const TDesC& aName, + void DetermineNamedParameterL( const TDesC& aName, const TDesC& aValue ); /** diff -r 10246e066a50 -r e53c01f160bc XDMEngine/XdmProvisioning/src/xdmprovitem.cpp --- a/XDMEngine/XdmProvisioning/src/xdmprovitem.cpp Tue May 25 13:08:20 2010 +0300 +++ b/XDMEngine/XdmProvisioning/src/xdmprovitem.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -270,7 +270,7 @@ case EWPParameterToAppRef: { - iToAppReferences.Append( aParameter.Value() ); + iToAppReferences.AppendL( aParameter.Value() ); #ifdef _DEBUG CXdmProvAdapter::WriteToLog( _L8( "CXdmProvItem::EWPParameterToAppRef" ) ); #endif @@ -332,7 +332,7 @@ break; default: { - DetermineNamedParameter( aParameter.Name(), aParameter.Value() ); + DetermineNamedParameterL( aParameter.Name(), aParameter.Value() ); } break; } @@ -342,7 +342,7 @@ // CXdmProvItem::DetermineNamedParameter // ----------------------------------------------------------------------------- // -void CXdmProvItem::DetermineNamedParameter( const TDesC& aName, const TDesC& aValue ) +void CXdmProvItem::DetermineNamedParameterL( const TDesC& aName, const TDesC& aValue ) { if ( !aName.Compare( KXdmProvAppRef ) ) { @@ -350,7 +350,7 @@ } else if ( !aName.Compare( KXdmProvToAppRef ) ) { - iToAppReferences.Append( aValue ); + iToAppReferences.AppendL( aValue ); } } // ----------------------------------------------------------------------------- diff -r 10246e066a50 -r e53c01f160bc XDMEngine/XdmSettingsApi/src/XdmSettingsApi.cpp --- a/XDMEngine/XdmSettingsApi/src/XdmSettingsApi.cpp Tue May 25 13:08:20 2010 +0300 +++ b/XDMEngine/XdmSettingsApi/src/XdmSettingsApi.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -406,7 +406,7 @@ propertySet->AppendL( desc ); TLex id( identifier ); error = id.Val( numId ); - aSettingIds.Append( error == KErrNone ? numId : error ); + aSettingIds.AppendL( error == KErrNone ? numId : error ); } else { diff -r 10246e066a50 -r e53c01f160bc XDMSettingsUI/inc/XDMPlugin.hrh --- a/XDMSettingsUI/inc/XDMPlugin.hrh Tue May 25 13:08:20 2010 +0300 +++ b/XDMSettingsUI/inc/XDMPlugin.hrh Mon Jun 21 16:06:46 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -73,14 +73,14 @@ /** * Constants used in resources and in application */ -#define KMaxSettingSetNameLength 30 +#define KMaxSettingSetNameLength 32 #define KMaxSettingSetNameArrayGran 10 #define KMaxUserIDLength 100 #define KMaxServerAddressLength 100 #define KMaxPasswordLength 100 #define KMaxSIPURLLength 100 -#define KMaxAccessPointNameLength 30 -#define KMaxAccessPointDesLength 30 +#define KMaxAccessPointNameLength 32 +#define KMaxAccessPointDesLength 32 #define KMaxMessageToDisplayLength 100 diff -r 10246e066a50 -r e53c01f160bc XDMSettingsUI/src/XDMPluginSLContainer.cpp --- a/XDMSettingsUI/src/XDMPluginSLContainer.cpp Tue May 25 13:08:20 2010 +0300 +++ b/XDMSettingsUI/src/XDMPluginSLContainer.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -457,7 +457,6 @@ { TBool inUse( EFalse ); TLex16 myLex; - iData->Reset(); iData->iSettingName = aXDMSetName; AknTextUtils::ConvertDigitsTo(iData->iSettingName, EDigitTypeWestern ); @@ -474,7 +473,6 @@ CleanupStack::PopAndDestroy(xDMSet); inUse = iSettingList->IsAccessPointInUseL( iData->iAccessPoint ); - iData->Reset(); return inUse; } diff -r 10246e066a50 -r e53c01f160bc presencefwsimpleadpt/src/simplepluginauthorization.cpp --- a/presencefwsimpleadpt/src/simplepluginauthorization.cpp Tue May 25 13:08:20 2010 +0300 +++ b/presencefwsimpleadpt/src/simplepluginauthorization.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -545,7 +545,7 @@ { MXIMPIdentity* entity = myFactory.NewIdentityLC(); // << entity entity->SetIdentityL( aBlockers[i] ); - aBlockedSouls.Append( entity ); + aBlockedSouls.AppendL( entity ); CleanupStack::Pop(); // >> entity } } diff -r 10246e066a50 -r e53c01f160bc presencefwsimpleadpt/src/simplepluginwatcher.cpp --- a/presencefwsimpleadpt/src/simplepluginwatcher.cpp Tue May 25 13:08:20 2010 +0300 +++ b/presencefwsimpleadpt/src/simplepluginwatcher.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -407,7 +407,7 @@ { CSimplePluginEntityWatcher* watcher = CSimplePluginEntityWatcher::NewL( iConnObs, iConnection, *this ); - iWatchers.Append( watcher ); + iWatchers.AppendL( watcher ); return watcher; } } diff -r 10246e066a50 -r e53c01f160bc presencefwsimpleadpt/src/simplepluginxdmutils.cpp --- a/presencefwsimpleadpt/src/simplepluginxdmutils.cpp Tue May 25 13:08:20 2010 +0300 +++ b/presencefwsimpleadpt/src/simplepluginxdmutils.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -1172,7 +1172,7 @@ SXdmAttribute16 attr; attr.iName.Set( KSimpleName ); attr.iValue.Set( aName ); - attributeArray.Append( &attr ); + attributeArray.AppendL( &attr ); CXdmDocumentNode* currNode = NULL; @@ -1900,7 +1900,7 @@ SXdmAttribute16 attr; attr.iName.Set( KSimpleUri ); attr.iValue.Set( aUser ); - attributeArray.Append( &attr ); + attributeArray.AppendL( &attr ); // If member already exists then leave target->Find( KSimpleEntry, resultArray, attributeArray ); diff -r 10246e066a50 -r e53c01f160bc simpledatamodeladapter/inc/presenceplugingroup.h --- a/simpledatamodeladapter/inc/presenceplugingroup.h Tue May 25 13:08:20 2010 +0300 +++ b/simpledatamodeladapter/inc/presenceplugingroup.h Mon Jun 21 16:06:46 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -62,7 +62,8 @@ EGetListOfLists, EGetListContent, EBlockPresentityGroupMember, - EUnblockPresentityGroupMember + EUnblockPresentityGroupMember, + EUnblockInAddPresentityGroupMember }; /** diff -r 10246e066a50 -r e53c01f160bc simpledatamodeladapter/src/presenceplugin.cpp --- a/simpledatamodeladapter/src/presenceplugin.cpp Tue May 25 13:08:20 2010 +0300 +++ b/simpledatamodeladapter/src/presenceplugin.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -196,7 +196,9 @@ //Add this new connection to connectionArray CPresenceConnectionInfo* connectionInfo = CPresenceConnectionInfo::NewL( connection ); - iConnectionArray.Append( connectionInfo ); + CleanupStack::PushL( connectionInfo ); + iConnectionArray.AppendL( connectionInfo ); + CleanupStack::Pop(); connection->SetConnectionArray( connectionInfo ); iConnections.AppendL( connection ); CleanupStack::Pop( connection ); @@ -232,7 +234,9 @@ //Add this new connection to connectionArray CPresenceConnectionInfo* connectionInfo = CPresenceConnectionInfo::NewL( connection ); - iConnectionArray.Append( connectionInfo ); + CleanupStack::PushL( connectionInfo ); + iConnectionArray.AppendL( connectionInfo ); + CleanupStack::Pop(); connection->SetConnectionArray( connectionInfo ); //Add on binded client connectionInfo->IncreaseClientCount(); diff -r 10246e066a50 -r e53c01f160bc simpledatamodeladapter/src/presenceplugingroup.cpp --- a/simpledatamodeladapter/src/presenceplugingroup.cpp Tue May 25 13:08:20 2010 +0300 +++ b/simpledatamodeladapter/src/presenceplugingroup.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -39,6 +39,7 @@ #include "presenceplugindata.h" #include "presencepluginwatcher.h" #include "presencepluginauthorization.h" +#include "presencepluginutility.h" // ======== MEMBER FUNCTIONS ======== @@ -220,20 +221,49 @@ if( !aGroupId.Identity().Compare( KPresenceBuddyList ) ) { DP_SDA("CPresencePluginGroups::DoAddPresentityGroupMemberL - buddylist"); - iOperation = EAddPresentityGroupMember; + TBool contactIsBlocked = EFalse; + RPointerArray blockedList; + CleanupStack::PushL( TCleanupItem( + TPresencePluginUtility::ResetAndDestroyIdentities, + &blockedList ) ); + iXdmUtils->SubscribeBlockListL( blockedList ); + DP_SDA2( "CPresencePluginGroups::DoAddPresentityGroupMemberL - blockedList.Count = %d", + blockedList.Count() ); - // write pending to presence cache - TBuf<20> buf; - buf.Copy( KPendingRequestExtensionValue ); + for ( TInt i( 0 ); i < blockedList.Count() && !contactIsBlocked; i++ ) + { + if ( 0 == blockedList[i]->Identity().Compare( aMemberId.Identity() ) ) + { + // contact found from blocked list + contactIsBlocked = ETrue; + } + } + CleanupStack::PopAndDestroy( &blockedList ); - iPresenceData->WriteStatusToCacheL( aMemberId.Identity(), - MPresenceBuddyInfo2::ENotAvailable, - buf, - KNullDesC() ); - - iConnObs.WatcherHandlerL()->DoPerformSubscribePresentityPresenceL( - aMemberId, iStatus ); - SetActive(); + if ( contactIsBlocked ) + { + DP_SDA( "CPresencePluginGroups::DoAddPresentityGroupMemberL - contact is Blocked" ); + iOperation = EUnblockInAddPresentityGroupMember; + iConnObs.InternalPresenceAuthorization(). + DoPerformCancelPresenceBlockFromPresentityL( + aMemberId, iStatus ); + SetActive(); + } + else + { + DP_SDA( "CPresencePluginGroups::DoAddPresentityGroupMemberL - contact is not Blocked" ); + iOperation = EAddPresentityGroupMember; + // write pending to presence cache + TBuf<20> buf; + buf.Copy( KPendingRequestExtensionValue ); + iPresenceData->WriteStatusToCacheL( aMemberId.Identity(), + MPresenceBuddyInfo2::ENotAvailable, + buf, + KNullDesC() ); + iConnObs.WatcherHandlerL()->DoPerformSubscribePresentityPresenceL( + aMemberId, iStatus ); + SetActive(); + } } else if ( !aGroupId.Identity().Compare( KPresenceBlockedList ) ) { @@ -272,18 +302,18 @@ if( !aGroupId.Identity().Compare( KPresenceBuddyList ) ) { - DP_SDA(" DoRemovePresentityGroupMemberL - buddylist"); + DP_SDA( "DoRemovePresentityGroupMemberL - buddylist" ); iConnObs.WatcherHandlerL()->DoPerformUnsubscribePresentityPresenceL( aMemberId, iStatus ); SetActive(); } else if ( !aGroupId.Identity().Compare( KPresenceBlockedList ) ) { - DP_SDA(" DoRemovePresentityGroupMemberL - blockedlist"); - iOperation = EUnblockPresentityGroupMember; - iConnObs.InternalPresenceAuthorization(). - DoPerformCancelPresenceBlockFromPresentityL( aMemberId, iStatus ); - SetActive(); + DP_SDA( "DoRemovePresentityGroupMemberL - blockedlist" ); + // Contact blocking is not cancelled when blocked contact is removed + // user can remove blocking from blocked list later + DeletePersonCacheL(); + CompleteXIMPReq( KErrNone ); } else { @@ -485,10 +515,30 @@ } break; + case EUnblockInAddPresentityGroupMember: + { + DP_SDA(" CallActualXdmOperationL EUnblockInAddPresentityGroupMember"); + iOperation = EAddPresentityGroupMember; + MXIMPIdentity* newIdentity = iConnObs.ObjectFactory().NewIdentityLC(); + newIdentity->SetIdentityL( *iPresIdentity ); + + TBuf<20> buf; + buf.Copy( KPendingRequestExtensionValue ); + iPresenceData->WriteStatusToCacheL( *iPresIdentity, + MPresenceBuddyInfo2::ENotAvailable, + buf, KNullDesC() ); + + iConnObs.WatcherHandlerL()->DoPerformSubscribePresentityPresenceL( + *newIdentity, iStatus ); + CleanupStack::PopAndDestroy(); // >> newIdentity + SetActive(); + } + break; + default: User::Leave( KErrNotSupported ); break; - } + } DP_SDA("CPresencePluginGroups::CallActualXdmOperationL end"); } diff -r 10246e066a50 -r e53c01f160bc simpledatamodeladapter/src/presencepluginwatcher.cpp --- a/simpledatamodeladapter/src/presencepluginwatcher.cpp Tue May 25 13:08:20 2010 +0300 +++ b/simpledatamodeladapter/src/presencepluginwatcher.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -384,7 +384,9 @@ CPresencePluginEntityWatcher* watcher = CPresencePluginEntityWatcher::NewL( iConnObs, iConnection, *this, iPresenceData ); - iWatcherCandidates.Append( watcher ); + CleanupStack::PushL( watcher ); + iWatcherCandidates.AppendL( watcher ); + CleanupStack::Pop(); DP_SDA("CPresencePluginWatcher::MatchWatcherL end"); return watcher; } diff -r 10246e066a50 -r e53c01f160bc simpledatamodeladapter/src/presencepluginxdmpresrules.cpp --- a/simpledatamodeladapter/src/presencepluginxdmpresrules.cpp Tue May 25 13:08:20 2010 +0300 +++ b/simpledatamodeladapter/src/presencepluginxdmpresrules.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -1080,7 +1080,7 @@ SXdmAttribute16 attr; attr.iName.Set( KPresenceId ); attr.iValue.Set( aName ); - attributeArray.Append( &attr ); + attributeArray.AppendL( &attr ); CXdmDocumentNode* currNode = NULL; diff -r 10246e066a50 -r e53c01f160bc simpledatamodeladapter/src/presencepluginxdmutils.cpp --- a/simpledatamodeladapter/src/presencepluginxdmutils.cpp Tue May 25 13:08:20 2010 +0300 +++ b/simpledatamodeladapter/src/presencepluginxdmutils.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -829,7 +829,7 @@ SXdmAttribute16 attr; attr.iName.Set( KPresenceName ); attr.iValue.Set( aName ); - attributeArray.Append( &attr ); + attributeArray.AppendL( &attr ); CXdmDocumentNode* currNode = NULL; @@ -864,27 +864,29 @@ TRequestStatus& aStatus ) { DP_SDA("CPresencePluginXdmUtils::RemoveEntityFromGrantedL"); - TRAPD(err, iEntityUri = aUri.AllocL() ); + + iEntityUri = aUri.AllocL(); + iConnObs.SubscribedContacts()->RemoveEntityL( iEntityUri->Des() ); + + iClientStatus = &aStatus; + *iClientStatus = KRequestPending; + + iRulesUpdateState = EStateRemoveFromWhiteList; + iOperation = EXdmRemoveUserFromGroup; - iConnObs.SubscribedContacts()->RemoveEntityL( iEntityUri->Des() ); + TRAPD( err, DoRemoveUserFromListL( KPresenceBuddyList, aUri ) ); if ( !err ) { - iClientStatus = &aStatus; - iRulesUpdateState = EStateRemoveFromWhiteList; - iOperation = EXdmRemoveUserFromGroup; - - DoRemoveUserFromListL( KPresenceBuddyList, aUri ); // send to the server and start wait a response UpdateXdmsL(); iXdmState = EUpdateXdmList; - *iClientStatus = KRequestPending; } else { - //If error we can complete request - DP_SDA("RemoveEntityFromGrantedL SEND COMPLETE"); - CompleteClientReq( KErrNone ); + //complete request with error + DP_SDA2( "RemoveEntityFromGrantedL -DoRemoveUserFromListL error = %d", err ); + CompleteClientReq( err ); } } @@ -1073,7 +1075,7 @@ MXIMPIdentity* entity = myFactory.NewIdentityLC(); // << entity entity->SetIdentityL( attr->AttributeValue() ); - aMembers.Append( entity ); + aMembers.AppendL( entity ); CleanupStack::Pop(); // >> entity } } diff -r 10246e066a50 -r e53c01f160bc simpleengine/presenceprovisioning/inc/presenceprovitem.h --- a/simpleengine/presenceprovisioning/inc/presenceprovitem.h Tue May 25 13:08:20 2010 +0300 +++ b/simpleengine/presenceprovisioning/inc/presenceprovitem.h Mon Jun 21 16:06:46 2010 +0300 @@ -164,7 +164,7 @@ * @param aName Name of the parameter * @param aValue Value of the parameter */ - void DetermineNamedParameter( const TDesC& aName, const TDesC& aValue ); + void DetermineNamedParameterL( const TDesC& aName, const TDesC& aValue ); /** * Check presence settings duplicate names, provide alternate name diff -r 10246e066a50 -r e53c01f160bc simpleengine/presenceprovisioning/src/presenceprovadapter.cpp --- a/simpleengine/presenceprovisioning/src/presenceprovadapter.cpp Tue May 25 13:08:20 2010 +0300 +++ b/simpleengine/presenceprovisioning/src/presenceprovadapter.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -289,7 +289,7 @@ // APPID into place [0]. TPtrC8 appId ( KPresProvisioningAppId8 ); HBufC8* appIdBuf = appId.AllocLC(); // << appIdBuf - aSavingInfo.Append( appIdBuf ); + aSavingInfo.AppendL( appIdBuf ); CleanupStack::Pop( appIdBuf ); // >> appIdBuf appIdBuf = NULL; diff -r 10246e066a50 -r e53c01f160bc simpleengine/presenceprovisioning/src/presenceprovitem.cpp --- a/simpleengine/presenceprovisioning/src/presenceprovitem.cpp Tue May 25 13:08:20 2010 +0300 +++ b/simpleengine/presenceprovisioning/src/presenceprovitem.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -251,7 +251,7 @@ case EWPParameterToAppRef: { PRES_PROV_LOG(LOG_LIT8( " EWPParameterToAppRef")); - iToAppReferences.Append( aParameter.Value() ); + iToAppReferences.AppendL( aParameter.Value() ); } break; @@ -271,7 +271,7 @@ default: { - DetermineNamedParameter( aParameter.Name(), aParameter.Value() ); + DetermineNamedParameterL( aParameter.Name(), aParameter.Value() ); } break; } @@ -282,7 +282,7 @@ // CPresProvItem::DetermineNamedParameter // ----------------------------------------------------------------------------- // -void CPresProvItem::DetermineNamedParameter( const TDesC& aName, const TDesC& aValue ) +void CPresProvItem::DetermineNamedParameterL( const TDesC& aName, const TDesC& aValue ) { PRES_PROV_LOG(LOG_LIT( "DetermineNamedParameter(%S, %S)"), &aName, &aValue); if ( !aName.Compare( KPresProvClientObjDataLim ) ) @@ -316,7 +316,7 @@ else if (!aName.Compare(KPresIToAppRef)) { if(iToAppReferences.Count() < 2) // if any of SIP or XDM id is missing - iToAppReferences.Append(aValue); + iToAppReferences.AppendL(aValue); } PRES_PROV_LOG(LOG_LIT8( " CPresProvItem::DetermineNamedParameter ends" ) ); } diff -r 10246e066a50 -r e53c01f160bc simpleengine/presencesettingsapi/src/pressettingsapi.cpp --- a/simpleengine/presencesettingsapi/src/pressettingsapi.cpp Tue May 25 13:08:20 2010 +0300 +++ b/simpleengine/presencesettingsapi/src/pressettingsapi.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -78,7 +78,7 @@ else { sets->AppendL(setName); - aSetIds.Append(setId); + aSetIds.AppendL(setId); } setName.Zero(); } diff -r 10246e066a50 -r e53c01f160bc simpleengine/siputils/src/simplesipconnection.cpp --- a/simpleengine/siputils/src/simplesipconnection.cpp Tue May 25 13:08:20 2010 +0300 +++ b/simpleengine/siputils/src/simplesipconnection.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -2628,11 +2628,9 @@ { if ( aState == ESimpleSipActive ) { - // Check that both SIP Profile and SIP connection are ready. + // Check that SIP Profile is ready. // iProfileObserver is created in ConstructL. - if ( iProfileObserver->IsProfileActive() && - iSipConnection && - iSipConnection->State() == CSIPConnection::EActive ) + if ( iProfileObserver->IsProfileActive() ) { SetSipState( aState ); } diff -r 10246e066a50 -r e53c01f160bc simpleengine/xdmrlspres/src/crlsxdm.cpp --- a/simpleengine/xdmrlspres/src/crlsxdm.cpp Tue May 25 13:08:20 2010 +0300 +++ b/simpleengine/xdmrlspres/src/crlsxdm.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -709,7 +709,7 @@ RPointerArray confirmedNodes; CXdmDocumentNode* currentNode = serviceUriNode; - confirmedNodes.Append(currentNode); + confirmedNodes.AppendL(currentNode); if(count>1) // if some list(s) exist in path info { @@ -734,7 +734,7 @@ for (TInt j=0;jAppendL(aLists.MdcaPoint(j)); - iListPointerPath.Append(confirmedNodes[j]); + iListPointerPath.AppendL(confirmedNodes[j]); } confirmedNodes.Close(); diff -r 10246e066a50 -r e53c01f160bc simpleengine/xdmrlspres/src/presencetransformxdm.cpp --- a/simpleengine/xdmrlspres/src/presencetransformxdm.cpp Tue May 25 13:08:20 2010 +0300 +++ b/simpleengine/xdmrlspres/src/presencetransformxdm.cpp Mon Jun 21 16:06:46 2010 +0300 @@ -181,7 +181,7 @@ if ((nodeName==KPresAllDevices)||(nodeName==KPresAllPersons)|| (nodeName==KPresAllServices)) { - aTypeAndValues.Append(myDataCompo); + aTypeAndValues.AppendL(myDataCompo); break; }