Alex Deymo | aea4c1c | 2015-08-19 20:24:43 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2010 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
Darin Petkov | 7a22d79 | 2010-11-08 14:10:00 -0800 | [diff] [blame] | 16 | |
Alex Vakulenko | 072359c | 2014-07-18 11:41:07 -0700 | [diff] [blame] | 17 | #ifndef UPDATE_ENGINE_PAYLOAD_GENERATOR_FULL_UPDATE_GENERATOR_H_ |
| 18 | #define UPDATE_ENGINE_PAYLOAD_GENERATOR_FULL_UPDATE_GENERATOR_H_ |
Darin Petkov | 7a22d79 | 2010-11-08 14:10:00 -0800 | [diff] [blame] | 19 | |
Alex Vakulenko | 072359c | 2014-07-18 11:41:07 -0700 | [diff] [blame] | 20 | #include <string> |
| 21 | #include <vector> |
| 22 | |
Alex Deymo | 477aec2 | 2015-03-24 23:40:48 -0700 | [diff] [blame] | 23 | #include <base/macros.h> |
| 24 | |
Sen Jiang | 8cc502d | 2015-08-10 10:04:54 -0700 | [diff] [blame] | 25 | #include "update_engine/payload_generator/blob_file_writer.h" |
Alex Deymo | 477aec2 | 2015-03-24 23:40:48 -0700 | [diff] [blame] | 26 | #include "update_engine/payload_generator/operations_generator.h" |
Alex Deymo | f1cbe17 | 2015-03-05 15:58:37 -0800 | [diff] [blame] | 27 | #include "update_engine/payload_generator/payload_generation_config.h" |
Darin Petkov | 7a22d79 | 2010-11-08 14:10:00 -0800 | [diff] [blame] | 28 | |
| 29 | namespace chromeos_update_engine { |
| 30 | |
Alex Deymo | 477aec2 | 2015-03-24 23:40:48 -0700 | [diff] [blame] | 31 | class FullUpdateGenerator : public OperationsGenerator { |
Darin Petkov | 7a22d79 | 2010-11-08 14:10:00 -0800 | [diff] [blame] | 32 | public: |
Alex Deymo | 477aec2 | 2015-03-24 23:40:48 -0700 | [diff] [blame] | 33 | FullUpdateGenerator() = default; |
| 34 | |
Alex Deymo | 7fad7b7 | 2015-07-21 22:22:47 -0700 | [diff] [blame] | 35 | // OperationsGenerator override. |
Alex Deymo | f1cbe17 | 2015-03-05 15:58:37 -0800 | [diff] [blame] | 36 | // Creates a full update for the target image defined in |config|. |config| |
| 37 | // must be a valid payload generation configuration for a full payload. |
Sen Jiang | ebdf17d | 2015-08-19 11:53:27 -0700 | [diff] [blame] | 38 | // Populates |aops|, with data about the update operations, and writes |
| 39 | // relevant data to |blob_file|. |
Alex Deymo | 477aec2 | 2015-03-24 23:40:48 -0700 | [diff] [blame] | 40 | bool GenerateOperations( |
Alex Deymo | f1cbe17 | 2015-03-05 15:58:37 -0800 | [diff] [blame] | 41 | const PayloadGenerationConfig& config, |
Sen Jiang | ebdf17d | 2015-08-19 11:53:27 -0700 | [diff] [blame] | 42 | const PartitionConfig& old_part, |
Alex Deymo | 7fad7b7 | 2015-07-21 22:22:47 -0700 | [diff] [blame] | 43 | const PartitionConfig& new_part, |
Sen Jiang | 8cc502d | 2015-08-10 10:04:54 -0700 | [diff] [blame] | 44 | BlobFileWriter* blob_file, |
Sen Jiang | ebdf17d | 2015-08-19 11:53:27 -0700 | [diff] [blame] | 45 | std::vector<AnnotatedOperation>* aops) override; |
Alex Deymo | 7fad7b7 | 2015-07-21 22:22:47 -0700 | [diff] [blame] | 46 | |
Darin Petkov | 7a22d79 | 2010-11-08 14:10:00 -0800 | [diff] [blame] | 47 | private: |
Alex Deymo | 477aec2 | 2015-03-24 23:40:48 -0700 | [diff] [blame] | 48 | DISALLOW_COPY_AND_ASSIGN(FullUpdateGenerator); |
Darin Petkov | 7a22d79 | 2010-11-08 14:10:00 -0800 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | } // namespace chromeos_update_engine |
| 52 | |
Alex Vakulenko | 072359c | 2014-07-18 11:41:07 -0700 | [diff] [blame] | 53 | #endif // UPDATE_ENGINE_PAYLOAD_GENERATOR_FULL_UPDATE_GENERATOR_H_ |