1 #ifndef MESSAGESTORE_DOT_HPP
2 #define MESSAGESTORE_DOT_HPP
7 #include <boost/iostreams/device/mapped_file.hpp>
16 void open(std::string_view fqdn
,
17 std::streamsize max_size
,
18 std::string_view folder
);
20 Pill
const& id() const { return s_
; }
21 Now
const& when() const { return then_
; }
23 std::ostream
& write(char const* s
, std::streamsize count
);
24 std::ostream
& write(std::string_view s
)
26 return write(s
.data(), s
.length());
31 void trash() { close(); }
33 std::string_view
freeze();
35 bool size_error() const { return size_error_
; }
36 std::streamsize
size() const { return size_
; }
37 std::streamsize
max_size() const { return max_size_
; }
38 std::streamsize
size_left() const { return max_size() - size(); }
45 std::streamsize size_
{0};
46 std::streamsize max_size_
{0};
52 bool size_error_
{false};
54 boost::iostreams::mapped_file_source mapping_
;
59 #endif // MESSAGESTORE_DOT_HPP