OLD | NEW |
---|---|
(Empty) | |
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 CHROMEOS_PLATFORM_UPDATE_ENGINE_METADATA_H__ | |
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_METADATA_H__ | |
7 | |
8 #include "update_engine/delta_diff_generator.h" | |
9 #include "update_engine/graph_types.h" | |
10 | |
11 namespace chromeos_update_engine { | |
12 | |
13 // Reads metadata from old image and new image and determines | |
14 // the smallest way to encode the metadata for the diff. | |
15 // If there's no change in the metadata, it creates a MOVE | |
16 // operation. If there is a change, the smallest of REPLACE, REPLACE_BZ, | |
17 // or BSDIFF wins. It writes the diff to data_fd and updates data_file_size | |
18 // accordingly. It also adds the required operation to the graph and adds the | |
19 // metadata extents to blocks. | |
20 // Returns true on success. | |
21 bool DeltaReadMetadata(Graph* graph, | |
petkov
2010/12/15 18:40:32
This should probably be a static member of a class
thieule
2010/12/15 19:57:01
Done.
| |
22 std::vector<DeltaDiffGenerator::Block>* blocks, | |
23 const std::string& old_image, | |
24 const std::string& new_image, | |
25 int data_fd, | |
26 off_t* data_file_size); | |
27 | |
28 }; // namespace chromeos_update_engine | |
29 | |
30 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_METADATA_H__ | |
OLD | NEW |