40 #endif |
40 #endif |
41 |
41 |
42 const TInt KGranularity = 4; |
42 const TInt KGranularity = 4; |
43 // FOTA |
43 // FOTA |
44 _LIT8 ( KNSmlDMFotaNode, "FUMO" ); |
44 _LIT8 ( KNSmlDMFotaNode, "FUMO" ); |
45 _LIT8 ( KNSmlDMAcc, "DMAcc"); |
|
46 _LIT8 ( KNSmlDMRoot, "." ); |
45 _LIT8 ( KNSmlDMRoot, "." ); |
47 // FOTA end |
46 // FOTA end |
48 |
47 |
49 // =========================================================================== |
48 // =========================================================================== |
50 // CNSmlDmDDF |
49 // CNSmlDmDDF |
224 } |
223 } |
225 if( find <= KErrNotFound ) |
224 if( find <= KErrNotFound ) |
226 { |
225 { |
227 TBool returnstatus = ETrue; |
226 TBool returnstatus = ETrue; |
228 TPtrC8 Uri1 = NSmlDmURI::URISeg(aURI,1); |
227 TPtrC8 Uri1 = NSmlDmURI::URISeg(aURI,1); |
229 if( iAddRootNodesList && Uri1.Match(KNSmlDMAcc) >= KErrNone )//dm case |
228 if( iAddRootNodesList )//dm case |
230 { |
229 { |
231 TPtrC8 FindUri = NSmlDmURI::URISeg(aURI,2); |
230 TPtrC8 FindUri = NSmlDmURI::URISeg(aURI,2); |
232 HBufC8* puri = HBufC8::NewLC(Uri1.Length()+FindUri.Length()+2); |
231 HBufC8* puri = HBufC8::NewLC(Uri1.Length()+FindUri.Length()+2); |
233 puri->Des().Append(aURI.Left(Uri1.Length()+FindUri.Length()+1)); |
232 puri->Des().Append(aURI.Left(Uri1.Length()+FindUri.Length()+1)); |
234 puri->Des().Append(','); |
233 puri->Des().Append(','); |
289 NodeorLeafexists ); |
288 NodeorLeafexists ); |
290 if( ( err1 == KErrNone && NodeorLeafexists == EAddCmd ) && |
289 if( ( err1 == KErrNone && NodeorLeafexists == EAddCmd ) && |
291 (err == KErrNone && (NodeAddingSuccess == EAdded || |
290 (err == KErrNone && (NodeAddingSuccess == EAdded || |
292 NodeAddingSuccess == ENotAdded) ) ) |
291 NodeAddingSuccess == ENotAdded) ) ) |
293 { |
292 { |
294 if(iAddRootNodesList) //already created |
293 UpdateAddNodeListL(aURI); |
295 { |
294 } |
296 //Do check if there is any node already added |
295 else if(err == KErrNone && NodeAddingSuccess != EFailed ) |
297 if( iAddRootNodesList->Match(aURI) <= KErrNotFound ) |
296 { |
298 { |
297 //Check luid, |
299 iAddRootNodesList = iAddRootNodesList->ReAllocL |
298 HBufC8* newluid = iDbSession.GetLuidAllocL(iAdapterId,aURI); |
300 (iAddRootNodesList->Length() + aURI.Length()+ 10); |
299 |
301 iAddRootNodesList->Des().Append(aURI); |
300 CleanupStack::PushL(newluid); |
302 } |
301 if(newluid->Length() > 0 && newluid->Compare(*luid)==0 ) |
|
302 { |
|
303 _DBG_FILE("Already existed dont buffer"); |
303 } |
304 } |
304 else //getting created |
305 else |
305 { |
306 { |
306 iAddRootNodesList = HBufC8::NewL(aURI.Length()+ 10); |
307 UpdateAddNodeListL(aURI); |
307 iAddRootNodesList->Des().Append(aURI); |
308 } |
308 } |
309 CleanupStack::PopAndDestroy(); //newluid |
309 iAddRootNodesList->Des().Append(','); |
310 } |
310 } |
311 |
|
312 |
|
313 |
311 } |
314 } |
312 adapterCalled = ETrue; |
315 adapterCalled = ETrue; |
313 |
316 |
314 CleanupStack::PopAndDestroy(); //luid |
317 CleanupStack::PopAndDestroy(); //luid |
315 } |
318 } |
1816 iAddNodeStatusRefs.Remove(i); |
1819 iAddNodeStatusRefs.Remove(i); |
1817 break; |
1820 break; |
1818 } |
1821 } |
1819 } |
1822 } |
1820 } |
1823 } |
1821 |
1824 |
|
1825 // =========================================================================== |
|
1826 // CNSmlDmDDF::UpdateAddNodeListL |
|
1827 // =========================================================================== |
|
1828 void CNSmlDmDDF::UpdateAddNodeListL(const TDesC8& aURI) |
|
1829 { |
|
1830 if(iAddRootNodesList) //already created |
|
1831 { |
|
1832 //Do check if there is any node already added |
|
1833 if( iAddRootNodesList->Match(aURI) <= KErrNotFound ) |
|
1834 { |
|
1835 iAddRootNodesList = iAddRootNodesList->ReAllocL |
|
1836 (iAddRootNodesList->Length() + aURI.Length()+ 10); |
|
1837 iAddRootNodesList->Des().Append(aURI); |
|
1838 } |
|
1839 } |
|
1840 else //getting created |
|
1841 { |
|
1842 iAddRootNodesList = HBufC8::NewL(aURI.Length()+ 10); |
|
1843 iAddRootNodesList->Des().Append(aURI); |
|
1844 } |
|
1845 iAddRootNodesList->Des().Append(','); |
|
1846 } |
|
1847 |