29#include <system_error>
169 void download_next_chunk();
179struct is_error_code_enum<
mongocxx::v1::gridfs::downloader::errc> : true_type {};
bool is_open() const
Return true when the underlying GridFS file stream is open for reading.
std::int64_t file_length() const
Return the length of the associated GridFS file.
downloader(downloader &&other) noexcept
Move constructor.
std::int32_t chunk_size() const
Return the chunk size (in bytes) of the associated GridFS file.
friend std::error_code make_error_code(errc v)
Support implicit conversion to std::error_code.
Definition downloader.hpp:160
std::size_t read(std::uint8_t *data, std::size_t length)
Read up to length bytes of the associated GridFS file.
errc
Errors codes which may be returned by mongocxx::v1::gridfs::downloader.
Definition downloader.hpp:142
@ is_closed
The GridFS file download stream is not open.
Definition downloader.hpp:144
@ corrupt_data
The GridFS file is in an invalid or inconsistent state.
Definition downloader.hpp:145
@ zero
Zero.
Definition downloader.hpp:143
bsoncxx::v1::document::view files_document() const
Return the files collection document for the associated GridFS file.
void close()
Close the underlying GridFS download stream.
downloader()
Default initialization.
static std::error_category const & error_category()
The error category for mongocxx::v1::gridfs::downloader::errc.
~downloader()
Destroy this object.
Provides macros to control the set of symbols exported in the ABI.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v1 macro guard postlude header.
The mongocxx v1 macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
Declares entities related to GridFS.
Declares entities whose ABI stability is guaranteed for documented symbols.
@ mongocxx
From the mongocxx library.
Definition exception.hpp:42
The top-level namespace within which all mongocxx library entities are declared.
Declares bsoncxx::v1::document::view.
Declares mongocxx::v1::gridfs::downloader.