tekfilebz2.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Kevin McBride                                   *
00003  *   kevin@planetsaphire.com                                               *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Library General Public License as       *
00007  *   published by the Free Software Foundation; either version 2 of the    *
00008  *   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 Library General Public     *
00016  *   License along with this program; if not, write to the                 *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef TEKFILEBZ2_H_D5A00EBC_2C7F_11DA_9138_000BDBC434D9
00021 #define TEKFILEBZ2_H_D5A00EBC_2C7F_11DA_9138_000BDBC434D9
00022 
00023 #ifndef     TEKLTI_H_C35A2A4C_D475_11D9_90BC_000BDBC434D9
00024 #error      This file must be included from <teklti.h>
00025 #endif      /* TEKLTI_H_C35A2A4C_D475_11D9_90BC_000BDBC434D9 */
00026 
00027 #ifdef      TEKLTI_USE_BZIP2
00028 
00029 
00030 /* Define the error codes, then the building block of BZIP2. */
00031 
00032 #define     TEKERR_BZIP2_NOTASTREAM       0x01000000
00033 #define     TEKERR_BZIP2_UNEXPECTEDEOF    0x02000000
00034 
00035 
00036 TEKUUIDIMPORT(UTekFileBZ2);
00037 
00038 
00046 class TekFileBZ2 : public TekFile
00047 {
00048 public:
00052 TekFileBZ2();
00053 
00057 ~TekFileBZ2();
00058 
00059 #ifndef     TEKSTD_INTERNAL
00060 #ifndef     TEKFILE_INTERNAL
00061 #ifdef      TEKFILEBZ2_INTERNAL
00062 #if   TEKFILEBZ2_INTERNAL != 0
00063 #error Compilation fault!  TEKFILEBZ2_INTERNAL can not be defined!
00064 #endif      /* TEKFILEBZ2_INTERNAL != 0 */
00065 #else /* not TEKFILEBZ2_INTERNAL */
00066 //TEKSTD_HEADER_VARSANDFUNC(TekFileBZ2)
00067 
00068 virtual TEKERR get_BytesIn(uint64_t * RetVal) = 0;
00069 virtual TEKERR get_BytesOut(uint64_t * RetVal) = 0;
00070 virtual TEKERR put_UseLessMemory(unsigned int NewVal) = 0;
00071 virtual TEKERR get_UseLessMemory(unsigned int * RetVal) = 0;
00072 virtual TEKERR put_WorkFactor(unsigned int NewVal) = 0;
00073 virtual TEKERR get_WorkFactor(unsigned int * RetVal) = 0;
00074 virtual TEKERR put_Verbosity(unsigned int NewVal) = 0;
00075 virtual TEKERR get_Verbosity(unsigned int * RetVal) = 0;
00076 virtual TEKERR put_BlockSize(unsigned int NewVal) = 0;
00077 virtual TEKERR get_BlockSize(unsigned int * RetVal) = 0;
00078 virtual TEKERR CloseStream() = 0;
00079 virtual TEKERR OpenStream() = 0;
00080 virtual TEKERR get_FILE(FILE ** FileDescriptor) = 0;
00081 virtual TEKERR get_Filename(uchar_t ** Name) = 0;
00082 virtual TEKERR get_Mode(TekFileMode * ModeID) = 0;
00083 virtual TEKERR get_Type(TekFileType * FileTypePointer) = 0;
00084 virtual TEKERR put_FILE(FILE * FileDescriptor) = 0;
00085 virtual TEKERR put_Filename(uchar_t * Name) = 0;
00086 virtual TEKERR put_Mode(TekFileMode ModeID) = 0;
00087 
00088 virtual TEKERR Close() = 0;
00089 virtual TEKERR Flush() = 0;
00090 virtual TEKERR Open() = 0;
00091 virtual TEKERR Open64() = 0;
00092 virtual TEKERR Read64(
00093       void * Buffer,
00094       uint64_t BytesToRead,
00095       uint64_t * BytesRead
00096 ) = 0;
00097 virtual TEKERR Read(
00098       void * Buffer,
00099       unsigned long BytesToRead,
00100       unsigned long * BytesRead
00101 ) = 0;
00102 virtual TEKERR Seek64(TekFileSeek SeekWhere, int64_t NewLocation) = 0;
00103 virtual TEKERR Seek(TekFileSeek SeekWhere, signed long NewLocation) = 0;
00104 virtual TEKERR Write64(
00105       void * Buffer,
00106       uint64_t BytesToWrite,
00107       uint64_t * BytesWrote
00108 ) = 0;
00109 virtual TEKERR Write(
00110       void * Buffer,
00111       unsigned long BytesToWrite,
00112       unsigned long * BytesWrote
00113 ) = 0;
00114 virtual TEKERR get_Location(unsigned long * Location) = 0;
00115 virtual TEKERR get_Location64(uint64_t * Location) = 0;
00116 #endif      /* not TEKFILEBZ2_INTERNAL */
00117 #endif      /* not TEKFILE_INTERNAL */
00118 #endif      /* not TEKSTD_INTERNAL */
00119 
00125 //TEKSTD_HEADER_VARSANDFUNC(TekFile);
00126 TEKSTD_HEADER_VARS
00127 
00128 };
00129 
00130 #endif      /* TEKLTI_USE_BZIP2 */
00131 #endif      /* TEKFILEBZ2_H_D5A00EBC_2C7F_11DA_9138_000BDBC434D9 */
SourceForge.net Logo  Technical Library Template Interface Project Page