full_update_generator.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. //
  16. #ifndef UPDATE_ENGINE_PAYLOAD_GENERATOR_FULL_UPDATE_GENERATOR_H_
  17. #define UPDATE_ENGINE_PAYLOAD_GENERATOR_FULL_UPDATE_GENERATOR_H_
  18. #include <string>
  19. #include <vector>
  20. #include <base/macros.h>
  21. #include "update_engine/payload_generator/blob_file_writer.h"
  22. #include "update_engine/payload_generator/operations_generator.h"
  23. #include "update_engine/payload_generator/payload_generation_config.h"
  24. namespace chromeos_update_engine {
  25. class FullUpdateGenerator : public OperationsGenerator {
  26. public:
  27. FullUpdateGenerator() = default;
  28. // OperationsGenerator override.
  29. // Creates a full update for the target image defined in |config|. |config|
  30. // must be a valid payload generation configuration for a full payload.
  31. // Populates |aops|, with data about the update operations, and writes
  32. // relevant data to |blob_file|.
  33. bool GenerateOperations(const PayloadGenerationConfig& config,
  34. const PartitionConfig& old_part,
  35. const PartitionConfig& new_part,
  36. BlobFileWriter* blob_file,
  37. std::vector<AnnotatedOperation>* aops) override;
  38. private:
  39. DISALLOW_COPY_AND_ASSIGN(FullUpdateGenerator);
  40. };
  41. } // namespace chromeos_update_engine
  42. #endif // UPDATE_ENGINE_PAYLOAD_GENERATOR_FULL_UPDATE_GENERATOR_H_