-
Notifications
You must be signed in to change notification settings - Fork 3
/
ultra_machine.h
56 lines (44 loc) · 1.1 KB
/
ultra_machine.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* This file is a part of the source code of "byenow" program.
*
* Copyright (c) 2020- Alexander Pankratov and IO Bureau SA.
* All rights reserved.
*
* The source code is distributed under the terms of 2-clause
* BSD license with the Commons Clause condition. See LICENSE
* file for details.
*/
#ifndef _ULTRA_MACHINE_H_
#define _ULTRA_MACHINE_H_
#include "folder.h"
//
struct ultra_mach_conf
{
size_t threads;
size_t scanner_buf_size;
bool deleter_ntapi;
size_t deleter_batch;
bool keep_root;
ultra_mach_conf();
};
struct ultra_mach_info
{
size_t d_found, d_deleted;
size_t f_found, f_deleted;
uint64_t b_found, b_deleted;
api_error_vec * scanner_err;
api_error_vec * deleter_err;
size_t folders_togo;
bool done;
ultra_mach_info();
};
//
struct ultra_mach_cb
{
__interface(ultra_mach_cb);
virtual bool on_ultra_mach_tick(const ultra_mach_info & info) = 0;
};
//
bool ultra_mach_scan(folder & root, const ultra_mach_conf & conf, ultra_mach_cb * cb);
bool ultra_mach_delete(folder & root, bool prescanned, const ultra_mach_conf & conf, ultra_mach_cb * cb);
#endif