# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1277127478 -10800 # Node ID 490439ac0bd493e955c7060c38ab47715a1c36f4 # Parent 696f5dd1193971e8af2f655eb36deaa3d4f2c708 Revision: 201023 Kit: 2010125 diff -r 696f5dd11939 -r 490439ac0bd4 fotaapplication/fotaserver/FotaServer/inc/FotaServer.h --- a/fotaapplication/fotaserver/FotaServer/inc/FotaServer.h Wed Jun 09 10:37:30 2010 +0300 +++ b/fotaapplication/fotaserver/FotaServer/inc/FotaServer.h Mon Jun 21 16:37:58 2010 +0300 @@ -74,7 +74,7 @@ /** If download is active this P&S key is set to ETrue, otherwise EFalse. * The key is owned by omadmappui**/ -const TUint32 KFotaDownloadActive = 0x0000008; +const TUint32 KFotaDownloadActive = 0x00000008; /** The P&S key to say DM UI to perform refresh of UI elements */ const TUint32 KFotaDMRefresh = 0x00000009; diff -r 696f5dd11939 -r 490439ac0bd4 fotaapplication/fotaserver/FotaServer/src/FotaServer.cpp --- a/fotaapplication/fotaserver/FotaServer/src/FotaServer.cpp Wed Jun 09 10:37:30 2010 +0300 +++ b/fotaapplication/fotaserver/FotaServer/src/FotaServer.cpp Mon Jun 21 16:37:58 2010 +0300 @@ -443,7 +443,7 @@ } else { - TInt err = RProperty::Get(TUid::Uid(KOmaDMAppUid), KFotaDownloadActive, value ); + TInt err = RProperty::Get(TUid::Uid(KFotaServerUid), KFotaDownloadActive, value ); FLOG(_L("value of KFotaDownloadActive & err as %d,%d "), (TInt)value,err); } FLOG(_L("Download active value is:%d "), (TInt)value); diff -r 696f5dd11939 -r 490439ac0bd4 fotaapplication/fotaserver/FotaServer/src/FotaSrvDocument.cpp --- a/fotaapplication/fotaserver/FotaServer/src/FotaSrvDocument.cpp Wed Jun 09 10:37:30 2010 +0300 +++ b/fotaapplication/fotaserver/FotaServer/src/FotaSrvDocument.cpp Mon Jun 21 16:37:58 2010 +0300 @@ -25,7 +25,8 @@ #include "FotaSrvDocument.h" #include "FotaSrvUI.h" #include "FotaSrvDebug.h" - +#include +#include "FotaServer.h" // ================= MEMBER FUNCTIONS ======================= // --------------------------------------------------------------------------- @@ -34,6 +35,7 @@ // CFotaSrvDocument::~CFotaSrvDocument() { + TInt err = RProperty::Delete(TUid::Uid(KFotaServerUid), KFotaDownloadActive); } @@ -44,10 +46,21 @@ // void CFotaSrvDocument::ConstructL() { + TInt err1(KErrNone); + _LIT_SECURITY_POLICY_C1( KReadPolicy, ECapabilityReadDeviceData ); + _LIT_SECURITY_POLICY_C1( KWritePolicy, ECapabilityDiskAdmin ); + TInt err = RProperty::Define( TUid::Uid(KFotaServerUid), + KFotaDownloadActive, + RProperty::EInt,KReadPolicy,KWritePolicy); + if(err==0) + { + err1 = RProperty::Set( TUid::Uid(KFotaServerUid),KFotaDownloadActive,KErrNotFound ); + } + FLOG(_L(" [FotaServer] CFotaSrvDocument::ConstructL : error in setting rproperty: %d %d"), err,err1); //iEikEnv = CEikonEnv::Static(); + } - // --------------------------------------------------------------------------- // CFotaSrvDocument::NewL // Two-phased constructor. diff -r 696f5dd11939 -r 490439ac0bd4 fotaapplication/fotaserver/FotaServer/src/fotadownload.cpp --- a/fotaapplication/fotaserver/FotaServer/src/fotadownload.cpp Wed Jun 09 10:37:30 2010 +0300 +++ b/fotaapplication/fotaserver/FotaServer/src/fotadownload.cpp Mon Jun 21 16:37:58 2010 +0300 @@ -356,7 +356,7 @@ iDLState.iState = RFotaEngineSession::EDownloadProgressingWithResume; TInt active (KErrNotFound); - RProperty::Get( TUid::Uid(KOmaDMAppUid), KFotaDownloadActive, active ); + RProperty::Get( TUid::Uid(KFotaServerUid), KFotaDownloadActive, active ); FLOG(_L("active = %d"),active); if (active) //Resume operation has just begun and download request is submitted to dlmgr. Hence need to suspend. @@ -951,7 +951,7 @@ else if ( adlErrorId == EObjectNotFound) { FLOG(_L("Reason: error EObjectNotFound")); - iDLState.iResult = RFotaEngineSession::EResUndefinedError; + iDLState.iResult = RFotaEngineSession::EResAlternateDLServerUnavailable; } else if ( adlErrorId == EPartialContentModified) { @@ -1464,7 +1464,7 @@ * 4. */ TInt active (KErrNotFound); - RProperty::Get( TUid::Uid(KOmaDMAppUid), KFotaDownloadActive, active ); + RProperty::Get(TUid::Uid(KFotaServerUid), KFotaDownloadActive, active ); FLOG(_L("active = %d"),active); if (active==EFalse && iDLState.iState == RFotaEngineSession::EDownloadProgressingWithResume) { @@ -1719,11 +1719,11 @@ FLOG(_L("CFotaDownload::SetDownloadActive, aValue = %d"),aValue); iDownloadActive = aValue; TBool val (EFalse); - TInt err = RProperty::Get(TUid::Uid(KOmaDMAppUid), KFotaDownloadActive, val ); + TInt err = RProperty::Get(TUid::Uid(KFotaServerUid), KFotaDownloadActive, val ); if (err == KErrNone && val != aValue) { - err = RProperty::Set(TUid::Uid(KOmaDMAppUid), KFotaDownloadActive, aValue ); + err = RProperty::Set(TUid::Uid(KFotaServerUid), KFotaDownloadActive, aValue ); FLOG(_L("RProperty KFotaDownloadActive Set %d, err = %d"), aValue, err); } diff -r 696f5dd11939 -r 490439ac0bd4 remotemgmt_plat/device_management_parameter_api/inc/DevManInternalCRKeys.h --- a/remotemgmt_plat/device_management_parameter_api/inc/DevManInternalCRKeys.h Wed Jun 09 10:37:30 2010 +0300 +++ b/remotemgmt_plat/device_management_parameter_api/inc/DevManInternalCRKeys.h Mon Jun 21 16:37:58 2010 +0300 @@ -161,5 +161,11 @@ */ const TUint32 KDMDisclaimerAccepted = 0x00000011; +/* +* This key stores the TargetRef for SCOMO to send Alert. Default value is null. +*/ +const TUint32 KNSmlDMSCOMOTargetRef = 0x00000012; + + #endif // SYNCML_DEVMAN_INTERNAL_CR_KEYS_H diff -r 696f5dd11939 -r 490439ac0bd4 remotemgmt_plat/terminal_security_device_lock_api/inc/dmencryptionutil.inl --- a/remotemgmt_plat/terminal_security_device_lock_api/inc/dmencryptionutil.inl Wed Jun 09 10:37:30 2010 +0300 +++ b/remotemgmt_plat/terminal_security_device_lock_api/inc/dmencryptionutil.inl Mon Jun 21 16:37:58 2010 +0300 @@ -68,7 +68,7 @@ { User::Leave(terr); } - if(infoArray.Count() > 1) + if(infoArray.Count() != 1) { User::Leave(KErrBadName); } diff -r 696f5dd11939 -r 490439ac0bd4 syncmlfw/common/syncagent/src/nsmlstatuscontainer.cpp --- a/syncmlfw/common/syncagent/src/nsmlstatuscontainer.cpp Wed Jun 09 10:37:30 2010 +0300 +++ b/syncmlfw/common/syncagent/src/nsmlstatuscontainer.cpp Mon Jun 21 16:37:58 2010 +0300 @@ -16,7 +16,9 @@ */ - +#include +#include +#include //#include "nsmlcliagdefines.h" #include "NSmlStatusContainer.h" #include "nsmlcliagconstants.h" @@ -202,9 +204,59 @@ { (*iStatusArray)[aEntryID-1].statusIsFixed = ETrue; } + // TargertUri Fix + + TPtrC8 cmd( (TUint8*) (*iStatusArray)[aEntryID-1].status->cmd->content, (*iStatusArray)[aEntryID-1].status->cmd->length ); + if ( cmd == KNSmlAgentExec ) + { + CRepository* cenrep = NULL; + TInt err(KErrNone); + TRAP(err, cenrep = CRepository::NewL( KCRUidDeviceManagementInternalKeys )); + if(err == KErrNone) + { + TBuf8<256> targetPath; + TInt result = cenrep->Get( KNSmlDMSCOMOTargetRef, targetPath ); + if((targetPath.Length()) && (result == KErrNone)) + { + TPtrC8 sourcePath( (TUint8*) (*iStatusArray)[aEntryID-1].status->targetRefList->targetRef->content, (*iStatusArray)[aEntryID-1].status->targetRefList->targetRef->length ); + + SmlSource_t* source = new( ELeave ) SmlSource_t; + source->locURI = new( ELeave ) SmlPcdata_t; + source->locURI->SetDataL( sourcePath ); + source->locURI->contentType = SML_PCDATA_OPAQUE; + source->locURI->extension = SML_EXT_UNDEFINED; + source->locName = NULL; + + SmlTarget_t* target = new( ELeave ) SmlTarget_t; + target->locURI = new( ELeave ) SmlPcdata_t; + target->locURI->SetDataL( targetPath ); + target->locURI->contentType = SML_PCDATA_OPAQUE; + target->locURI->extension = SML_EXT_UNDEFINED; + target->locName = NULL; + AddSourceRefL( aEntryID, source ); + + SmlTargetRefList_t** targetRefList; + targetRefList = &(*iStatusArray)[aEntryID-1].status->targetRefList; + while( *targetRefList ) + { + if ((*targetRefList)->next == NULL ) + break; + targetRefList = &(*targetRefList)->next; + } + *targetRefList = new( ELeave ) SmlTargetRefList_t; + CreateTargetRefL( target, (*targetRefList)->targetRef ); + + _LIT8(KNullString, ""); + result = cenrep->Set( KNSmlDMSCOMOTargetRef, KNullString ); + } + delete cenrep; + cenrep = NULL; } + } + CleanupStack::PopAndDestroy(); //statusCode } + } // --------------------------------------------------------- // CNSmlStatusContainer::SetChalL() // Creates Chal element diff -r 696f5dd11939 -r 490439ac0bd4 syncmlfw/conf/devman.confml Binary file syncmlfw/conf/devman.confml has changed diff -r 696f5dd11939 -r 490439ac0bd4 syncmlfw/conf/devman_101F9A0A.crml Binary file syncmlfw/conf/devman_101F9A0A.crml has changed diff -r 696f5dd11939 -r 490439ac0bd4 terminalsecurity/SCP/SCPClient/src/SCPQueryDialog.cpp --- a/terminalsecurity/SCP/SCPClient/src/SCPQueryDialog.cpp Wed Jun 09 10:37:30 2010 +0300 +++ b/terminalsecurity/SCP/SCPClient/src/SCPQueryDialog.cpp Mon Jun 21 16:37:58 2010 +0300 @@ -412,9 +412,13 @@ if ( aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter) { - // Try to exit with OK as well - TryExitL(EAknSoftkeyOk); - return EKeyWasConsumed; + + if(QueryControl()->GetTextLength() > 0) { + // Try to exit with OK as well + TryExitL(EAknSoftkeyOk); + } + + return EKeyWasConsumed; } // app key