DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
src/mt32/File.h
00001 /* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
00002  * Copyright (C) 2011, 2012, 2013 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
00003  *
00004  *  This program is free software: you can redistribute it and/or modify
00005  *  it under the terms of the GNU Lesser General Public License as published by
00006  *  the Free Software Foundation, either version 2.1 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU Lesser General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Lesser General Public License
00015  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016  */
00017 
00018 #ifndef MT32EMU_FILE_H
00019 #define MT32EMU_FILE_H
00020 
00021 #include <cstddef>
00022 
00023 namespace MT32Emu {
00024 
00025 class File {
00026 private:
00027         bool sha1DigestCalculated;
00028         char sha1Digest[41];
00029 protected:
00030         size_t fileSize;
00031         unsigned char *data;
00032 public:
00033         File();
00034         virtual ~File() {}
00035         virtual size_t getSize() = 0;
00036         virtual const unsigned char *getData() = 0;
00037         virtual const char *getSHA1();
00038 
00039         virtual void close() = 0;
00040 };
00041 
00042 }
00043 
00044 #endif