summaryrefslogtreecommitdiff
path: root/tools/aapt2/LoadedApk.h
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-09-29 14:49:15 -0700
committerAdam Lesinski <adamlesinski@google.com>2017-10-04 14:26:55 -0700
commit4670805ea441edb8b280f9312571e7799f1284cf (patch)
tree593cfa51011a51f443e9dbaa5934ea159e7ae1d7 /tools/aapt2/LoadedApk.h
parent65e91ce6c3aac8e350cbf5e1de2d2b13c78d792b (diff)
AAPT2: Move format related files under same directory
Test: make aapt2_tests Change-Id: Id72cdfc12ba3add294048e60c55f2461344464bf
Diffstat (limited to 'tools/aapt2/LoadedApk.h')
-rw-r--r--tools/aapt2/LoadedApk.h34
1 files changed, 21 insertions, 13 deletions
diff --git a/tools/aapt2/LoadedApk.h b/tools/aapt2/LoadedApk.h
index d779b7e7663f..d2dd5cf2bc67 100644
--- a/tools/aapt2/LoadedApk.h
+++ b/tools/aapt2/LoadedApk.h
@@ -21,27 +21,35 @@
#include "ResourceTable.h"
#include "filter/Filter.h"
-#include "flatten/Archive.h"
-#include "flatten/TableFlattener.h"
+#include "format/Archive.h"
+#include "format/binary/BinaryResourceParser.h"
+#include "format/binary/TableFlattener.h"
#include "io/ZipArchive.h"
-#include "unflatten/BinaryResourceParser.h"
#include "xml/XmlDom.h"
namespace aapt {
-/** Info about an APK loaded in memory. */
+// Info about an APK loaded in memory.
class LoadedApk {
public:
- LoadedApk(const Source& source, std::unique_ptr<io::IFileCollection> apk,
- std::unique_ptr<ResourceTable> table)
- : source_(source), apk_(std::move(apk)), table_(std::move(table)) {
+ LoadedApk(
+ const Source& source,
+ std::unique_ptr<io::IFileCollection> apk,
+ std::unique_ptr<ResourceTable> table)
+ : source_(source), apk_(std::move(apk)), table_(std::move(table)) {}
+ virtual ~LoadedApk() = default;
+
+ io::IFileCollection* GetFileCollection() {
+ return apk_.get();
}
- io::IFileCollection* GetFileCollection() { return apk_.get(); }
-
- ResourceTable* GetResourceTable() { return table_.get(); }
+ ResourceTable* GetResourceTable() {
+ return table_.get();
+ }
- const Source& GetSource() { return source_; }
+ const Source& GetSource() {
+ return source_;
+ }
/**
* Writes the APK on disk at the given path, while also removing the resource
@@ -70,11 +78,11 @@ class LoadedApk {
const android::StringPiece& path);
private:
+ DISALLOW_COPY_AND_ASSIGN(LoadedApk);
+
Source source_;
std::unique_ptr<io::IFileCollection> apk_;
std::unique_ptr<ResourceTable> table_;
-
- DISALLOW_COPY_AND_ASSIGN(LoadedApk);
};
} // namespace aapt