equal
deleted
inserted
replaced
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
159 |
159 |
160 // If no single policy or range policy, return default policy |
160 // If no single policy or range policy, return default policy |
161 return &iDefaultPolicy; |
161 return &iDefaultPolicy; |
162 } |
162 } |
163 |
163 |
164 // this function saves idividual meta as well |
164 // This function saves individual meta as well. |
165 TInt CHeapRepository::ReadSettingSavePolicyL(CIniFileIn& aFile,TServerSetting& aSetting, TSettingsAccessPolicy* &aPolicy, TBool& aSingleMetaFound) |
165 TInt CHeapRepository::ReadSettingSavePolicyL(CIniFileIn& aFile,TServerSetting& aSetting, TSettingsAccessPolicy* &aPolicy, TBool& aSingleMetaFound) |
166 { |
166 { |
167 TBool singleReadPolicyFound; |
167 TBool singleReadPolicyFound; |
168 TBool singleWritePolicyFound; |
168 TBool singleWritePolicyFound; |
169 TSecurityPolicy singleReadPolicy; |
169 TSecurityPolicy singleReadPolicy; |
219 ) |
219 ) |
220 { |
220 { |
221 CIniFileOut* out = CIniFileOut::NewLC(aFs,aOutFileName); |
221 CIniFileOut* out = CIniFileOut::NewLC(aFs,aOutFileName); |
222 |
222 |
223 out->WriteHeaderL(); |
223 out->WriteHeaderL(); |
|
224 #ifdef SYMBIAN_INCLUDE_APP_CENTRIC |
|
225 out->WriteKeyspaceTypeL(iKeyspaceType); |
|
226 #endif |
224 out->WriteOwnerSectionL(iOwner); |
227 out->WriteOwnerSectionL(iOwner); |
225 out->WriteTimeStampL(iTimeStamp); |
228 out->WriteTimeStampL(iTimeStamp); |
226 out->WriteMetaDataL(iDefaultMeta, iRangeMeta); |
229 out->WriteMetaDataL(iDefaultMeta, iRangeMeta); |
227 #ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS |
230 #ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS |
228 out->WritePlatSecL(GetDefaultAccessPolicy(), iRangePolicies,aCreVersion); |
231 out->WritePlatSecL(GetDefaultAccessPolicy(), iRangePolicies,aCreVersion); |
320 CHeapRepository object. |
323 CHeapRepository object. |
321 */ |
324 */ |
322 void CHeapRepository::ResetContent() |
325 void CHeapRepository::ResetContent() |
323 { |
326 { |
324 iSettings.Reset(); |
327 iSettings.Reset(); |
|
328 #ifdef SYMBIAN_INCLUDE_APP_CENTRIC |
|
329 iKeyspaceType = 0; |
|
330 #endif |
325 iOwner = KNullUid; |
331 iOwner = KNullUid; |
326 iTimeStamp = TTime(0); |
332 iTimeStamp = TTime(0); |
327 |
333 |
328 for (TInt i=0;i<iSinglePolicies.Count();i++) |
334 for (TInt i=0;i<iSinglePolicies.Count();i++) |
329 { |
335 { |
374 void CHeapRepository::SinglePoliciesCleanup(TAny *aPtr) |
380 void CHeapRepository::SinglePoliciesCleanup(TAny *aPtr) |
375 { |
381 { |
376 static_cast<RPointerArray<TSettingsAccessPolicy>*>(aPtr)->ResetAndDestroy(); |
382 static_cast<RPointerArray<TSettingsAccessPolicy>*>(aPtr)->ResetAndDestroy(); |
377 } |
383 } |
378 |
384 |
|
385 |
379 TInt CHeapRepository::ReloadContentExceptSettingsL(CIniFileIn& aIniFile) |
386 TInt CHeapRepository::ReloadContentExceptSettingsL(CIniFileIn& aIniFile) |
380 { |
387 { |
|
388 #ifdef SYMBIAN_INCLUDE_APP_CENTRIC |
|
389 // Check for the "protected" keyword. |
|
390 iKeyspaceType = aIniFile.CheckKeyspaceTypeSectionL(); |
|
391 #endif |
|
392 |
381 // Look for an "owner" section |
393 // Look for an "owner" section |
382 TUint32 uidValue(KNullUid.iUid); |
394 TUint32 uidValue(KNullUid.iUid); |
383 TInt err = aIniFile.ReadOwnerSectionL(uidValue); |
395 TInt err = aIniFile.ReadOwnerSectionL(uidValue); |
384 if(err == KErrCorrupt) |
396 if(err == KErrCorrupt) |
385 { |
397 { |