summaryrefslogtreecommitdiff
path: root/includes/xmpmeta/xmp_data.h
blob: f6eb7f1644d5076f61601dc41167d61495cc957c (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
34
35
36
#ifndef DYNAMIC_DEPTH_INCLUDES_XMPMETA_XMP_DATA_H_  // NOLINT
#define DYNAMIC_DEPTH_INCLUDES_XMPMETA_XMP_DATA_H_  // NOLINT

#include <libxml/tree.h>

namespace dynamic_depth {
namespace xmpmeta {

// XmpData contains the standard, and optionally extended, XMP metadata from a
// JPEG file. See xmp_parser for reading XmpData from a JPEG or reading
// attributes from XmpData.
class XmpData {
 public:
  XmpData();
  ~XmpData();

  // Frees any allocated resources and resets the xmlDocPtrs to null.
  void Reset();

  // The standard XMP section.
  const xmlDocPtr StandardSection() const;
  xmlDocPtr* MutableStandardSection();

  // The extended XMP section.
  const xmlDocPtr ExtendedSection() const;
  xmlDocPtr* MutableExtendedSection();

 private:
  xmlDocPtr xmp_;
  xmlDocPtr xmp_extended_;
};

}  // namespace xmpmeta
}  // namespace dynamic_depth

#endif // DYNAMIC_DEPTH_INCLUDES_XMPMETA_XMP_DATA_H_  // NOLINT