1 /* Copyright (c) Mark Harmstone 2017 2 * 3 * This file is part of WinBtrfs. 4 * 5 * WinBtrfs is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU Lesser General Public Licence as published by 7 * the Free Software Foundation, either version 3 of the Licence, or 8 * (at your option) any later version. 9 * 10 * WinBtrfs is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public Licence for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public Licence 16 * along with WinBtrfs. If not, see <http://www.gnu.org/licenses/>. */ 17 18 #pragma once 19 20 #include <windows.h> 21 #ifndef __REACTOS__ 22 #include "../btrfs.h" 23 #include "../btrfsioctl.h" 24 #else 25 #include "btrfs.h" 26 #include "btrfsioctl.h" 27 #endif 28 29 class BtrfsScrub { 30 public: 31 BtrfsScrub(const wstring& drive) { 32 fn = drive; 33 } 34 35 INT_PTR CALLBACK ScrubDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 36 37 private: 38 void RefreshScrubDlg(HWND hwndDlg, bool first_time); 39 void UpdateTextBox(HWND hwndDlg, btrfs_query_scrub* bqs); 40 void StartScrub(HWND hwndDlg); 41 void PauseScrub(HWND hwndDlg); 42 void StopScrub(HWND hwndDlg); 43 44 wstring fn; 45 uint32_t status; 46 uint64_t chunks_left; 47 uint32_t num_errors; 48 }; 49