ReactOS  0.4.13-dev-1089-g05f0b08
balance.h
Go to the documentation of this file.
1 /* Copyright (c) Mark Harmstone 2016-17
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 "../btrfsioctl.h"
23 #else
24 #include "btrfsioctl.h"
25 #endif
26 
27 class BtrfsBalance {
28 public:
29  BtrfsBalance(const wstring& drive, bool RemoveDevice = false, bool ShrinkDevice = false) {
30  removing = false;
31  devices = nullptr;
32  called_from_RemoveDevice = RemoveDevice;
33  called_from_ShrinkDevice = ShrinkDevice;
34  fn = drive;
35  }
36 
37  void ShowBalance(HWND hwndDlg);
40 
41 private:
42  void ShowBalanceOptions(HWND hwndDlg, uint8_t type);
43  void SaveBalanceOpts(HWND hwndDlg);
44  void StartBalance(HWND hwndDlg);
45  void RefreshBalanceDlg(HWND hwndDlg, bool first);
46  void PauseBalance(HWND hwndDlg);
47  void StopBalance(HWND hwndDlg);
48 
53  bool cancelling;
54  bool removing;
55  bool shrinking;
56  wstring fn;
58  bool readonly;
60 };
void StartBalance(HWND hwndDlg)
Definition: balance.cpp:73
BtrfsBalance(const wstring &drive, bool RemoveDevice=false, bool ShrinkDevice=false)
Definition: balance.h:29
const GLint * first
Definition: glext.h:5794
#define CALLBACK
Definition: compat.h:27
btrfs_balance_opts data_opts
Definition: balance.h:50
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
UINT_PTR WPARAM
Definition: windef.h:207
int32_t INT_PTR
Definition: typedefs.h:62
WPARAM wParam
Definition: combotst.c:138
bool removing
Definition: balance.h:54
uint32_t balance_status
Definition: balance.h:49
btrfs_balance_opts metadata_opts
Definition: balance.h:50
bool called_from_RemoveDevice
Definition: balance.h:59
LONG_PTR LPARAM
Definition: windef.h:208
bool called_from_ShrinkDevice
Definition: balance.h:59
wstring fn
Definition: balance.h:56
void SaveBalanceOpts(HWND hwndDlg)
Definition: balance.cpp:354
btrfs_query_balance bqb
Definition: balance.h:52
void ShowBalance(HWND hwndDlg)
Definition: balance.cpp:975
void ShowBalanceOptions(HWND hwndDlg, uint8_t type)
Definition: balance.cpp:850
INT_PTR CALLBACK BalanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: balance.cpp:855
BYTE uint8_t
Definition: msvideo1.c:66
bool shrinking
Definition: balance.h:55
btrfs_device * devices
Definition: balance.h:57
bool cancelling
Definition: balance.h:53
static char drive[2]
Definition: batch.c:28
uint8_t opts_type
Definition: balance.h:51
void RefreshBalanceDlg(HWND hwndDlg, bool first)
Definition: balance.cpp:206
void StopBalance(HWND hwndDlg)
Definition: balance.cpp:174
unsigned int UINT
Definition: ndis.h:50
bool readonly
Definition: balance.h:58
UINT32 uint32_t
Definition: types.h:75
void PauseBalance(HWND hwndDlg)
Definition: balance.cpp:144
btrfs_balance_opts system_opts
Definition: balance.h:50
INT_PTR CALLBACK BalanceOptsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: balance.cpp:514
LPARAM lParam
Definition: combotst.c:139