| 402 | } |
| 403 | |
| 404 | void ControllerObject::exportNext() { |
| 405 | if (++_stepIndex >= _steps.size()) { |
| 406 | if (ioCatchError(_writer->finish())) { |
| 407 | return; |
| 408 | } |
| 409 | _api.finishExport([=] { |
| 410 | setFinishedState(); |
| 411 | }); |
| 412 | return; |
| 413 | } |
| 414 | |
| 415 | const auto step = _steps[_stepIndex]; |
| 416 | switch (step) { |
| 417 | case Step::Initializing: return initialize(); |
| 418 | case Step::DialogsList: return collectDialogsList(); |
| 419 | case Step::PersonalInfo: return exportPersonalInfo(); |
| 420 | case Step::Userpics: return exportUserpics(); |
| 421 | case Step::Stories: return exportStories(); |
| 422 | case Step::ProfileMusic: return exportProfileMusic(); |
| 423 | case Step::Contacts: return exportContacts(); |
| 424 | case Step::Sessions: return exportSessions(); |
| 425 | case Step::OtherData: return exportOtherData(); |
| 426 | case Step::Dialogs: return exportDialogs(); |
| 427 | case Step::Topic: return exportTopic(); |
| 428 | } |
| 429 | Unexpected("Step in ControllerObject::exportNext."); |
| 430 | } |
| 431 | |
| 432 | void ControllerObject::initialize() { |
| 433 | setState(stateInitializing()); |
nothing calls this directly
no test coverage detected