aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFMetadata.h
blob: eb14e48e23eece07b94fe3f006e5a4ad3268b063 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * Copyright 2015 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SkPDFMetadata_DEFINED
#define SkPDFMetadata_DEFINED

#include "SkDocument.h"
#include "SkTime.h"

class SkPDFObject;

struct SkPDFMetadata {
    SkTArray<SkDocument::Attribute> fInfo;
    std::unique_ptr<const SkTime::DateTime> fCreation;
    std::unique_ptr<const SkTime::DateTime> fModified;

    SkPDFObject* createDocumentInformationDict() const;

#ifdef SK_PDF_GENERATE_PDFA
    struct UUID {
        uint8_t fData[16];
    };
    UUID uuid() const;
    static SkPDFObject* CreatePdfId(const UUID& doc, const UUID& instance);
    SkPDFObject* createXMPObject(const UUID& doc, const UUID& instance) const;
#endif  // SK_PDF_GENERATE_PDFA
};

#endif  // SkPDFMetadata_DEFINED