ReactOS  0.4.15-dev-440-g5f37b68
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 
27 extern LONG objs_loaded;
28 
29 typedef struct {
32  wstring path;
33 } subvol_cache;
34 
35 class BtrfsRecv {
36 public:
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 
57 private:
73  void add_cache_entry(BTRFS_UUID* uuid, uint64_t transid, const wstring& path);
75  void do_recv(const win_handle& f, uint64_t* pos, uint64_t size, const win_handle& parent);
76 
86 };
Definition: cache.c:48
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
ULONG num_received
Definition: recv.h:81
BTRFS_UUID uuid
Definition: recv.h:30
void cmd_chown(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:1130
Definition: recv.h:35
HWND hwnd
Definition: recv.h:78
bool running
Definition: recv.h:84
Definition: ftp_var.h:139
HANDLE dir
Definition: recv.h:77
uint64_t transid
Definition: recv.h:31
#define CALLBACK
Definition: compat.h:27
void cmd_chmod(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:1090
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define INVALID_HANDLE_VALUE
Definition: compat.h:400
BtrfsRecv()
Definition: recv.h:37
void cmd_snapshot(HWND hwnd, btrfs_send_command *cmd, uint8_t *data, const win_handle &parent)
Definition: recv.cpp:267
void cmd_unlink(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:594
UINT_PTR WPARAM
Definition: windef.h:207
unsigned short int uint16_t
Definition: acefiex.h:54
int32_t INT_PTR
Definition: typedefs.h:63
int const JOCTET unsigned int datalen
Definition: jpeglib.h:1030
void cmd_truncate(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:1036
WPARAM wParam
Definition: combotst.c:138
BTRFS_UUID subvol_uuid
Definition: recv.h:83
void do_recv(const win_handle &f, uint64_t *pos, uint64_t size, const win_handle &parent)
Definition: recv.cpp:1270
long LONG
Definition: pedump.c:60
void cmd_rmdir(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:621
DWORD recv_thread()
Definition: recv.cpp:1476
LONG_PTR LPARAM
Definition: windef.h:208
wstring streamfile
Definition: recv.h:79
void cmd_clone(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:901
bool cancelling
Definition: recv.h:84
GLfloat f
Definition: glext.h:7540
GLsizeiptr size
Definition: glext.h:5919
r parent
Definition: btrfs.c:2944
HANDLE thread
Definition: recv.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
HANDLE lastwritefile
Definition: recv.h:77
void cmd_mkfile(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:390
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
wstring dirpath
Definition: recv.h:79
void cmd_utimes(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:1184
void Open(HWND hwnd, const wstring &file, const wstring &path, bool quiet)
Definition: recv.cpp:1614
void cmd_removexattr(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:744
void cmd_link(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:567
void cmd_subvol(HWND hwnd, btrfs_send_command *cmd, uint8_t *data, const win_handle &parent)
Definition: recv.cpp:177
GLenum GLsizei len
Definition: glext.h:6722
HANDLE master
Definition: recv.h:77
BYTE uint8_t
Definition: msvideo1.c:66
void cmd_setxattr(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:648
INT_PTR CALLBACK RecvProgressDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: recv.cpp:1546
UINT64 uint64_t
Definition: types.h:77
DWORD lastwriteatt
Definition: recv.h:80
wstring lastwritepath
Definition: recv.h:79
uint64_t stransid
Definition: recv.h:82
void cmd_rename(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:540
unsigned int UINT
Definition: ndis.h:50
LONG objs_loaded
Definition: main.cpp:48
wstring path
Definition: recv.h:32
vector< subvol_cache > cache
Definition: recv.h:85
Definition: msctf.idl:510
unsigned int ULONG
Definition: retypes.h:1
void add_cache_entry(BTRFS_UUID *uuid, uint64_t transid, const wstring &path)
Definition: recv.cpp:257
virtual ~BtrfsRecv()
Definition: recv.h:49
LPARAM lParam
Definition: combotst.c:139
void cmd_write(HWND hwnd, btrfs_send_command *cmd, uint8_t *data)
Definition: recv.cpp:826
wstring subvolpath
Definition: recv.h:79
Definition: fci.c:126
bool find_tlv(uint8_t *data, ULONG datalen, uint16_t type, void **value, ULONG *len)
Definition: recv.cpp:155