rawfile.h

00001 /*
00002  * libopenraw - rawfile.h
00003  *
00004  * Copyright (C) 2005-2006 Hubert Figuiere
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 
00022 
00023 #ifndef __RAWFILE_H
00024 #define __RAWFILE_H
00025 
00026 #include <string>
00027 #include <vector>
00028 
00029 #include <libopenraw/libopenraw.h>
00030 
00031 namespace OpenRaw {
00032 
00033     class Thumbnail;
00034 
00035     void init();
00036 
00037     class RawFile
00038     {
00039     public:
00040         typedef ::or_rawfile_type Type;
00041 
00047         static RawFile *newRawFile(const char*_filename, 
00048                                                              Type _typeHint = OR_RAWFILE_TYPE_UNKNOWN);
00049 
00051         virtual ~RawFile();
00053         Type type() const;
00054 
00055         // standard api, like get thumbnail
00056         // and get exif.
00057 
00060         const std::vector<uint32_t> & listThumbnailSizes(void);
00066         ::or_error getThumbnail(uint32_t size, Thumbnail & thumbnail);
00067     protected:
00073         RawFile(const char *_filename, Type _type);
00078         virtual ::or_error _enumThumbnailSizes(std::vector<uint32_t> &list) = 0;
00079         
00087         virtual ::or_error _getThumbnail(uint32_t size, Thumbnail & thumbnail) = 0;
00088     private:
00089         static Type identify(const char*_filename);
00090 
00091         RawFile(const RawFile&);
00092         RawFile & operator=(const RawFile &);
00093 
00094         class Private;
00095 
00096         Private *d;
00097     };
00098 
00099 
00100 
00101 }
00102 
00103 
00104 #endif

Generated on Sat Jan 27 11:36:13 2007 for libopenraw by  doxygen 1.4.7