Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

UnzippingInputStream.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 2003-2005 by Autodesk, Inc.
00003 //
00004 //  By using this code, you are agreeing to the terms and conditions of
00005 //  the License Agreement included in the documentation for this code.
00006 //
00007 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED,
00008 //  AS TO THE CORRECTNESS OF THIS CODE OR ANY DERIVATIVE
00009 //  WORKS WHICH INCORPORATE IT.
00010 //
00011 //  AUTODESK PROVIDES THE CODE ON AN "AS-IS" BASIS
00012 //  AND EXPLICITLY DISCLAIMS ANY LIABILITY, INCLUDING
00013 //  CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00014 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00015 //
00016 //  Use, duplication, or disclosure by the U.S. Government is subject to
00017 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00018 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00019 //  Data and Computer Software), as applicable.
00020 //
00021 
00022 
00023 #ifndef _DWFCORE_UNZIPPING_INPUT_STREAM_H
00024 #define _DWFCORE_UNZIPPING_INPUT_STREAM_H
00025 
00030 
00031 
00032 #include "dwfcore/String.h"
00033 #include "dwfcore/InputStream.h"
00034 #include "dwfcore/zip/unzip.h"
00035 
00036 
00037 
00038 namespace DWFCore
00039 {
00040 
00041 
00047 class DWFUnzippingInputStream : public DWFCoreMemory
00048                               , public DWFInputStream
00049 {
00050 
00051 public:
00052 
00060     _DWFCORE_API 
00061     DWFUnzippingInputStream( unzFile pUnzipStream )
00062         throw();
00063 
00069     _DWFCORE_API 
00070     virtual ~DWFUnzippingInputStream()
00071         throw();
00072 
00080     _DWFCORE_API 
00081     void open( const DWFString& zArchivedFile,
00082                const DWFString& zPassword = "" )
00083         throw( DWFException );
00084 
00089     _DWFCORE_API 
00090     size_t available() const
00091         throw( DWFException );
00092 
00096     _DWFCORE_API 
00097     size_t read( void*  pBuffer, size_t nBytesToRead )
00098         throw( DWFException );
00099 
00103     _DWFCORE_API 
00104     off_t seek( int eOrigin, off_t nOffset )
00105         throw( DWFException );
00106 
00107 private:
00108 
00109     bool    _bFileOpen;
00110     size_t  _nFileBytesRemaining;
00111     unzFile _pUnzipStream;
00112 
00113 private:
00114 
00115     //
00116     // Unimplemented methods
00117     //
00118 
00119     DWFUnzippingInputStream( const DWFUnzippingInputStream& );
00120     DWFUnzippingInputStream& operator=( const DWFUnzippingInputStream& );
00121 };
00122 
00123 }
00124 
00125 
00126 
00127 #endif

Generated on Tue May 17 12:05:10 2005 for Autodesk DWF Core Library by  doxygen 1.4.1