summaryrefslogtreecommitdiffstats
path: root/twrpTar.hpp
diff options
context:
space:
mode:
authorbigbiff <bigbiff@teamw.in>2015-12-13 00:30:21 +0100
committerEthan Yonker <dees_troy@teamw.in>2016-08-01 05:20:18 +0200
commitce8f83c48d200106ff61ad530c863b15c16949d9 (patch)
tree2908e48dfb44eae96c49113a177108f3cbb714f2 /twrpTar.hpp
parentBlack screen patch for some HiSilicon devices (FBIOPAN_DISPLAY) (diff)
downloadandroid_bootable_recovery-ce8f83c48d200106ff61ad530c863b15c16949d9.tar
android_bootable_recovery-ce8f83c48d200106ff61ad530c863b15c16949d9.tar.gz
android_bootable_recovery-ce8f83c48d200106ff61ad530c863b15c16949d9.tar.bz2
android_bootable_recovery-ce8f83c48d200106ff61ad530c863b15c16949d9.tar.lz
android_bootable_recovery-ce8f83c48d200106ff61ad530c863b15c16949d9.tar.xz
android_bootable_recovery-ce8f83c48d200106ff61ad530c863b15c16949d9.tar.zst
android_bootable_recovery-ce8f83c48d200106ff61ad530c863b15c16949d9.zip
Diffstat (limited to '')
-rw-r--r--twrpTar.hpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/twrpTar.hpp b/twrpTar.hpp
index 8ef50207f..49d373c13 100644
--- a/twrpTar.hpp
+++ b/twrpTar.hpp
@@ -29,6 +29,8 @@ extern "C" {
#include <vector>
#include "twrpDU.hpp"
#include "progresstracking.hpp"
+#include "partitions.hpp"
+#include "twrp-functions.hpp"
using namespace std;
@@ -42,17 +44,19 @@ struct thread_data_struct {
unsigned thread_id;
};
+
class twrpTar {
public:
twrpTar();
virtual ~twrpTar();
- int createTarFork(ProgressTracking *progress, pid_t &fork_pid);
- int extractTarFork(ProgressTracking *progress);
+ int createTarFork(pid_t *tar_fork_pid);
+ int extractTarFork();
void setfn(string fn);
void setdir(string dir);
void setsize(unsigned long long backup_size);
void setpassword(string pass);
unsigned long long get_size();
+ void Set_Archive_Type(Archive_Type archive_type);
public:
int use_encryption;
@@ -64,6 +68,7 @@ public:
int progress_pipe_fd;
string partition_name;
string backup_folder;
+ PartitionSettings *part_settings;
private:
int extract();
@@ -80,16 +85,17 @@ private:
static void* createList(void *cookie);
static void* extractMulti(void *cookie);
int tarList(std::vector<TarListStruct> *TarList, unsigned thread_id);
- unsigned long long uncompressedSize(string filename, int *archive_type);
+ unsigned long long uncompressedSize(string filename);
static void Signal_Kill(int signum);
- int Archive_Current_Type;
+ enum Archive_Type current_archive_type;
unsigned long long Archive_Current_Size;
unsigned long long Total_Backup_Size;
bool include_root_dir;
TAR *t;
tartype_t tar_type; // Only used in createTar() but variable must persist while the tar is open
int fd;
+ int input_fd; // this stores the fd for libtar to write to
pid_t pigz_pid;
pid_t oaes_pid;
unsigned long long file_count;
@@ -100,5 +106,7 @@ private:
string password;
std::vector<TarListStruct> *ItemList;
+ int output_fd; // this stores the output fd that gzip will read from
+ int adb_control_twrp_fd, adb_control_bu_fd; // fds for twrp to twrp bu and bu to twrp control fifos
unsigned thread_id;
};