--- a/applicationmanagement/omascomoadapter/src/omascomoadapter.cpp Thu Aug 19 09:42:30 2010 +0300
+++ b/applicationmanagement/omascomoadapter/src/omascomoadapter.cpp Tue Aug 31 15:05:55 2010 +0300
@@ -48,7 +48,6 @@
#include <e32property.h>
#include <centralrepository.h>
#include <DevManInternalCRKeys.h>
-#include <httpdownloadmgrcommon.h>
#include "NSmlPrivateAPI.h"
@@ -56,7 +55,7 @@
#include "ampskeys.h"
#include "nsmldmtreedbclient.h"
-#include "SyncService.h"
+//#include "SyncService.h"
#include "amprivateCRKeys.h"
#include <e32cmn.h>
#include <SWInstDefs.h>
@@ -222,6 +221,8 @@
accessTypesAdd;
accessTypesAddReplace.SetReplace();
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step1" );
+
/*
Node: ./SCOMO
AM node is the common parent to all application management functionality nodes.
@@ -237,6 +238,8 @@
MSmlDmDDFObject::EPermanent, MSmlDmDDFObject::ENode,
KAMNodeDescription);
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 2" );
+
/*
Node: ./SCOMO/Inventory
This node is start node to application inventory.
@@ -251,6 +254,8 @@
MSmlDmDDFObject::EPermanent, MSmlDmDDFObject::ENode,
KAMInventoryNodeDescription);
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 3" );
+
/*
Node: ./SCOMO/Inventory/Delivered
This is node under which applications that are delivered but not installed are found.
@@ -265,6 +270,8 @@
MSmlDmDDFObject::EPermanent, MSmlDmDDFObject::ENode,
KAMDeliveredNodeDescription);
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 4" );
+
/*
Node: ./SCOMO/Inventory/Deployed
This is a node under which active applications are found.
@@ -281,6 +288,8 @@
MSmlDmDDFObject::EPermanent, MSmlDmDDFObject::ENode,
KAMDeployedNodeDescription);
+
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 5" );
/*
Node: ./SCOMO/Inventory/Delivered/<X>
This dynamic node is placeholder applications that are in Delivered state.
@@ -295,6 +304,8 @@
MSmlDmDDFObject::EZeroOrMore, MSmlDmDDFObject::EDynamic,
MSmlDmDDFObject::ENode, KAMDeliveredDynaNodeDescription);
+
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 6" );
/*
Node: ./SCOMO/Inventory/Delivered/<X>/PkgID
This leaf node holds an identifier for an application.
@@ -309,6 +320,7 @@
MSmlDmDDFObject::EPermanent, MSmlDmDDFObject::EChr,
KAMPkgIDNodeDescription);
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 7" );
/*
Node: ./SCOMO/Inventory/Delivered/<X>/Name
This leaf node holds name of an application.
@@ -323,7 +335,7 @@
MSmlDmDDFObject::EZeroOrOne, MSmlDmDDFObject::EPermanent,
MSmlDmDDFObject::EChr, KAMNameNodeDescription);
-
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 8" );
/*
Node: ./SCM/Inventory/Delivered/<X>/Status
This leaf node holds the status of the Delivered. The client updates the node value.
@@ -339,6 +351,8 @@
MSmlDmDDFObject::EPermanent, MSmlDmDDFObject::EInt,
KAMStatusNodeDescription);
+
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 9" );
/*
Node: ./SCOMO/Inventory/Delivered/<X>/PkgType
This leaf node holds an identifier for an application.
@@ -353,7 +367,7 @@
MSmlDmDDFObject::EPermanent, MSmlDmDDFObject::EChr,
KAMPkgTypeNodeDescription);
-
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 10" );
/*
Node: ./SCOMO/Inventory/Delivered/<X>/Data
This leaf node holds the data of an application.
@@ -368,18 +382,24 @@
MSmlDmDDFObject::EZeroOrOne, MSmlDmDDFObject::EPermanent,
MSmlDmDDFObject::EBin, KAMDataNodeDescription);
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 11" );
+
delda.AddDFTypeMimeTypeL(KSisxMimeType);
delda.AddDFTypeMimeTypeL(KSisMimeType);
delda.AddDFTypeMimeTypeL(KPipMimeType);
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 12" );
+
FeatureManager::InitializeLibL();
if (FeatureManager::FeatureSupported(KFeatureIdJavaMIDP20) )
{
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 13" );
delda.AddDFTypeMimeTypeL(KJadMIMEType);
delda.AddDFTypeMimeTypeL(KJarMIMEType);
delda.AddDFTypeMimeTypeL(KJavaMIMEType);
}
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 14" );
FeatureManager::UnInitializeLib();
/*
@@ -396,6 +416,7 @@
MSmlDmDDFObject::EZeroOrOne, MSmlDmDDFObject::EPermanent,
MSmlDmDDFObject::EBin, KAMDescriptorNodeDescription);
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 15" );
/*
Node: ./SCOMO/Inventory/Delivered/<X>/State
This leaf node holds state value of an application.
@@ -410,7 +431,7 @@
FillNodeInfoL(delstate, accessTypesGet, MSmlDmDDFObject::EOne,
MSmlDmDDFObject::EPermanent, MSmlDmDDFObject::EChr,
KAMStateValueNodeDescription);
-
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 16" );
/*
Node: ./SCOMO/Inventory/Delivered/<X>/Operations
This is a node that allows vendors to extend functionality.
@@ -474,7 +495,7 @@
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
DEPLOYED
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
-
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 17" );
/*
Node: ./SCOMO/Inventory/Deployed/<X>
This dynamic node is placeholder applications that are in Inactive state.
@@ -530,7 +551,7 @@
FillNodeInfoL(deplver, accessTypesGetAddReplace,
MSmlDmDDFObject::EZeroOrOne, MSmlDmDDFObject::EPermanent,
MSmlDmDDFObject::EChr, KAMVersionNodeDescription);
-
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 18" );
/*
Node: ./SCOMO/Inventory/Deployed/<X>/Description
This leaf node holds the version of an application.
@@ -588,7 +609,7 @@
FillNodeInfoL(deplstate, accessTypesGet, MSmlDmDDFObject::EOne,
MSmlDmDDFObject::EPermanent, MSmlDmDDFObject::EChr,
KAMStateValueNodeDescription);
-
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 19" );
/*
Node: ./SCOMO/Inventory/Deployed/<X>/Operations
This is a node that allows vendors to extend functionality.
@@ -619,7 +640,7 @@
FillNodeInfoL(deplrem, accessTypesExecReplace, MSmlDmDDFObject::EOne,
MSmlDmDDFObject::EPermanent, MSmlDmDDFObject::ENode,
KAMRemoveNodeDescription);
-
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 20" );
/*
Node: ./SCOMO/Inventory/Deployed/<X>/Operations/Activate
Exec command causes device to activate an application.
@@ -696,7 +717,7 @@
FillNodeInfoL(dowid, accessTypesGetAddReplace, MSmlDmDDFObject::EOne,
MSmlDmDDFObject::EPermanent, MSmlDmDDFObject::EChr,
KAMPkgIDNodeDescription);
-
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 21" );
/*
Node: ./SCOMO/Download/<X>/Name
This leaf node holds name of an application.
@@ -829,7 +850,7 @@
MSmlDmDDFObject::EPermanent, MSmlDmDDFObject::ENode,
KAMDownloadAndInstallAndInActivateNodeName);
-
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 22" );
#ifdef __AM_LASTERROR_NODE
MSmlDmDDFObject& amext = am.AddChildObjectL(KAMExtNodeName);
FillNodeInfoL(amext, accessTypesGet, MSmlDmDDFObject::EOne,
@@ -843,13 +864,16 @@
#endif
// Ignore generic alert error status if any otherwise adapter fails to load
-
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 23" );
TRAP_IGNORE(SendPendingGenericAlertL());
- if (GetAdapterValue() == KAMSCOMOAdapter)
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 24" );
+ //if (GetAdapterValue() == KAMSCOMOAdapter)
{
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 25" );
CheckStateChangesL();
SetAdapterValue(KAMDefaultValue);
}
+ RDEBUG( "CSCOMOAdapter::DDFStructureL(): Step 26" );
CheckAndAddPredefinedNodeL();
RDEBUG( "CSCOMOAdapter::DDFStructureL(): end" );
}
@@ -922,11 +946,8 @@
TBuf8<6> dataresult;
dataresult.Num(finalresult);
- RDEBUG8_2("CSCOMOAdapter::GetIdentifierIdL is targetURIGet '%S'", &targetURIGet);
+ TPtrC8 mapping(NSmlDmURI::LastURISeg(targetURIGet) );
- //TPtrC8 mapping(NSmlDmURI::LastURISeg(targetURIGet) );
-
- HBufC8* identifier=GetIdentifierIdL(internalid );
TInt retryupdate = iAMdb->GetRetryCountForLuidL(internalid);
@@ -965,7 +986,7 @@
ptr.Append(dataresult);
ptr.Append(KResultCodeEnd);
ptr.Append(KIdentifierStart);
- ptr.Append(*identifier);
+ ptr.Append(mapping);
ptr.Append(KIdentifierEnd);
//ptr.Append(KDataEnd);
@@ -995,29 +1016,18 @@
TRAP_IGNORE(privateAPI.AddDMGenericAlertRequestL(
*genericalerts[i]->iCorrelator,iItemArray ));
-
-
- //cleanup all the allocated heap cells
- if(data)
+
+
delete data;
- if(metamark)
delete metamark;
- if(metaformat)
delete metaformat;
- if(metatype)
delete metatype;
- if(targeturi)
delete targeturi;
-
- if(item)
delete item;
-
- if(identifier)
- delete identifier;
iItemArray.Reset();
iItemArray.Close();
@@ -1051,9 +1061,7 @@
TPckg<TCertInfo> pcert(info);
errx = re->Get(KCertKey, pcert) ;
- RDEBUG("CSCOMOAdapter::SessionL() aCertInfo");
-
- //RDEBUG_2("aCertInfo.iFingerprint.Length() is %u",info.iFingerprint.Length() );
+ RDEBUG_2("aCertInfo.iFingerprint.Length() is %u",info.iFingerprint.Length() );
if (errx == KErrNone)
{
RDEBUG("CSCOMOAdapter::SessionL() errx == KErrNone");
@@ -1286,7 +1294,6 @@
TDeplCompAttrType fl(UpdateFlagFromMapping(mapping) );
-
if (mapping == KAMDataNodeName || mapping
== KAMDescriptorNodeName)
{
@@ -1755,13 +1762,12 @@
iManagement.StateChangeComplete(aLuidi);
DeactivateIfInactive(aLuidi, aTargetState);
- aRet = EExecSuccess;
+ aRet = EOk;
}
else
{
RDEBUG_2( "CSCOMOAdapter::InstallL(): INSTALL FAILED '%d'" , err);
- //MAPERROR( err, aRet, _L8("Install %d") );
- aRet = EExecInstallFailed;
+ MAPERROR( err, aRet, _L8("Install %d") );
}
}
@@ -1855,7 +1861,7 @@
const TDesC8& aArgument, const TDesC8& /*aType*/, TInt aStatusRef)
{
-#ifdef __TARM_SYMBIAN_CONVERGENCY
+#ifdef __TARM_SYMBIAN_CONVERGENCY //Done by Dipak
TPtrC8 uriPtrc = NSmlDmURI::RemoveDotSlash(aURI);
#else
//nothing
@@ -1864,14 +1870,14 @@
RDEBUG8_3("CSCOMOAdapter::ExecuteCommandL(): begin, '%S', '%S'", &aURI, &aLUID );
SetAdapterValue(KAMSCOMOAdapter);
CheckStateChangesL();
- TError ret(EExecUndefError);
+ TError ret(EError);
if (aLUID == KNullDesC8)
{
RDEBUG("CSCOMOAdapter::ExecuteCommandL(): WARNING no valid luid provided" );
}
-#ifdef __TARM_SYMBIAN_CONVERGENCY
+#ifdef __TARM_SYMBIAN_CONVERGENCY //Done by Dipak
TInt cnt( NSmlDmURI::NumOfURISegs( uriPtrc ) );
#else
TInt cnt(NSmlDmURI::NumOfURISegs(aURI) );
@@ -1954,19 +1960,18 @@
else
if (errx == KErrArgument)
{
- ret = EExecUndefError;
+ ret = EInvalidObject ;
}
else
{
- ret = EExecUndefError;
+ ret = EError;
}
}
- SetSCOMOTargetURIL(*iUriDel, mapping, ret);
}
else
{
- ret = EExecUndefError;
+ ret = ENotFound;
RDEBUG( "CSCOMOAdapter::ExecuteCommandL(): case 5 Not found node" );
}
break;
@@ -2010,7 +2015,7 @@
}
else
{
- ret = EExecInstallFailed;
+ ret = ENotFound;
RDEBUG( "CSCOMOAdapter::ExecuteCommandL(): case 6 install Not found node" );
}
}
@@ -2049,7 +2054,7 @@
err = iDbSession.RemoveMappingInfoL(KAMAdapterImplUid, aclmapping);
if (err == KErrNone)
{
- ret = EExecSuccess;
+ ret = EOk;
}
if (iInAtomic)
{
@@ -2062,17 +2067,16 @@
RDEBUG_2( "CSCOMOAdapter::ExecuteCommandL(): Remove FAILED '%d'", err);
if (err == SwiUI::KSWInstErrUserCancel)
- ret = EExecUserCancelled;
+ ret = EError;
else
MAPERROR( err, ret, _L8("Execute Remove %d") );
}
}
else
{
- ret = EExecRemoveFailed;
+ ret = ENotFound;
RDEBUG( "CSCOMOAdapter::ExecuteCommandL(): case 6 remove Not found node" );
}
- SetSCOMOTargetURIL(*iUriDel, mapping, ret);
}
else
if (mapping == KAMActivateNodeName)
@@ -2092,17 +2096,15 @@
if (iluid > 0)
{
TRAP_IGNORE( SessionL().ActivateL( iluid ) );
- ret = EExecSuccess;
+ ret = EOk;
//MAPERROR( erx, ret, _L8("Activate %d") );
}
else
{
- ret = EExecActivateFailed;
+ ret = ENotFound;
RDEBUG( "CSCOMOAdapter::ExecuteCommandL(): case 6 Activate Not found node" );
}
-
- SetSCOMOTargetURIL(*iUriDel, mapping, ret);
}
else
if (mapping == KAMDeActivateNodeName)
@@ -2126,23 +2128,20 @@
{
TRAP_IGNORE(SessionL().DeactivateL( iluid ) )
;
- ret = EExecSuccess;
+ ret = EOk;
//MAPERROR( erx, ret,_L8("Dectivate %d") );
}
else
{
- ret = EExecDeactivateFailed;
+ ret = ENotFound;
RDEBUG( "CSCOMOAdapter::ExecuteCommandL(): case 6 DeActivate Not found node" );
}
-
- SetSCOMOTargetURIL(*iUriDel, mapping, ret);
-
}
else
{
RDEBUG8_2( "CSCOMOAdapter::ExecuteCommandL(): ASKED NOT SUPPORTED OPERATION '%S'", &mapping );
- ret = EExecUndefError;
+ ret = EError;
}
break;
}
@@ -2151,128 +2150,20 @@
{
RDEBUG8_3( "CSCOMOAdapter::ExecuteCommandL(): ILLEGAL LEVEL %d NODE %S", cnt, &aURI );
- ret = EExecUndefError;
+ ret = EInvalidObject;
break;
}
}
SetStatusL(aStatusRef, ret) ;
}
-
-void CSCOMOAdapter::SetSCOMOTargetURIL(const TDesC8& aURI,
- const TDesC8& aMapping,const TError& aErrorStatus)
- {
-
- RDEBUG( "CSCOMOAdapter:: SetSCOMOTargetURI" );
-
- TInt cnt(NSmlDmURI::NumOfURISegs(aURI));
- _LIT8( KNSmlNull, "null" );
-
- CRepository* cenrep = NULL;
- TInt errr(KErrNone);
-
- TRAP(errr, cenrep = CRepository::NewL( KCRUidDeviceManagementInternalKeys ));
-
- if (errr == KErrNone)
- {
-
- switch (cnt)
- {
- case 3:
- {
-
- RDEBUG( "CSCOMOAdapter:: SetSCOMOTargetURI case 3" );
-
- TInt ASyncSupported = -1;
-
- CRepository *repository = CRepository::NewLC(
- KCRUidPrivateApplicationManagementKeys);
- repository->Get(KAsyncEnabled, ASyncSupported);
- CleanupStack::PopAndDestroy();
-
- //means accepted for processing set <Target><LOCURI> to NULL.
- if (ASyncSupported)
- {
- RDEBUG( "CSCOMOAdapter:: ASyncSupported" );
-
- TInt err1 = cenrep->Set(KNSmlDMSCOMOTargetRef, KNSmlNull);
-
- RDEBUG_2( "CSCOMOAdapter:: ASyncSupported %d", err1 );
-
- }
-
- }
- break;
-
- case 4:
- {
-
- RDEBUG( "CSCOMOAdapter:: SetSCOMOTargetURI case 4" );
-
- if (aMapping == KAMRemoveNodeName)
- {
-
- if (aErrorStatus == EExecSuccess)
- {
- cenrep->Set(KNSmlDMSCOMOTargetRef, KNSmlNull);
- }
- }
-
- if (aMapping == KAMActivateNodeName || aMapping
- == KAMDeActivateNodeName)
- {
-
- RDEBUG( "CSCOMOAdapter:: SetSCOMOTargetURI case KAMActivateNodeName or KAMDeActivateNodeName " );
-
- if (aErrorStatus == EExecSuccess)
- {
- RDEBUG( "CSCOMOAdapter:: EExecSuccess " );
- _LIT8( KAMInitial, "./" );
- _LIT8( KAMSeparator8, "/" );
- _LIT8( KAMStateValueNodeName, "State" );
- TBuf8<256> targetStateURI;
- targetStateURI.Append(KAMInitial);
- targetStateURI.Append(aURI);
-
- targetStateURI.Append(KAMSeparator8);
- targetStateURI.Append(KAMStateValueNodeName);
-
- cenrep->Set(KNSmlDMSCOMOTargetRef, targetStateURI);
- RDEBUG( "CSCOMOAdapter:: EExecSuccess End" );
- }
- else
- {
- cenrep->Set(KNSmlDMSCOMOTargetRef, KNSmlNull);
- }
-
- }
-
- }
-
- break;
- }
-
- }
-
- if (cenrep)
- {
- delete cenrep;
- cenrep = NULL;
- }
-
- }
-
-
void CSCOMOAdapter::ASyncReportL(TUint32 aLuid, const TDesC8& aArgument,
const TDownloadTarget aTarget,const TDesC8& aURI)
{
-
// while sending generic alert
// adapter uses entry stored in database and constructs generic alert
// using SyncML framework API.
-
TInt index = 0;
-
// Default max retry count is 5. It is also cenep configurable
// Cenrep configuration responsible can change the max retry
// count
@@ -2294,7 +2185,7 @@
//Add Download entry to database
iAMdb->SaveToDatabaseL(index, aLuid, profId, retrycount, aURI,
- *serverId, aArgument);
+ *serverId, aArgument);
CleanupStack::PopAndDestroy(serverId);
@@ -2310,13 +2201,13 @@
EOwnerThread);
User::LeaveIfError(r);
- CSyncService *syncService = CSyncService::NewL(NULL, KDevManServiceStart);
+ /*CSyncService *syncService = CSyncService::NewL(NULL, KDevManServiceStart);
if (syncService)
{
syncService->EnableProgressNoteL(EFalse);
}
- delete syncService;
+ delete syncService;*/
// wait for the previously attached ‘counter’ property to be updated
TRequestStatus s;
@@ -2331,61 +2222,61 @@
{
case KStatusUserCancelled:
{
- aRet = MSmlDmAdapter::EExecUserCancelled;
+ aRet = MSmlDmAdapter::EError;
break;
}
case KStatusDowloadFailedOOM:
{
- aRet = MSmlDmAdapter::EExecDownFailOOM;
+ aRet = MSmlDmAdapter::EError;
break;
}
case KStatusAlternateDownldAuthFail:
{
- aRet = MSmlDmAdapter::EExecAltDwnldAuthFail;
+ aRet = MSmlDmAdapter::EError;
break;
}
case KStatusDownloadFailed:
{
- aRet = MSmlDmAdapter::EExecDownloadFailed;
+ aRet = MSmlDmAdapter::EError;
break;
}
case KStatusPkgValidationFailed:
{
- aRet = MSmlDmAdapter::EExecPkgValidationFail;
+ aRet = MSmlDmAdapter::EError;
break;
}
case KStatusInstallFailedOOM:
{
- aRet = MSmlDmAdapter::EExecInstallOOM;
+ aRet = MSmlDmAdapter::EError;
break;
}
case KStatusInstallFailed:
{
- aRet = MSmlDmAdapter::EExecInstallFailed;
+ aRet = MSmlDmAdapter::EError;
break;
}
case KStatusUnSupportedEnvironment:
{
- aRet = MSmlDmAdapter::EExecOperationReject;
+ aRet = MSmlDmAdapter::EError;
break;
}
case KStatusAltDowldUnavailable:
{
- aRet = MSmlDmAdapter::EExecAltDwnldSrvUnavailable;
+ aRet = MSmlDmAdapter::EError;
break;
}
default:
{
- aRet = MSmlDmAdapter::EExecSuccess;
+ aRet = MSmlDmAdapter::EOk;
break;
}
}
@@ -4472,20 +4363,29 @@
void CSCOMOAdapter::CheckAndAddPredefinedNodeL()
{
+ RDEBUG("CSCOMOAdapter::CheckAndAddPredefinedNodeL(): begin");
+
// Check if SCOMODefault node addition is enabled.
TInt staticnodeenabled = 0;
CRepository* cenrep = CRepository::NewLC( KCRUidPrivateApplicationManagementKeys );
cenrep->Get( KAMStaticNodeEnabled, staticnodeenabled );
CleanupStack::PopAndDestroy(); //cenrep
-
+ RDEBUG("CSCOMOAdapter::CheckAndAddPredefinedNodeL(): step1");
+
if(staticnodeenabled)
{
TBuf8<KMaxFullName> temp;
+
+ RDEBUG("CSCOMOAdapter::CheckAndAddPredefinedNodeL(): step2");
GetPredefinedNodeL(temp);
+
+ RDEBUG("CSCOMOAdapter::CheckAndAddPredefinedNodeL(): step3");
if (temp.Length())
{
+
+ RDEBUG("CSCOMOAdapter::CheckAndAddPredefinedNodeL(): step4");
TBuf8<KMaxFullName> temp1;
temp1.Zero();
temp1.Copy(KAMNodeName);
@@ -4493,8 +4393,11 @@
temp1.Append(KAMDownloadNodeName);
temp1.Append(KAMSeparator8);
temp1.Append(temp);
+
HBufC8* luid = DirectGetLuidAllocLC(temp1);
+ RDEBUG("CSCOMOAdapter::CheckAndAddPredefinedNodeL(): step5");
+
if (luid->Length() > 0)
{
CleanupStack::PopAndDestroy(luid);
@@ -4502,16 +4405,20 @@
}
else
{
+ RDEBUG("CSCOMOAdapter::CheckAndAddPredefinedNodeL(): step6");
// Not found, add node and mapping ...
//TError status(EError);
TPtrC8 mapping(NSmlDmURI::LastURISeg(temp1) );
TPtrC8 parent(NSmlDmURI::RemoveLastSeg(temp1) );
TPtrC8 parentMapping(NSmlDmURI::LastURISeg(parent) );
TInt cnt(NSmlDmURI::NumOfURISegs(temp1) );
+ RDEBUG("CSCOMOAdapter::CheckAndAddPredefinedNodeL(): step7");
TUint32 newLuid(SessionL().DownloadL(mapping));
//Callback().SetMappingL( temp1, *IntToDes8LC( newLuid ) );
//CleanupStack::PopAndDestroy();
+ RDEBUG("CSCOMOAdapter::CheckAndAddPredefinedNodeL(): step8");
DirectSetMappingL(temp1, *IntToDes8LC(newLuid) );
+ RDEBUG("CSCOMOAdapter::CheckAndAddPredefinedNodeL(): step9");
CleanupStack::PopAndDestroy(); // for IntToDes8LC()
CleanupStack::PopAndDestroy(luid);
}
@@ -4559,6 +4466,8 @@
TInt adapterValue;
CRepository *repository = NULL;
TRAPD( err, repository = CRepository::NewL ( KCRUidPrivateApplicationManagementKeys ) );
+
+ RDEBUG_2("error reading cenrep %d", err);
if (err == KErrNone)
{
err = repository->Get(KAMAdapterValue, adapterValue);
@@ -4589,37 +4498,5 @@
}
return isSupportedMimeType;
}
-
-HBufC8* CSCOMOAdapter::GetIdentifierIdL(const TUint32 aluid)
- {
- RDEBUG( "CSCOMOAdapter::GetIdentifierIdL: const TUint32 aluid, const TDesC8& aTargetUri" );
-
- _LIT8(KNull, "null");
- TDeploymentComponent comp;
- HBufC8 *id = NULL;
- TInt err(SessionL().DeploymentComponent(aluid, comp) );
- RDEBUG( "CSCOMOAdapter::GetIdentifierIdL: Step 1" );
-
- if(err == KErrNone)
- {
- RDEBUG( "CSCOMOAdapter::GetIdentifierIdL: Step 1.1" );
- if(comp.iState == EDCSDelivered || comp.iState ==EDCSDownload)
- {
- RDEBUG( "CSCOMOAdapter::GetIdentifierIdL: iState EDCSActive,EDCSInactive" );
- id = (comp.iPkgID).AllocL();
- }
- else if(comp.iState==EDCSActive || comp.iState ==EDCSInactive)
- {
- RDEBUG( "CSCOMOAdapter::GetIdentifierIdL: iState EDCSDelivered,EDCSDownload" );
- id = (comp.iId).AllocL();
- }
- else
- {
- id = KNull().AllocL();
- }
- }
- RDEBUG( "CSCOMOAdapter::GetIdentifierIdL: Step 1 end" );
- return id;
- }
// End of File