--- a/applicationmanagement/omascomoadapter/src/omascomoadapter.cpp Wed Jun 09 09:27:55 2010 +0300
+++ b/applicationmanagement/omascomoadapter/src/omascomoadapter.cpp Mon Jun 21 15:26:00 2010 +0300
@@ -957,14 +957,14 @@
HBufC8 *data = HBufC8::NewL(1024);
TPtr8 ptr = data->Des();
- ptr.Append(KDataStart);
+ //ptr.Append(KDataStart);
ptr.Append(KResultCodeStart);
ptr.Append(dataresult);
ptr.Append(KResultCodeEnd);
ptr.Append(KIdentifierStart);
ptr.Append(mapping);
ptr.Append(KIdentifierEnd);
- ptr.Append(KDataEnd);
+ //ptr.Append(KDataEnd);
HBufC8 *sourceuri = genericalerts[i]->iSourceURI;
--- a/applicationmanagement/server/inc/ApplicationManagementServer.h Wed Jun 09 09:27:55 2010 +0300
+++ b/applicationmanagement/server/inc/ApplicationManagementServer.h Mon Jun 21 15:26:00 2010 +0300
@@ -434,6 +434,8 @@
void GenericAlertSentForIdL(const RMessage2& aMessage) const;
void CheckStatusNodesValuesL();
+
+ void SetSCOMOTargetURI(const TDesC8& aURI) const;
private:
void LookupSisRegistryL();
--- a/applicationmanagement/server/src/ApplicationManagementServer.cpp Wed Jun 09 09:27:55 2010 +0300
+++ b/applicationmanagement/server/src/ApplicationManagementServer.cpp Mon Jun 21 15:26:00 2010 +0300
@@ -334,6 +334,41 @@
KSyncNotifier, EOwnerThread);
User::LeaveIfError(r);
+ TBuf8<256> targetURI;
+
+ TDeploymentComponentState state = aComponent->State();
+
+ if (state == EDCSDownload)
+ {
+ targetURI.Append(KDownloadState);
+ targetURI.Append(aComponent->UserId());
+ }
+ else
+ if (state == EDCSDelivered)
+ {
+ targetURI.Append(KDeliveredState);
+ targetURI.Append(aComponent->UserId());
+
+ }
+ else
+ if (state == EDCSActive|| state == EDCSInactive)
+ {
+ targetURI.Append(KDeployedState);
+ targetURI.Append(aComponent->UserId());
+ }
+
+ //Set Targeturi to cenrep
+
+ CRepository* cenrep = NULL;
+ TInt errr(KErrNone);
+ TRAP(errr, cenrep = CRepository::NewL( KCRUidDeviceManagementInternalKeys ));
+ if(errr == KErrNone)
+ {
+ errr = cenrep->Set( KNSmlDMSCOMOTargetRef, targetURI );
+ delete cenrep;
+ cenrep = NULL;
+ }
+
TInt err = counter.Set(KErrCancel);
User::LeaveIfError(err);
counter.Close();
@@ -2789,6 +2824,8 @@
RDEBUG_2( "ApplicationManagementSession: DeactivateL id is %d", id );
CDeploymentComponent &compo = Server().Storage()->ComponentL(id);
Server().Storage()->DeactivateL(compo);
+
+ SetSCOMOTargetURI(compo.UserId());
}
// -------------------------------------------------------------------------------------------------------------------
@@ -2805,6 +2842,8 @@
RDEBUG_2( "ApplicationManagementSession: ActivateL id is %d", id );
CDeploymentComponent &compo = Server().Storage()->ComponentL(id);
Server().Storage()->ActivateL(compo);
+
+ SetSCOMOTargetURI(compo.UserId());
}
// -------------------------------------------------------------------------------------------------------------------
@@ -2824,6 +2863,36 @@
aMessage.Write( 1, compo.UserId() );
}
+void CApplicationManagementSession::SetSCOMOTargetURI(const TDesC8& aURI) const
+ {
+ _LIT8( KAMSeparator8, "/" );
+ _LIT8( KAMStateValueNodeName, "State" );
+ TBuf8<256> targetStateURI(KDeployedState);
+
+ targetStateURI.Append(aURI);
+
+ targetStateURI.Append(KAMSeparator8);
+ targetStateURI.Append(KAMStateValueNodeName);
+
+ CRepository* cenrep = NULL;
+ TInt errr(KErrNone);
+
+ TRAP(errr, cenrep = CRepository::NewL( KCRUidDeviceManagementInternalKeys ));
+
+ if(errr == KErrNone)
+ {
+ errr = cenrep->Set(KNSmlDMSCOMOTargetRef, targetStateURI);
+ }
+
+ if(cenrep)
+ {
+ delete cenrep;
+ cenrep = NULL;
+ }
+
+
+ }
+
// -------------------------------------------------------------------------------------------------------------------
// CApplicationManagementSession::GetTemporaryInstFileL()
// -------------------------------------------------------------------------------------------------------------------
@@ -2991,7 +3060,30 @@
CDeploymentComponent &compo = Server().Storage()->ComponentL(id);
if (compo.State() == EDCSDelivered)
{
- Server().DoTheInstallL(compo) ;
+ TInt err(KErrNone);
+ TRAP(err, Server().DoTheInstallL(compo)) ;
+ TBuf8<256> targetURI;
+ TDeploymentComponentState state = compo.State();
+ if( state == EDCSDelivered)
+ {
+ targetURI.Append(KDeliveredState);
+ targetURI.Append(compo.UserId());
+ }
+ else if (state == EDCSActive|| state == EDCSInactive)
+ {
+ targetURI.Append(KDeployedState);
+ targetURI.Append(compo.UserId());
+ }
+
+ //Set Targeturi to cenrep
+ CRepository* cenrep = NULL;
+ TRAP(err, cenrep = CRepository::NewL( KCRUidDeviceManagementInternalKeys ));
+ if(err == KErrNone)
+ {
+ err = cenrep->Set( KNSmlDMSCOMOTargetRef, targetURI );
+ delete cenrep;
+ cenrep = NULL;
+ }
}
else
{
@@ -3654,7 +3746,7 @@
const RMessage2& aMessage) const
{
RDEBUG( "CApplicationManagementSession: StateChangeComponentIdsCountL" );
- RPointerArray<TPreInstalledAppParams> preInstalledAppParams;
+ RPointerArray<TPreInstalledAppParams> preInstalledAppParams;
CAMPreInstallApp* preInstallApp = CAMPreInstallApp::NewL();
preInstallApp->GetPreInstalledAppsL(preInstalledAppParams);
TInt count = 0;
--- a/omadm/omadmappui/group/NSmlDMSync.mmp Wed Jun 09 09:27:55 2010 +0300
+++ b/omadm/omadmappui/group/NSmlDMSync.mmp Mon Jun 21 15:26:00 2010 +0300
@@ -26,7 +26,10 @@
UID 0x100039CE 0x101F6DE5
EPOCSTACKSIZE 0x5000
+/*#if 0
CAPABILITY CAP_APPLICATION
+#endif*/
+CAPABILITY DiskAdmin LocalServices Location NetworkServices ReadDeviceData ReadUserData SwEvent UserEnvironment WriteDeviceData WriteUserData
VENDORID VID_DEFAULT
--- a/omadm/omadmappui/inc/NSmlDMSyncAppUi.h Wed Jun 09 09:27:55 2010 +0300
+++ b/omadm/omadmappui/inc/NSmlDMSyncAppUi.h Mon Jun 21 15:26:00 2010 +0300
@@ -41,11 +41,6 @@
class CNSmlDMDbNotifier;
class CNSmlDMFotaView;
-
-/** If download is active this P&S key is set to ETrue, otherwise EFalse.
- * The key is owned by omadmappui**/
-const TUint32 KFotaDownloadActive = 0x0000008;
-
/**
* Application UI class.
* Provides support for the following features:
--- a/omadm/omadmappui/src/NSmlDMFotaContainer.cpp Wed Jun 09 09:27:55 2010 +0300
+++ b/omadm/omadmappui/src/NSmlDMFotaContainer.cpp Mon Jun 21 15:26:00 2010 +0300
@@ -161,7 +161,7 @@
{
FLOG( "[OMADM]\t entered in to first if loop of keys" );
TBool value (EFalse);
- TInt err = RProperty::Get( KPSUidNSmlDMSyncApp, KFotaDLStatus, value );
+ TInt err = RProperty::Get( KFotaServerAppUid, KFotaDLStatus, value );
if (!err && value == 1)
{
FLOG( "[OMADM]\t Ongoing Fota operation identified." );
--- a/omadm/omadmappui/src/NSmlDMSyncAppUi_fota.cpp Wed Jun 09 09:27:55 2010 +0300
+++ b/omadm/omadmappui/src/NSmlDMSyncAppUi_fota.cpp Mon Jun 21 15:26:00 2010 +0300
@@ -45,8 +45,6 @@
#include <csxhelp/dm.hlp.hrh>
#include <aknmessagequerydialog.h> // For CAknMessageQueryDialog
-
-#include <fotaConst.h>
// For KCalenHoursInDay = 24 and other time-related constants.
#include <calenconstants.h>
@@ -243,7 +241,7 @@
TInt r1=RProperty::Set(KPSUidNSmlDMSyncApp,KNSmlDMSyncUiLaunchKey,value);
TBool val (EFalse);
- TInt err = RProperty::Get(TUid::Uid(KOmaDMAppUid), KFotaDownloadActive, val );
+ TInt err = RProperty::Get(KFotaServerAppUid, KFotaDLStatus, val );
if(val == 1)
{
TApaTaskList taskList(CEikonEnv::Static()->WsSession());
@@ -823,7 +821,7 @@
{
//When Download is going on
TInt value = KErrNotFound, err = KErrNotFound;
- err = RProperty::Get(KPSUidNSmlDMSyncApp,KFotaDLStatus,value);
+ err = RProperty::Get(KFotaServerAppUid,KFotaDLStatus,value);
FTRACE( FPrint( _L("[OMADM]\t CNSmlDMSyncAppUi::CheckFotaDl() \
KFotaDLStatus val = %d & err = %d"),
value,err ) );
--- a/omadm/omadmappui/src/NSmlDMSyncDocument.cpp Wed Jun 09 09:27:55 2010 +0300
+++ b/omadm/omadmappui/src/NSmlDMSyncDocument.cpp Mon Jun 21 15:26:00 2010 +0300
@@ -52,9 +52,6 @@
TInt err = RProperty::Delete(KPSUidNSmlDMSyncApp,KServerAlertType);
FTRACE( FPrint(
_L("CNSmlDMSyncDocument::~CNSmlDMSyncDocument KServerAlertType key deletion with error err = %d"),err ) );
- err = RProperty::Delete(KPSUidNSmlDMSyncApp, KFotaDLStatus);
- FTRACE( FPrint(
- _L("CNSmlDMSyncDocument::~CNSmlDMSyncDocumentKFotaDLStatus key deletion with error err = %d"),err ) );
//IAD****
err = RProperty::Delete(KPSUidNSmlDMSyncApp, KDMIdle);
@@ -151,15 +148,15 @@
_L("KDMIdle setting err = %d, err1 = %d"),err, err1 ) );
- err = RProperty::Define( KPSUidNSmlDMSyncApp,
+ /*err = RProperty::Define( KPSUidNSmlDMSyncApp,
KFotaDLStatus,
- RProperty::EInt,KReadPolicy,KWritePolicy1);
+ RProperty::EInt,KReadPolicy,KWritePolicy2);
err1 = RProperty::Set( KPSUidNSmlDMSyncApp,
- KFotaDLStatus,KErrNotFound );
+ KFotaDLStatus,KErrNotFound ); */
FLOG( "[OMADM] CNSmlDMSyncDocument::ConstructL() completed" );
- FTRACE( FPrint(
- _L("KFotaDLStatus setting err = %d, err1 = %d"),err, err1 ) );
+ //FTRACE( FPrint(
+ // _L("KFotaDLStatus setting err = %d, err1 = %d"),err, err1 ) );
err = RProperty::Define( KPSUidNSmlDMSyncApp,
KDmJobCancel,
RProperty::EInt,KReadPolicy,KWritePolicy1);
--- a/omadm/omadmappui/src/NSmlDMSyncHandler.cpp Wed Jun 09 09:27:55 2010 +0300
+++ b/omadm/omadmappui/src/NSmlDMSyncHandler.cpp Mon Jun 21 15:26:00 2010 +0300
@@ -527,7 +527,7 @@
TInt value =EFalse;
- TInt r=RProperty::Get( KPSUidNSmlDMSyncApp, KFotaDLStatus, value );
+ TInt r=RProperty::Get( KFotaServerAppUid, KFotaDLStatus, value );
FTRACE( FPrint(
_L("KFotaDLStatus = %d"),r ) );