Encapsulates zip_writer_ on Dumpstate class.

BUG: 26379932
Test: DumpstateTest passes and manual verification of zip file.
Change-Id: I0113bec61cd32015fdd625afd2dca026bbf0ceab
diff --git a/cmds/dumpstate/dumpstate.h b/cmds/dumpstate/dumpstate.h
index 19f46e2..950f185 100644
--- a/cmds/dumpstate/dumpstate.h
+++ b/cmds/dumpstate/dumpstate.h
@@ -17,8 +17,6 @@
 #ifndef FRAMEWORK_NATIVE_CMD_DUMPSTATE_H_
 #define FRAMEWORK_NATIVE_CMD_DUMPSTATE_H_
 
-#include <android-base/macros.h>
-
 #ifndef MYLOGD
 #define MYLOGD(...) fprintf(stderr, __VA_ARGS__); ALOGD(__VA_ARGS__);
 #endif
@@ -39,6 +37,9 @@
 #include <string>
 #include <vector>
 
+#include <android-base/macros.h>
+#include <ziparchive/zip_writer.h>
+
 // Workaround for const char *args[MAX_ARGS_ARRAY_SIZE] variables until they're converted to
 // std::vector<std::string>
 // TODO: remove once not used
@@ -383,6 +384,9 @@
     // Pointer to the zipped file.
     std::unique_ptr<FILE, int (*)(FILE*)> zip_file{nullptr, fclose};
 
+    // Pointer to the zip structure.
+    std::unique_ptr<ZipWriter> zip_writer_;
+
   private:
     // Used by GetInstance() only.
     Dumpstate(const std::string& version = VERSION_CURRENT, bool dry_run = false,