summaryrefslogtreecommitdiffstats
path: root/twrpTar.h
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2013-07-25 22:53:02 +0200
committerGerrit Code Review <gerrit@198.50.184.117>2013-08-24 14:56:48 +0200
commitfafb0c541bb4b24515c57251a44d87825eec90fb (patch)
tree9cddb55ceef8912c8fafe618c98147ff6df19ef6 /twrpTar.h
parentClean-up in partitions.hpp (diff)
downloadandroid_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.gz
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.bz2
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.lz
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.xz
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.tar.zst
android_bootable_recovery-fafb0c541bb4b24515c57251a44d87825eec90fb.zip
Diffstat (limited to '')
-rw-r--r--twrpTar.hpp105
1 files changed, 53 insertions, 52 deletions
diff --git a/twrpTar.hpp b/twrpTar.hpp
index e270d90d9..88eedb5c2 100644
--- a/twrpTar.hpp
+++ b/twrpTar.hpp
@@ -17,7 +17,7 @@
*/
extern "C" {
- #include "libtar/libtar.h"
+ #include "libtar/libtar.h"
}
#include <sys/types.h>
#include <sys/stat.h>
@@ -41,59 +41,60 @@ struct thread_data_struct {
};
class twrpTar {
- public:
- twrpTar();
- virtual ~twrpTar();
- int createTarFork();
- int extractTarFork();
- int splitArchiveFork();
- void setexcl(string exclude);
- void setfn(string fn);
- void setdir(string dir);
- unsigned long long uncompressedSize();
-
- public:
- int use_encryption;
- int userdata_encryption;
- int use_compression;
- int split_archives;
- int has_data_media;
- string backup_name;
+public:
+ twrpTar();
+ virtual ~twrpTar();
+ int createTarFork();
+ int extractTarFork();
+ int splitArchiveFork();
+ void setexcl(string exclude);
+ void setfn(string fn);
+ void setdir(string dir);
+ unsigned long long uncompressedSize();
+
+public:
+ int use_encryption;
+ int userdata_encryption;
+ int use_compression;
+ int split_archives;
+ int has_data_media;
+ string backup_name;
- private:
- int extract();
- int addFilesToExistingTar(vector <string> files, string tarFile);
- int createTar();
- int addFile(string fn, bool include_root);
- int entryExists(string entry);
- int closeTar();
- int create();
- int Split_Archive();
- int removeEOT(string tarFile);
- int extractTar();
- int tarDirs(bool include_root);
- int Generate_Multiple_Archives(string Path);
- string Strip_Root_Dir(string Path);
- int openTar();
- int Archive_File_Count;
- int Archive_Current_Type;
- unsigned long long Archive_Current_Size;
- TAR *t;
- int fd;
- pid_t pigz_pid;
- pid_t oaes_pid;
+private:
+ int extract();
+ int addFilesToExistingTar(vector <string> files, string tarFile);
+ int createTar();
+ int addFile(string fn, bool include_root);
+ int entryExists(string entry);
+ int closeTar();
+ int create();
+ int Split_Archive();
+ int removeEOT(string tarFile);
+ int extractTar();
+ int tarDirs(bool include_root);
+ int Generate_Multiple_Archives(string Path);
+ string Strip_Root_Dir(string Path);
+ int openTar();
+ int Generate_TarList(string Path, std::vector<TarListStruct> *TarList, unsigned long long *Target_Size, unsigned *thread_id);
+ static void* createList(void *cookie);
+ static void* extractMulti(void *cookie);
+ int tarList(bool include_root, std::vector<TarListStruct> *TarList, unsigned thread_id);
- string tardir;
- string tarfn;
- string basefn;
- string tarexclude;
+ int Archive_File_Count;
+ int Archive_Current_Type;
+ unsigned long long Archive_Current_Size;
+ TAR *t;
+ int fd;
+ pid_t pigz_pid;
+ pid_t oaes_pid;
- vector<string> split;
+ string tardir;
+ string tarfn;
+ string basefn;
+ string tarexclude;
- int Generate_TarList(string Path, std::vector<TarListStruct> *TarList, unsigned long long *Target_Size, unsigned *thread_id);
- static void* createList(void *cookie);
- static void* extractMulti(void *cookie);
- int tarList(bool include_root, std::vector<TarListStruct> *TarList, unsigned thread_id);
- std::vector<TarListStruct> *ItemList;
- int thread_id;
+ vector<string> split;
+
+ std::vector<TarListStruct> *ItemList;
+ int thread_id;
};