ReactOS 0.4.15-dev-7897-g78dc504
recv.h
Go to the documentation of this file.
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 <shlobj.h>
21#ifndef __REACTOS__
22#include "../btrfs.h"
23#else
24#include "btrfs.h"
25#endif
26
27extern LONG objs_loaded;
28
29typedef struct {
32 wstring path;
34
35class BtrfsRecv {
36public:
38 thread = nullptr;
41 running = false;
42 cancelling = false;
43 stransid = 0;
44 num_received = 0;
45 hwnd = nullptr;
46 cache.clear();
47 }
48
49 virtual ~BtrfsRecv() {
50 cache.clear();
51 }
52
53 void Open(HWND hwnd, const wstring& file, const wstring& path, bool quiet);
56
57private:
73 void add_cache_entry(BTRFS_UUID* uuid, uint64_t transid, const wstring& path);
76
86};
unsigned short int uint16_t
Definition: acefiex.h:54
Definition: recv.h:35
void cmd_removexattr(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:634
DWORD lastwriteatt
Definition: recv.h:80
void cmd_chmod(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:980
void cmd_subvol(HWND hwnd, btrfs_send_command *cmd, uint8_t *data, const win_handle &parent)
Definition: recv.cpp:67
vector< subvol_cache > cache
Definition: recv.h:85
void cmd_write(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:716
wstring lastwritepath
Definition: recv.h:79
virtual ~BtrfsRecv()
Definition: recv.h:49
DWORD recv_thread()
Definition: recv.cpp:1393
void cmd_rmdir(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:511
void cmd_snapshot(HWND hwnd, btrfs_send_command *cmd, uint8_t *data, const win_handle &parent)
Definition: recv.cpp:157
void cmd_clone(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:791
bool find_tlv(uint8_t *data, ULONG datalen, uint16_t type, void **value, ULONG *len)
Definition: recv.cpp:45
void cmd_setxattr(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:538
uint64_t stransid
Definition: recv.h:82
HANDLE dir
Definition: recv.h:77
void cmd_mkfile(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:280
bool running
Definition: recv.h:84
void add_cache_entry(BTRFS_UUID *uuid, uint64_t transid, const wstring &path)
Definition: recv.cpp:147
wstring subvolpath
Definition: recv.h:79
void cmd_link(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:457
void cmd_unlink(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:484
void cmd_rename(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:430
HANDLE thread
Definition: recv.h:77
INT_PTR CALLBACK RecvProgressDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: recv.cpp:1463
HWND hwnd
Definition: recv.h:78
void cmd_truncate(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:926
HANDLE master
Definition: recv.h:77
wstring dirpath
Definition: recv.h:79
void cmd_chown(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:1020
ULONG num_received
Definition: recv.h:81
void cmd_utimes(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:1074
HANDLE lastwritefile
Definition: recv.h:77
BtrfsRecv()
Definition: recv.h:37
wstring streamfile
Definition: recv.h:79
void do_recv(const win_handle &f, uint64_t *pos, uint64_t size, const win_handle &parent)
Definition: recv.cpp:1160
bool cancelling
Definition: recv.h:84
BTRFS_UUID subvol_uuid
Definition: recv.h:83
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
UINT64 uint64_t
Definition: types.h:77
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CALLBACK
Definition: compat.h:35
r parent
Definition: btrfs.c:3010
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
GLfloat f
Definition: glext.h:7540
GLenum GLsizei len
Definition: glext.h:6722
Definition: msctf.idl:550
int const JOCTET unsigned int datalen
Definition: jpeglib.h:1031
#define Open
Definition: syshdrs.h:62
BYTE uint8_t
Definition: msvideo1.c:66
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
LONG objs_loaded
Definition: main.cpp:48
Definition: cache.c:49
Definition: ftp_var.h:139
Definition: fci.c:127
BTRFS_UUID uuid
Definition: recv.h:30
uint64_t transid
Definition: recv.h:31
wstring path
Definition: recv.h:32
int32_t INT_PTR
Definition: typedefs.h:64
uint32_t ULONG
Definition: typedefs.h:59
Definition: pdh_main.c:94
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
static int quiet
Definition: xmllint.c:162