| 2624 | |
| 2625 | |
| 2626 | std::vector<uint8_t> CollabSnapshot::DownloadSnapshotFile(std::function<bool(size_t, size_t)> progress) |
| 2627 | { |
| 2628 | ProgressContext pctxt; |
| 2629 | pctxt.callback = progress; |
| 2630 | size_t size = 0; |
| 2631 | uint8_t* data; |
| 2632 | |
| 2633 | if (!BNCollaborationSnapshotDownloadSnapshotFile(m_object, ProgressCallback, &pctxt, &data, &size)) |
| 2634 | throw SyncException("Failed to download snapshot file"); |
| 2635 | |
| 2636 | std::vector<uint8_t> out; |
| 2637 | out.insert(out.end(), data, &data[size]); |
| 2638 | delete[] data; |
| 2639 | return out; |
| 2640 | } |
| 2641 | |
| 2642 | |
| 2643 | std::vector<uint8_t> CollabSnapshot::Download(std::function<bool(size_t, size_t)> progress) |
nothing calls this directly
no test coverage detected