MLBookProc 2.1
Loading...
Searching...
No Matches
OpenBook Class Reference

The OpenBook class. More...

#include <OpenBook.h>

Public Member Functions

 OpenBook (const std::shared_ptr< MLBookProc > &mlbp)
 OpenBook constructor.
void openBook (const UDBElement &book_search_result, const std::filesystem::path &unpacking_directory, std::function< void(const std::filesystem::path &)> open_call_back)

Detailed Description

The OpenBook class.

This class contains methods for books opening.

Constructor & Destructor Documentation

◆ OpenBook()

OpenBook::OpenBook ( const std::shared_ptr< MLBookProc > & mlbp)

OpenBook constructor.

Parameters
mlbpSmart pointer to MLBookProc object.

Member Function Documentation

◆ openBook()

void OpenBook::openBook ( const UDBElement & book_search_result,
const std::filesystem::path & unpacking_directory,
std::function< void(const std::filesystem::path &)> open_call_back )

Opens given book. If book is in archive, unpacks book to unpacking_directory.

Note
This method can throw std::exception in case of errors.
Parameters
book_search_resultBaseID::BookSearchResult object, containing book to be opened.
unpacking_directoryPath to directory book to be unpacked to. Attantion! If this directory exists, all its content will be removed.
open_call_backThis function will be called at the end of operation with path to book as parameter.