diff options
author | bigbiff bigbiff <bigbiff@teamw.in> | 2016-09-06 03:04:51 +0200 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2017-11-27 16:32:30 +0100 |
commit | 19fb79c722622ac4a068e258501ab4b161420cda (patch) | |
tree | 87791149590c18e019d20818dd61279e3b4829b2 /adbbu/twrpback.hpp | |
parent | Improve greek translation (diff) | |
download | android_bootable_recovery-19fb79c722622ac4a068e258501ab4b161420cda.tar android_bootable_recovery-19fb79c722622ac4a068e258501ab4b161420cda.tar.gz android_bootable_recovery-19fb79c722622ac4a068e258501ab4b161420cda.tar.bz2 android_bootable_recovery-19fb79c722622ac4a068e258501ab4b161420cda.tar.lz android_bootable_recovery-19fb79c722622ac4a068e258501ab4b161420cda.tar.xz android_bootable_recovery-19fb79c722622ac4a068e258501ab4b161420cda.tar.zst android_bootable_recovery-19fb79c722622ac4a068e258501ab4b161420cda.zip |
Diffstat (limited to 'adbbu/twrpback.hpp')
-rw-r--r-- | adbbu/twrpback.hpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/adbbu/twrpback.hpp b/adbbu/twrpback.hpp index 752d35ea1..1c6b09f15 100644 --- a/adbbu/twrpback.hpp +++ b/adbbu/twrpback.hpp @@ -1,5 +1,5 @@ /* - Copyright 2013 to 2016 TeamWin + Copyright 2013 to 2017 TeamWin TWRP is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or @@ -14,23 +14,24 @@ along with TWRP. If not, see <http://www.gnu.org/licenses/>. */ -#include <fstream> +#ifndef _TWRPBACK_HPP +#define _TWRPBACK_HPP -#include "../orscmd/orscmd.h" -#include "../variables.h" -#include "../twcommon.h" +#include <fstream> class twrpback { public: int adbd_fd; // adbd data stream - twrpback(void); virtual ~twrpback(void); int backup(std::string command); // adb backup stream int restore(void); // adb restore stream void adblogwrite(std::string writemsg); // adb debugging log function - void close_backup_fds(); // close backup resources - void close_restore_fds(); // close restore resources + void createFifos(void); // create fifos needed for adb backup + void closeFifos(void); // close created fifos + void streamFileForTWRP(void); // stream file to twrp via bu + void setStreamFileName(std::string fn); // tell adb backup what file to load on storage + void threadStream(void); // thread bu for streaming private: int read_fd; // ors input fd @@ -45,5 +46,12 @@ private: char cmd[512]; // store result of commands char operation[512]; // operation to send to ors std::ofstream adblogfile; // adb stream log file + std::string streamFn; + typedef void (twrpback::*ThreadPtr)(void); + typedef void* (*PThreadPtr)(void *); void adbloginit(void); // setup adb log stream file + void close_backup_fds(); // close backup resources + void close_restore_fds(); // close restore resources }; + +#endif // _TWRPBACK_HPP |