| // Copyright 2026 Google LLC | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // https://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, | |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| // See the License for the specific language governing permissions and | |
| // limitations under the License. | |
| // | |
| #ifndef THIRD_PARTY_CREDENTIO_FORMATS_PDF_MANIFEST_STORE_MERGER_H_ | |
| #define THIRD_PARTY_CREDENTIO_FORMATS_PDF_MANIFEST_STORE_MERGER_H_ | |
| #include <string> | |
| #include "absl/status/statusor.h" | |
| #include "absl/strings/string_view.h" | |
| #include "absl/types/span.h" | |
| namespace credentio { | |
| // Merges one or more serialized C2PA Manifest Store SuperBoxes ('c2pa') into | |
| // a single unified Manifest Store SuperBox. | |
| // | |
| // In accordance with C2PA Spec 2.2 §10.4.3, §15.5.1, and §A.4.2.1, child boxes | |
| // are ordered such that the manifest from the newest PDF increment (the active | |
| // manifest in stores.back()) is placed last in the resulting SuperBox. | |
| absl::StatusOr<std::string> MergeManifestStores( | |
| absl::Span<const absl::string_view> stores); | |
| } // namespace credentio | |
| #endif // THIRD_PARTY_CREDENTIO_FORMATS_PDF_MANIFEST_STORE_MERGER_H_ |