mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-02-20 08:05:28 -05:00
JNIKiwixReader ctor taking a file descriptor
... and a corresponding unit test
This commit is contained in:
committed by
Emmanuel Engelhart
parent
98d69ef59b
commit
4d23e44de7
@@ -86,6 +86,15 @@ Reader::Reader(const string zimFilePath)
|
||||
srand(time(nullptr));
|
||||
}
|
||||
|
||||
Reader::Reader(int fd)
|
||||
: zimArchive(new zim::Archive(fd)),
|
||||
zimFilePath("")
|
||||
{
|
||||
|
||||
/* initialize random seed: */
|
||||
srand(time(nullptr));
|
||||
}
|
||||
|
||||
zim::Archive* Reader::getZimArchive() const
|
||||
{
|
||||
return zimArchive.get();
|
||||
|
||||
Reference in New Issue
Block a user