reactos/dll/shellext/shellbtrfs/send.h

64 lines
1.6 KiB
C
Raw Normal View History

/* Copyright (c) Mark Harmstone 2017
*
* This file is part of WinBtrfs.
*
* WinBtrfs is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public Licence as published by
* the Free Software Foundation, either version 3 of the Licence, or
* (at your option) any later version.
*
* WinBtrfs is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public Licence for more details.
*
* You should have received a copy of the GNU Lesser General Public Licence
* along with WinBtrfs. If not, see <http://www.gnu.org/licenses/>. */
2017-11-26 13:16:29 +00:00
#pragma once
#ifdef __REACTOS__
#include "btrfs.h"
#include <stdlib.h>
#else
#include "../btrfs.h"
#endif
class BtrfsSend {
public:
BtrfsSend() {
2018-12-16 11:04:40 +00:00
started = false;
file[0] = 0;
dirh = INVALID_HANDLE_VALUE;
stream = INVALID_HANDLE_VALUE;
subvol = L"";
2018-12-16 11:04:40 +00:00
buf = nullptr;
incremental = false;
}
~BtrfsSend() {
if (buf)
free(buf);
}
void Open(HWND hwnd, WCHAR* path);
INT_PTR SendDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
DWORD Thread();
private:
void StartSend(HWND hwnd);
void Browse(HWND hwnd);
void BrowseParent(HWND hwnd);
void AddClone(HWND hwnd);
void RemoveClone(HWND hwnd);
2018-12-16 11:04:40 +00:00
bool started;
bool incremental;
WCHAR file[MAX_PATH], closetext[255];
HANDLE thread, dirh, stream;
HWND hwnd;
2018-12-16 11:04:40 +00:00
wstring subvol;
char* buf;
2018-12-16 11:04:40 +00:00
vector <wstring> clones;
};