equal
deleted
inserted
replaced
195 void IRQFavoritesDBPrivate::increasePlayedTimes(const IRQPreset &aPreset) |
195 void IRQFavoritesDBPrivate::increasePlayedTimes(const IRQPreset &aPreset) |
196 { |
196 { |
197 TRAP_IGNORE(increasePlayedTimesL(aPreset)); |
197 TRAP_IGNORE(increasePlayedTimesL(aPreset)); |
198 } |
198 } |
199 |
199 |
|
200 int IRQFavoritesDBPrivate::renamePreset(const IRQPreset &aPreset, const QString &aNewName) |
|
201 { |
|
202 int returnCode = 0; |
|
203 TRAPD(err, returnCode = renamePresetL(aPreset, aNewName)); |
|
204 |
|
205 int result = 0; |
|
206 if (KErrNone != err) |
|
207 { |
|
208 IRQUtility::convertSError2QError(err, result); |
|
209 } |
|
210 else |
|
211 { |
|
212 IRQUtility::convertSError2QError(returnCode, result); |
|
213 } |
|
214 return result; |
|
215 } |
|
216 |
200 /* from MPSPresetObserver */ |
217 /* from MPSPresetObserver */ |
201 void IRQFavoritesDBPrivate::HandlePresetChangedL(TInt aId, TUid aDataHandler, MPSPresetObserver::TPSReason aType) |
218 void IRQFavoritesDBPrivate::HandlePresetChangedL(TInt aId, TUid aDataHandler, MPSPresetObserver::TPSReason aType) |
202 { |
219 { |
203 IRQFavoritesDB::PSReason reason = IRQFavoritesDB::PSCreated; |
220 IRQFavoritesDB::PSReason reason = IRQFavoritesDB::PSCreated; |
204 switch (aType) |
221 switch (aType) |
252 CIRIsdsPreset * cirPreset = CIRIsdsPreset::NewLC(); |
269 CIRIsdsPreset * cirPreset = CIRIsdsPreset::NewLC(); |
253 IRQUtility::convertIRQPreset2CIRIsdsPreset(aPreset, *cirPreset); |
270 IRQUtility::convertIRQPreset2CIRIsdsPreset(aPreset, *cirPreset); |
254 mIRFavoritesDb->IncreasePlayedTimesL(*cirPreset); |
271 mIRFavoritesDb->IncreasePlayedTimesL(*cirPreset); |
255 CleanupStack::PopAndDestroy(cirPreset); |
272 CleanupStack::PopAndDestroy(cirPreset); |
256 } |
273 } |
|
274 |
|
275 int IRQFavoritesDBPrivate::renamePresetL(const IRQPreset &aPreset, const QString &aNewName) |
|
276 { |
|
277 CIRIsdsPreset * cirPreset = CIRIsdsPreset::NewLC(); |
|
278 IRQUtility::convertIRQPreset2CIRIsdsPreset(aPreset, *cirPreset); |
|
279 TPtrC newName(reinterpret_cast<const TUint16*>(aNewName.utf16()), aNewName.length()); |
|
280 int ret = mIRFavoritesDb->RenamePresetL(*cirPreset, newName); |
|
281 CleanupStack::PopAndDestroy(cirPreset); |
|
282 |
|
283 return ret; |
|
284 } |