| 520 | } |
| 521 | |
| 522 | void ControllerObject::exportProfileMusic() { |
| 523 | _api.requestProfileMusic([=](Data::ProfileMusicInfo &&start) { |
| 524 | if (ioCatchError(_writer->writeProfileMusicStart(start))) { |
| 525 | return false; |
| 526 | } |
| 527 | _profileMusicWritten = 0; |
| 528 | _profileMusicCount = start.count; |
| 529 | return true; |
| 530 | }, [=](DownloadProgress progress) { |
| 531 | setState(stateProfileMusic(progress)); |
| 532 | return true; |
| 533 | }, [=](Data::ProfileMusicSlice &&slice) { |
| 534 | if (ioCatchError(_writer->writeProfileMusicSlice(slice))) { |
| 535 | return false; |
| 536 | } |
| 537 | _profileMusicWritten += slice.list.size(); |
| 538 | setState(stateProfileMusic(DownloadProgress())); |
| 539 | return true; |
| 540 | }, [=] { |
| 541 | if (ioCatchError(_writer->writeProfileMusicEnd())) { |
| 542 | return; |
| 543 | } |
| 544 | exportNext(); |
| 545 | }); |
| 546 | } |
| 547 | |
| 548 | void ControllerObject::exportContacts() { |
| 549 | setState(stateContacts()); |
nothing calls this directly
no test coverage detected