full_update_generator.h revision 477aec2166a571cbe28081d806c3226e8b31b6e9
1// Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef UPDATE_ENGINE_PAYLOAD_GENERATOR_FULL_UPDATE_GENERATOR_H_ 6#define UPDATE_ENGINE_PAYLOAD_GENERATOR_FULL_UPDATE_GENERATOR_H_ 7 8#include <string> 9#include <vector> 10 11#include <base/macros.h> 12 13#include "update_engine/payload_generator/operations_generator.h" 14#include "update_engine/payload_generator/payload_generation_config.h" 15 16namespace chromeos_update_engine { 17 18class FullUpdateGenerator : public OperationsGenerator { 19 public: 20 FullUpdateGenerator() = default; 21 22 // Creates a full update for the target image defined in |config|. |config| 23 // must be a valid payload generation configuration for a full payload. 24 // Populates |rootfs_ops| and |kernel_ops|, with data about the update 25 // operations, and writes relevant data to |data_file_fd|, updating 26 // |data_file_size| as it does. 27 bool GenerateOperations( 28 const PayloadGenerationConfig& config, 29 int data_file_fd, 30 off_t* data_file_size, 31 std::vector<AnnotatedOperation>* rootfs_ops, 32 std::vector<AnnotatedOperation>* kernel_ops) override; 33 34 private: 35 DISALLOW_COPY_AND_ASSIGN(FullUpdateGenerator); 36}; 37 38} // namespace chromeos_update_engine 39 40#endif // UPDATE_ENGINE_PAYLOAD_GENERATOR_FULL_UPDATE_GENERATOR_H_ 41