diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2019-03-16 03:50:28 +0100 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2019-03-16 03:50:28 +0100 |
| commit | 9103fb5b961817d1a91248632b4cedfec770b198 (patch) | |
| tree | 875e16693f78efd016e0cdb09c5c14486e5b365d /src/cppc4group.hpp | |
| parent | 7c2cda2544f22add8114828535a397a2d733361d (diff) | |
| download | cc4group-9103fb5b961817d1a91248632b4cedfec770b198.tar.gz cc4group-9103fb5b961817d1a91248632b4cedfec770b198.zip | |
Add openFd, openFilePointer and openWithReadCallback methods
Diffstat (limited to 'src/cppc4group.hpp')
| -rw-r--r-- | src/cppc4group.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cppc4group.hpp b/src/cppc4group.hpp index 67d350d..0787c97 100644 --- a/src/cppc4group.hpp +++ b/src/cppc4group.hpp @@ -3,6 +3,7 @@ #include <memory> #include <vector> #include <optional> +#include <cstdio> class CppC4Group { struct Private; @@ -30,6 +31,8 @@ public: }; public: + using ReadCallback = bool(*)(const void** const data, size_t* const size, void* const arg); + enum TmpMemoryStrategy { Memory, File, @@ -50,6 +53,10 @@ public: void create(); bool openExisting(const std::string& path); + bool openFd(const int fd); + bool openFilePointer(FILE* file); + bool openMemory(const void* const data, const size_t size, const MemoryManagement management = Reference); + bool openWithReadCallback(const ReadCallback callback, void* const callbackArg, const MemoryManagement management = Take); bool save(const std::string& path, const bool overwrite = false); bool extractAll(const std::string& path); |
