blob: d3864882224c86567ff42a79f43fe35df75c3954 [file] [log] [blame]
halcanary34422612015-10-12 10:11:18 -07001/*
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"
halcanary34422612015-10-12 10:11:18 -070012
13class SkPDFObject;
14
halcanary4b656662016-04-27 07:45:18 -070015namespace SkPDFMetadata {
16sk_sp<SkPDFObject> MakeDocumentInformationDict(const SkDocument::PDFMetadata&);
halcanary34422612015-10-12 10:11:18 -070017
halcanary4b656662016-04-27 07:45:18 -070018struct UUID {
19 uint8_t fData[16];
halcanary34422612015-10-12 10:11:18 -070020};
21
halcanary4b656662016-04-27 07:45:18 -070022UUID CreateUUID(const SkDocument::PDFMetadata&);
23
24sk_sp<SkPDFObject> MakePdfId(const UUID& doc, const UUID& instance);
25
26sk_sp<SkPDFObject> MakeXMPObject(const SkDocument::PDFMetadata&,
27 const UUID& doc,
28 const UUID& instance);
29
30#ifdef SK_SUPPORT_LEGACY_DOCUMENT_API
31void SetMetadataByKey(const SkString& key,
32 const SkString& value,
33 SkDocument::PDFMetadata*);
34#endif
35}
halcanary34422612015-10-12 10:11:18 -070036#endif // SkPDFMetadata_DEFINED