tekfilebinary.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 TEKFILEBINARY_H_D60710C0_E5EA_11D9_8325_000BDBC434D9
00022 #define TEKFILEBINARY_H_D60710C0_E5EA_11D9_8325_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 
00029 TEKUUIDIMPORT(UTekFileBinary);
00030 
00031 
00039 class TekFileBinary : public TekFile
00040 {
00041 private:
00042     uchar_t PrivFileName;
00043     FILE * PrivFileDesc;
00044     TekFileMode PrivFileMode;
00045     TekFileType PrivTekFileType;
00046 public:
00047     TekFileBinary();
00048 
00049     ~TekFileBinary();
00050 
00051     TEKERR ConvertToPipe();
00052 
00053     virtual TEKERR Close();
00054     virtual TEKERR Flush();
00055     virtual TEKERR get_FILE(FILE ** FileDescriptor);
00056     virtual TEKERR get_Filename(uchar_t ** Name);
00057     virtual TEKERR get_Mode(TekFileMode * ModeID);
00058     virtual TEKERR get_Type(TekFileType * FileTypePointer);
00059     virtual TEKERR Open();
00060     virtual TEKERR Open64();
00061     virtual TEKERR put_FILE(FILE * FileDescriptor);
00062     virtual TEKERR put_Filename(uchar_t * Name);
00063     virtual TEKERR put_Mode(TekFileMode ModeID);
00064     virtual TEKERR Read64(void * Buffer, uint64_t BytesToRead, uint64_t * BytesRead);
00065     virtual TEKERR Read(void * Buffer, unsigned long BytesToRead, unsigned long * BytesRead);
00066     virtual TEKERR Seek64(TekFileSeek SeekWhere, int64_t NewLocation);
00067     virtual TEKERR Seek(TekFileSeek SeekWhere, signed long NewLocation);
00068     virtual TEKERR Write64(void * Buffer, uint64_t BytesToWrite, uint64_t * BytesWrote);
00069     virtual TEKERR Write(void * Buffer, unsigned long BytesToWrite, unsigned long * BytesWrote);
00070     virtual TEKERR get_Location(unsigned long * Location);
00071     virtual TEKERR get_Location64(uint64_t * Location);
00072 
00073 //TEKSTD_HEADER_VARSANDFUNC(TekFileBinary);
00074 TEKSTD_HEADER_VARS;
00075 };
00076 
00077 #endif /* not TEKFILEBINARY_H_D60710C0_E5EA_11D9_8325_000BDBC434D9 */
00078 
00079 
SourceForge.net Logo  Technical Library Template Interface Project Page