error.h

Go to the documentation of this file.
00001 /*
00002  * steghide 0.5.1 - a steganography program
00003  * Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at>
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018  *
00019  */
00020 
00021 #ifndef SH_ERROR_H
00022 #define SH_ERROR_H
00023 
00024 #include <cstdio>
00025 #include <string>
00026 
00027 #include "SteghideError.h"
00028 
00029 class BinaryIO ;
00030 
00031 class ArgError : public SteghideError {
00032         public:
00033         ArgError (const char *msgfmt, ...) ;
00034 
00035         void printMessage (void) const ;
00036 } ;
00037 
00038 class BinaryInputError : public SteghideError {
00039         public:
00040         enum TYPE { FILE_ERR, FILE_EOF, STDIN_ERR, STDIN_EOF } ;
00041 
00042         BinaryInputError (std::string fn, FILE* s) ;
00043 
00044         TYPE getType (void) ;
00045 
00046         protected:
00047         void setType (TYPE t) ;
00048 
00049         private:
00050         TYPE type ;
00051 } ;
00052 
00053 class BinaryOutputError : public SteghideError {
00054         public:
00055         enum TYPE { FILE_ERR, STDOUT_ERR } ;
00056 
00057         BinaryOutputError (std::string fn) ;
00058 
00059         TYPE getType (void) ;
00060 
00061         protected:
00062         void setType (TYPE t) ;
00063 
00064         private:
00065         TYPE type ;
00066 } ;
00067 
00068 class UnSupFileFormat : public SteghideError {
00069         public:
00070         UnSupFileFormat (BinaryIO *io) ;
00071 } ;
00072 
00073 class NotImplementedError : public SteghideError {
00074         public:
00075         NotImplementedError (const char* msgfmt, ...) ;
00076 
00077         void printMessage (void) const ;
00078 } ;
00079 
00086 class CorruptDataError : public SteghideError {
00087         public:
00088         CorruptDataError (const char* msgfmt, ...) ;
00089 
00090         void printMessage (void) const ;
00091 } ;
00092 
00093 #endif

Generated on Mon Oct 23 09:06:01 2006 for steghide by  doxygen 1.4.7