halcanary | 3442261 | 2015-10-12 10:11:18 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef SkPDFMetadata_DEFINED |
| 9 | #define SkPDFMetadata_DEFINED |
| 10 | |
| 11 | #include "SkDocument.h" |
halcanary | 3442261 | 2015-10-12 10:11:18 -0700 | [diff] [blame] | 12 | |
| 13 | class SkPDFObject; |
| 14 | |
halcanary | 4b65666 | 2016-04-27 07:45:18 -0700 | [diff] [blame] | 15 | namespace SkPDFMetadata { |
| 16 | sk_sp<SkPDFObject> MakeDocumentInformationDict(const SkDocument::PDFMetadata&); |
halcanary | 3442261 | 2015-10-12 10:11:18 -0700 | [diff] [blame] | 17 | |
halcanary | 4b65666 | 2016-04-27 07:45:18 -0700 | [diff] [blame] | 18 | struct UUID { |
| 19 | uint8_t fData[16]; |
halcanary | 3442261 | 2015-10-12 10:11:18 -0700 | [diff] [blame] | 20 | }; |
| 21 | |
halcanary | 4b65666 | 2016-04-27 07:45:18 -0700 | [diff] [blame] | 22 | UUID CreateUUID(const SkDocument::PDFMetadata&); |
| 23 | |
| 24 | sk_sp<SkPDFObject> MakePdfId(const UUID& doc, const UUID& instance); |
| 25 | |
| 26 | sk_sp<SkPDFObject> MakeXMPObject(const SkDocument::PDFMetadata&, |
| 27 | const UUID& doc, |
| 28 | const UUID& instance); |
| 29 | |
| 30 | #ifdef SK_SUPPORT_LEGACY_DOCUMENT_API |
| 31 | void SetMetadataByKey(const SkString& key, |
| 32 | const SkString& value, |
| 33 | SkDocument::PDFMetadata*); |
| 34 | #endif |
| 35 | } |
halcanary | 3442261 | 2015-10-12 10:11:18 -0700 | [diff] [blame] | 36 | #endif // SkPDFMetadata_DEFINED |