Ditto
4.6.0
Loading...
Searching...
No Matches
include
DiskUsage.hpp
1
#ifndef _DITTO_DISK_USAGE_
2
#define _DITTO_DISK_USAGE_
3
4
#include "DittoHandleWrapper.hpp"
5
#include "dittoffi.hpp"
6
#include "json.hpp"
7
#include <string>
8
#include <vector>
9
10
namespace
ditto {
11
12
class
DittoHandleWrapper;
13
class
Store;
14
15
enum
FileSystemType {
16
Directory,
17
File,
18
SymLink,
19
};
20
21
class
DiskUsageChild
{
22
friend
class
DiskUsage
;
23
24
public
:
25
FileSystemType fs_type;
26
std::string path;
27
uint64_t
size_in_bytes;
28
std::vector<DiskUsageChild> children;
29
};
30
35
typedef
std::function<
void
(
DiskUsageChild
)> DiskUsageCallback;
36
37
class
DiskObserverContext
{
38
friend
class
DiskUsage
;
39
44
DiskUsageObserver_t
*inner_context;
45
DiskUsageCallback cb;
46
47
explicit
DiskObserverContext
(DiskUsageCallback callback);
55
static
void
on_event(
void
*ctx,
slice_ref_uint8_t
cbor);
56
void
set_handle(
DiskUsageObserver_t
*inner_context);
57
58
public
:
59
~DiskObserverContext
();
60
};
61
65
class
DiskUsage
{
66
friend
class
Ditto
;
67
friend
class
Store
;
68
friend
class
Attachment
;
69
friend
class
Authenticator
;
70
71
private
:
72
DiskUsage
();
73
DiskUsage
(std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper,
74
FsComponent
component);
78
FsComponent
component;
79
std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper;
80
81
public
:
82
std::shared_ptr<DiskObserverContext> observe(DiskUsageCallback cb);
83
DiskUsageChild
exec();
84
};
85
86
}
// namespace ditto
87
88
#endif
ditto::Attachment
Represents an attachment and can be used to insert the associated attachment into a document at a spe...
Definition
Attachment.hpp:22
ditto::Authenticator
Provides access to authentication information and methods for logging on to Ditto Cloud....
Definition
Authenticator.hpp:27
ditto::DiskObserverContext
Definition
DiskUsage.hpp:37
ditto::DiskUsageChild
Definition
DiskUsage.hpp:21
ditto::DiskUsage
Provides an interface to be able to monitor local files.
Definition
DiskUsage.hpp:65
ditto::Ditto
The entrypoint to the Ditto SDK.
Definition
Ditto.hpp:32
ditto::Store
Provides access to Collections and a write transaction API.
Definition
Store.hpp:29
ditto::ArcPointee
Definition
Arc.hpp:10
Generated by
1.10.0