equal
deleted
inserted
replaced
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2004-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". |
247 @param aAccountIds |
247 @param aAccountIds |
248 A list if MMS account Ids |
248 A list if MMS account Ids |
249 */ |
249 */ |
250 EXPORT_C void CMmsAccounts::GetMMSAccountsL(RArray<TMmsAccountId>& aAccountIds) const |
250 EXPORT_C void CMmsAccounts::GetMMSAccountsL(RArray<TMmsAccountId>& aAccountIds) const |
251 { |
251 { |
|
252 CleanupClosePushL( aAccountIds ); |
252 aAccountIds.Reset(); |
253 aAccountIds.Reset(); |
253 RArray<TUint32> accountIds; |
254 RArray<TUint32> accountIds; |
254 CleanupClosePushL(accountIds); |
255 CleanupClosePushL(accountIds); |
255 TInt error = iRepository->FindL(KNullId, static_cast<TUint32>(KAccountMask), accountIds); |
256 TInt error = iRepository->FindL(KNullId, static_cast<TUint32>(KAccountMask), accountIds); |
256 if (error != KErrNotFound) |
257 if (error != KErrNotFound) |
266 User::LeaveIfError(iRepository->Get(settingId + EMmsAccountName, accountId.iMmsAccountName)); |
267 User::LeaveIfError(iRepository->Get(settingId + EMmsAccountName, accountId.iMmsAccountName)); |
267 accountId.iMmsAccountId = accountIds[i] >> KShiftAccountId; |
268 accountId.iMmsAccountId = accountIds[i] >> KShiftAccountId; |
268 aAccountIds.AppendL(accountId); |
269 aAccountIds.AppendL(accountId); |
269 } |
270 } |
270 |
271 |
271 CleanupStack::PopAndDestroy(&accountIds); |
272 CleanupStack::PopAndDestroy(&accountIds); |
|
273 CleanupStack::Pop(&aAccountIds); // aAccountIds |
272 } |
274 } |
273 |
275 |
274 /** |
276 /** |
275 Deletes the specified MMS account. |
277 Deletes the specified MMS account. |
276 |
278 |