Missing install target.
[libdcp.git] / src / data.h
1 /*
2     Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 #ifndef LIBDCP_DATA_H
21 #define LIBDCP_DATA_H
22
23 /** @file  src/data.h
24  *  @brief Data class.
25  */
26
27 #include <boost/shared_array.hpp>
28 #include <boost/filesystem.hpp>
29 #include <stdint.h>
30
31 namespace dcp {
32
33 /** A block of arbitrary data */
34 class Data
35 {
36 public:
37         Data () {}
38
39         Data (boost::shared_array<uint8_t> data_, boost::uintmax_t size_)
40                 : data (data_)
41                 , size (size_)
42         {}
43
44         Data (uint8_t const * data, boost::uintmax_t size_);
45
46         Data (boost::filesystem::path file);
47
48         boost::shared_array<uint8_t> data;
49         boost::uintmax_t size;
50 };
51
52 }
53
54 #endif