diff options
Diffstat (limited to 'common/dynamic_partition_control_interface.h')
-rw-r--r-- | common/dynamic_partition_control_interface.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/common/dynamic_partition_control_interface.h b/common/dynamic_partition_control_interface.h index 7c2d0b0c..c8a2274c 100644 --- a/common/dynamic_partition_control_interface.h +++ b/common/dynamic_partition_control_interface.h @@ -26,8 +26,14 @@ #include "update_engine/common/action.h" #include "update_engine/common/cleanup_previous_update_action_delegate.h" #include "update_engine/common/error_code.h" +#include "update_engine/payload_consumer/file_descriptor.h" #include "update_engine/update_metadata.pb.h" +// Forware declare for libsnapshot/snapshot_writer.h +namespace android::snapshot { +class ISnapshotWriter; +} + namespace chromeos_update_engine { struct FeatureFlag { @@ -56,6 +62,8 @@ class DynamicPartitionControlInterface { // Return the feature flags of Virtual A/B on this device. virtual FeatureFlag GetVirtualAbFeatureFlag() = 0; + // Return the feature flags of Virtual A/B Compression on this device. + virtual FeatureFlag GetVirtualAbCompressionFeatureFlag() = 0; // Attempt to optimize |operation|. // If successful, |optimized| contains an operation with extents that @@ -137,6 +145,20 @@ class DynamicPartitionControlInterface { uint32_t source_slot, uint32_t target_slot, const std::vector<std::string>& partitions) = 0; + // Partition name is expected to be unsuffixed. e.g. system, vendor + // Return an interface to write to a snapshoted partition. + // If `is_append` is false, then existing COW data will be overwritten. + // Otherwise the cow writer will be opened on APPEND mode, existing COW data + // is preserved. + virtual std::unique_ptr<android::snapshot::ISnapshotWriter> OpenCowWriter( + const std::string& unsuffixed_partition_name, + const std::optional<std::string>&, + bool is_append = false) = 0; + + // Create virtual block devices for all partitions. + virtual bool MapAllPartitions() = 0; + // Unmap virtual block devices for all partitions. + virtual bool UnmapAllPartitions() = 0; }; } // namespace chromeos_update_engine |