00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00029 #ifndef _IFDFILECONTAINER_H_
00030 #define _IFDFILECONTAINER_H_
00031
00032 #include <vector>
00033
00034 #include <libopenraw/consts.h>
00035 #include <libopenraw/types.h>
00036
00037 #include "rawcontainer.h"
00038 #include "ifddir.h"
00039 #include "ifdentry.h"
00040
00041 namespace OpenRaw {
00042 namespace Internals {
00043
00044
00045 class IFDFileContainer
00046 : public RawContainer
00047 {
00048 public:
00054 IFDFileContainer(IO::Stream *file, off_t offset);
00056 virtual ~IFDFileContainer();
00057
00062 enum {
00063 IFD_NONE = -1,
00064 IFD_EXIF = -2,
00065 IFD_GPS = -3,
00066 IFD_INTEROP = -4
00067 };
00068
00078 virtual EndianType isMagicHeader(const char *p, int len);
00079
00086 IFDDir::Ref setDirectory(int dir);
00092 int countDirectories(void);
00096 std::vector<IFDDir::Ref> & directories();
00097
00103 int currentDirectory();
00104
00109 size_t getDirectoryDataSize();
00110
00111
00116 int lastError() const
00117 {
00118 return m_error;
00119 }
00120
00121 private:
00122 int m_error;
00123
00124 IFDDir::Ref m_current_dir;
00125 std::vector<IFDDir::Ref> m_dirs;
00126
00127 bool _locateDirs();
00128 };
00129
00130 }
00131 }
00132
00133 #endif