Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3378880
D10512.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10512.diff
View Options
diff --git a/native/native_rust_library/RustBackupExecutor.h b/native/native_rust_library/RustBackupExecutor.h
--- a/native/native_rust_library/RustBackupExecutor.h
+++ b/native/native_rust_library/RustBackupExecutor.h
@@ -9,5 +9,9 @@
rust::String
getBackupLogFilePath(rust::Str backupID, rust::Str logID, bool isAttachments);
rust::String getBackupUserKeysFilePath(rust::Str backupID);
+void createMainCompaction(rust::String backupID);
+void restoreFromMainCompaction(
+ rust::String mainCompactionPath,
+ rust::String mainCompactionEncryptionKey);
} // namespace comm
diff --git a/native/native_rust_library/RustBackupExecutor.cpp b/native/native_rust_library/RustBackupExecutor.cpp
--- a/native/native_rust_library/RustBackupExecutor.cpp
+++ b/native/native_rust_library/RustBackupExecutor.cpp
@@ -1,4 +1,5 @@
#include "RustBackupExecutor.h"
+#include "../cpp/CommonCpp/NativeModules/PersistentStorageUtilities/BackupOperationsUtilities/BackupOperationsExecutor.h"
#include "../cpp/CommonCpp/Tools/PlatformSpecificTools.h"
#include <string>
@@ -24,4 +25,16 @@
return rust::String(
PlatformSpecificTools::getBackupUserKeysFilePath(std::string(backupID)));
}
+
+void createMainCompaction(rust::String backupID) {
+ BackupOperationsExecutor::createMainCompaction(std::string(backupID));
+}
+
+void restoreFromMainCompaction(
+ rust::String mainCompactionPath,
+ rust::String mainCompactionEncryptionKey) {
+ BackupOperationsExecutor::restoreFromMainCompaction(
+ std::string(mainCompactionPath),
+ std::string(mainCompactionEncryptionKey));
+}
} // namespace comm
diff --git a/native/native_rust_library/src/lib.rs b/native/native_rust_library/src/lib.rs
--- a/native/native_rust_library/src/lib.rs
+++ b/native/native_rust_library/src/lib.rs
@@ -294,6 +294,16 @@
#[allow(unused)]
#[cxx_name = "getBackupUserKeysFilePath"]
fn get_backup_user_keys_file_path(backup_id: &str) -> Result<String>;
+
+ #[cxx_name = "createMainCompaction"]
+ fn create_main_compaction(backup_id: String) -> Result<()>;
+
+ #[allow(unused)]
+ #[cxx_name = "restoreFromMainCompaction"]
+ fn restore_from_main_compaction(
+ main_compaction_path: String,
+ main_compaction_encryption_key: String,
+ ) -> Result<()>;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 1:45 PM (21 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2594131
Default Alt Text
D10512.diff (2 KB)
Attached To
Mode
D10512: Enable backup creation and restoration from Rust
Attached
Detach File
Event Timeline
Log In to Comment