26 #include <sys/types.h>
30 #include "io/stream.hpp"
60 off_t offset()
const {
return m_offset; }
62 virtual int exifOffsetCorrection()
const
67 bool skip(off_t offset);
91 size_t fetchData(
void* buf, off_t offset,
size_t buf_size)
const;
102 void setEndian(
EndianType _endian) { m_endian = _endian; }
std::shared_ptr< Stream > Ptr
Generic interface for the RAW file container.
Option< uint32_t > readUInt32(const IO::Stream::Ptr &f, EndianType endian) const
Read an uint32 following the m_endian set.
Option< uint16_t > readUInt16(const IO::Stream::Ptr &f, EndianType endian) const
Read an uint16 following the m_endian set.
IO::Stream::Ptr m_file
The file handle.
EndianType
Define the endian of the container.
size_t fetchData(void *buf, off_t offset, size_t buf_size) const
Fetch the data chunk from the file.
Option< int32_t > readInt32(const IO::Stream::Ptr &f, EndianType endian) const
Read an int32 following the m_endian set.
Option< int16_t > readInt16(const IO::Stream::Ptr &f, EndianType endian) const
Read an int16 following the m_endian set.
off_t size() const
Return the effective size of the container.
size_t readUInt16Array(const IO::Stream::Ptr &f, std::vector< uint16_t > &v, size_t count) const
Read an array of uint16 following the m_endian set.
off_t m_offset
The offset from the beginning of the file.
RawContainer(const IO::Stream::Ptr &_file, off_t offset)
An option type inspired by Rust.
Global namespace for libopenraw.