tekfilebz2ascii.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 
00021 #ifndef     TEKFILEBZ2ASCII_H_6CC3729C_2D12_11DA_887B_000BDBC434D9
00022 #define     TEKFILEBZ2ASCII_H_6CC3729C_2D12_11DA_887B_000BDBC434D9
00023 
00024 #ifndef     TEKLTI_H_C35A2A4C_D475_11D9_90BC_000BDBC434D9
00025 #error      This file must be included from <teklti.h>
00026 #endif      /* TEKLTI_H_C35A2A4C_D475_11D9_90BC_000BDBC434D9 */
00027 
00028 #ifdef      TEKLTI_USE_BZIP2
00029 
00030 #define NULLTEST  0
00031 
00032 
00033 TEKUUIDIMPORT(UTekFileBZ2ASCII);
00034 
00035 
00046 class TekFileBZ2ASCII : public TekFileBZ2, public TekFileASCII
00047 {
00048 private:
00049 FILE * PrivFileDesc;
00050 BZFILE * PrivBZ2FileDesc;
00051 
00052 unsigned long PrivFlags;
00053 unsigned long PrivBlockSize;
00054 
00055 uint64_t PrivBytesIn;
00056 uint64_t PrivBytesOut;
00057 
00058 uint8_t * PrivUnused;
00059 int PrivUnusedLen;
00060 
00061 int PrivWorkFactor;
00062 int PrivVerbosity;
00063 
00064 uchar_t PrivFilename;
00065 
00066 public:
00067 TekFileBZ2ASCII();
00068 
00069 ~TekFileBZ2ASCII();
00070 
00076 TEKSTD_HEADER_VARSANDFUNC(TekFileBZ2ASCII);
00077 
00078 virtual TEKERR ReadLine(uchar_t** Buffer, unsigned long ReadMax);
00079 virtual TEKERR WriteLine(const uchar_t* Buffer);
00080 
00081 virtual TEKERR get_BytesIn(uint64_t * RetVal);
00082 virtual TEKERR get_BytesOut(uint64_t * RetVal);
00083 virtual TEKERR put_UseLessMemory(unsigned int NewVal);
00084 virtual TEKERR get_UseLessMemory(unsigned int * RetVal);
00085 virtual TEKERR put_WorkFactor(unsigned int NewVal);
00086 virtual TEKERR get_WorkFactor(unsigned int * RetVal);
00087 virtual TEKERR put_Verbosity(unsigned int NewVal);
00088 virtual TEKERR get_Verbosity(unsigned int * RetVal);
00089 virtual TEKERR put_BlockSize(unsigned int NewVal);
00090 virtual TEKERR get_BlockSize(unsigned int * RetVal);
00091 virtual TEKERR CloseStream();
00092 virtual TEKERR OpenStream();
00093 virtual TEKERR get_FILE(FILE ** FileDescriptor);
00094 virtual TEKERR get_Filename(uchar_t ** Name);
00095 virtual TEKERR get_Mode(TekFileMode * ModeID);
00096 virtual TEKERR get_Type(TekFileType * FileTypePointer);
00097 virtual TEKERR put_FILE(FILE * FileDescriptor);
00098 virtual TEKERR put_Filename(uchar_t * Name);
00099 virtual TEKERR put_Mode(TekFileMode ModeID);
00100 
00101 virtual TEKERR Close();
00102 virtual TEKERR Flush();
00103 virtual TEKERR Open();
00104 virtual TEKERR Open64();
00105 virtual TEKERR Read64(
00106       void * Buffer,
00107       uint64_t BytesToRead,
00108       uint64_t * BytesRead
00109 );
00110 virtual TEKERR Read(
00111       void * Buffer,
00112       unsigned long BytesToRead,
00113       unsigned long * BytesRead
00114 );
00115 virtual TEKERR Seek64(TekFileSeek SeekWhere, int64_t NewLocation);
00116 virtual TEKERR Seek(TekFileSeek SeekWhere, signed long NewLocation);
00117 virtual TEKERR Write64(
00118       void * Buffer,
00119       uint64_t BytesToWrite,
00120       uint64_t * BytesWrote
00121 );
00122 virtual TEKERR Write(
00123       void * Buffer,
00124       unsigned long BytesToWrite,
00125       unsigned long * BytesWrote
00126 );
00127 virtual TEKERR get_Location(unsigned long * Location);
00128 virtual TEKERR get_Location64(uint64_t * Location);
00129 };
00130 
00131 #endif      /* TEKLTI_USE_BZIP2 */
00132 
00133 #endif      /* TEKFILEBZ2ASCII_H_6CC3729C_2D12_11DA_887B_000BDBC434D9 */
SourceForge.net Logo  Technical Library Template Interface Project Page