summaryrefslogtreecommitdiff
path: root/include/utils/BackupHelpers.h
diff options
context:
space:
mode:
author Christopher Tate <ctate@google.com> 2011-05-11 12:51:31 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2011-05-11 12:51:31 -0700
commita0f5bb10a5a7b10f376b5001b7cabb6b267d734f (patch)
tree36f53a83b2c36317c9d459706af0446056728c9f /include/utils/BackupHelpers.h
parentb48be8a540be74b75ec5985c3815fc188b833e5d (diff)
parent4a627c71ff53a4fca1f961f4b1dcc0461df18a06 (diff)
Merge "Full local backup infrastructure"
Diffstat (limited to 'include/utils/BackupHelpers.h')
-rw-r--r--include/utils/BackupHelpers.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/utils/BackupHelpers.h b/include/utils/BackupHelpers.h
index b1f504512f51..1bb04a7123a3 100644
--- a/include/utils/BackupHelpers.h
+++ b/include/utils/BackupHelpers.h
@@ -70,6 +70,14 @@ public:
~BackupDataWriter();
status_t WriteEntityHeader(const String8& key, size_t dataSize);
+
+ /* Note: WriteEntityData will write arbitrary data into the file without
+ * validation or a previously-supplied header. The full backup implementation
+ * uses it this way to generate a controlled binary stream that is not
+ * entity-structured. If the implementation here is changed, either this
+ * use case must remain valid, or the full backup implementation should be
+ * adjusted to use some other appropriate mechanism.
+ */
status_t WriteEntityData(const void* data, size_t size);
void SetKeyPrefix(const String8& keyPrefix);
@@ -103,7 +111,7 @@ public:
bool HasEntities();
status_t ReadEntityHeader(String8* key, size_t* dataSize);
- status_t SkipEntityData(); // must be called with the pointer at the begining of the data.
+ status_t SkipEntityData(); // must be called with the pointer at the beginning of the data.
ssize_t ReadEntityData(void* data, size_t size);
private:
@@ -126,6 +134,9 @@ private:
int back_up_files(int oldSnapshotFD, BackupDataWriter* dataStream, int newSnapshotFD,
char const* const* files, char const* const *keys, int fileCount);
+int write_tarfile(const String8& packageName, const String8& domain,
+ const String8& rootPath, const String8& filePath, BackupDataWriter* outputStream);
+
class RestoreHelperBase
{
public: