ArchiveParser(3)
| ArchiveParser(3) | Library Functions Manual | ArchiveParser(3) |
NAME
ArchiveParser - The ArchiveParser class.
SYNOPSIS
#include <ArchiveParser.h>
Inherits LibArchive.
Public Member Functions
ArchiveParser (const std::shared_ptr< MLBookProc
> &mlbp, const std::shared_ptr< std::vector< std::tuple<
unsigned, bool > > > &thread_v, const std::shared_ptr<
std::mutex > &thread_v_mtx, const std::shared_ptr<
std::condition_variable > &thread_v_var)
ArchiveParser constructor. std::vector< UDBElement >
parseArchive (const std::filesystem::path &file_path)
void stopAll ()
Public Member Functions inherited from LibArchive
LibArchive (const std::shared_ptr< MLBookProc > &mlbp)
LibArchive constructor. void listFilesInArchive (const
std::filesystem::path &archive_path, std::vector< std::tuple<
std::string, uint64_t, uint64_t > > &result)
void listFilesInArchiveBuffer (const std::string &buffer,
std::vector< std::tuple< std::string, uint64_t, uint64_t > >
&result)
void listFilesInZip (const std::filesystem::path &archive_path,
std::vector< std::tuple< std::string, uint64_t, uint64_t > >
&result)
void listFilesInZipBuffer (const std::string &buffer,
std::vector< std::tuple< std::string, uint64_t, uint64_t > >
&result)
std::filesystem::path unpackFileToDirectory (const
std::filesystem::path &archive_path, const std::string &filename,
const std::filesystem::path &directory, const size_t
&offset=size_t(0))
std::filesystem::path unpackBufferFileToDirectory (const std::string
&buffer, const std::string &filename, const std::filesystem::path
&directory, const size_t &offset=size_t(0))
std::filesystem::path unpackZipFileToDirectory (const
std::filesystem::path &archive_path, const std::string &filename,
const std::filesystem::path &directory)
std::filesystem::path unpackZipBufferFileToDirectory (const std::string
&buffer, const std::string &filename, const std::filesystem::path
&directory)
std::string unpackFileToBuffer (const std::filesystem::path
&archive_path, const std::string &filename, const size_t
&offset=size_t(0))
std::string unpackBufferFileToBuffer (const std::string &buffer,
const std::string &filename, const size_t &offset=size_t(0))
std::string unpackZipFileToBuffer (const std::filesystem::path
&archive_path, const std::string &filename)
std::string unpackZipBufferFileToBuffer (const std::string &buffer,
const std::string &filename)
void writeToArchive (const std::filesystem::path &source_object,
const std::filesystem::path &archive_path, std::string name_in_archive,
const std::filesystem::perms &perms=std::filesystem::perms::none, const
bool &overwrite_existing=true)
void writeBufferObjectToArchive (const std::string &buffer, const
std::filesystem::path &archive_path, std::string name_in_archive, const
std::filesystem::perms &perms, const bool &overwrite_existing)
Additional Inherited Members
Protected Member Functions inherited from LibArchive
std::shared_ptr< archive > initForReading (const
std::shared_ptr< LibArchiveFileData > &fd)
std::shared_ptr< archive > initForWriting (const
std::shared_ptr< LibArchiveFileData > &fd)
void archiveError (const std::shared_ptr< archive > &a, const
std::string &message)
std::filesystem::path unpackToDirectory (std::shared_ptr<
LibArchiveFileData > fd, const std::string &filename, const
std::filesystem::path &directory)
void unpackToBuffer (std::shared_ptr< LibArchiveFileData >
fd, const std::string &filename, std::string &result)
void unpackEntryToDirectory (std::shared_ptr< archive > a,
std::shared_ptr< archive_entry > e, const std::filesystem::path
&file_path)
std::string unpackEntryToBuffer (std::shared_ptr< archive > a,
std::shared_ptr< archive_entry > e)
void writeFile (std::shared_ptr< archive > a, const
std::filesystem::path &path, std::string name_in_archive, const
std::filesystem::perms &perms)
void writeBufferToArchive (std::shared_ptr< archive > a,
std::shared_ptr< archive_entry > e, const std::string &buf)
std::filesystem::perms getPermissionsFromEntry (const
std::shared_ptr< archive_entry > &e)
void setUsernameGroupname (std::shared_ptr< archive_entry > e)
Static Protected Member Functions inherited from LibArchive
static int openCallBack (archive *a, void *client_data)
static la_ssize_t readCallBack (archive *a, void *client_data, const
void **buffer)
static la_int64_t skipCallback (archive *a, void *client_data,
la_int64_t request)
static int closeCallback (archive *a, void *client_data)
static la_int64_t seekCallback (archive *a, void *client_data,
la_int64_t offset, int whence)
static la_ssize_t writeCallback (archive *a, void *client_data, const
void *buffer, size_t length)
Protected Attributes inherited from LibArchive
std::shared_ptr< MLBookProc > mlbp
Detailed Description
The ArchiveParser class.
This class contains methods for archives parsign. In most cases you do not need to call this methods directly. Use CreateCollection and BookInfo instead.
Constructor & Destructor Documentation
ArchiveParser::ArchiveParser (const std::shared_ptr< MLBookProc > & mlbp, const std::shared_ptr< std::vector< std::tuple< unsigned, bool > > > & thread_v, const std::shared_ptr< std::mutex > & thread_v_mtx, const std::shared_ptr< std::condition_variable > & thread_v_var)
ArchiveParser constructor.
Parameters
thread_v Smart pointer to vector containing tuples with processors numbers and their current busy status.
thread_v_mtx Smart pointer to mutex, locking thread_v vector.
thread_v_var Condition variable, locking thread_v vector.
Member Function Documentation
std::vector< UDBElement > ArchiveParser::parseArchive (const std::filesystem::path & file_path)
Parses given archive.
Parameters
Returns
void ArchiveParser::stopAll ()
Stops all internal operations.
Author
Generated automatically by Doxygen for MLBookProc from the source code.
| Version 2.1 | MLBookProc |
