ZippingOutputStream.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 2003-2006 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_ZIPPING_OUTPUT_STREAM_H
00024 #define _DWFCORE_ZIPPING_OUTPUT_STREAM_H
00025 
00030 
00031 #include "dwfcore/String.h"
00032 #include "dwfcore/OutputStream.h"
00033 #include "dwfcore/ZipFileDescriptor.h"
00034 
00035 
00036 
00037 namespace DWFCore
00038 {
00039 
00046 class DWFZippingOutputStream : virtual public DWFCoreMemory
00047                              , public DWFOutputStream
00048 {
00049 
00050 public:
00051 
00063     _DWFCORE_API
00064     DWFZippingOutputStream( zipFile                            pZipStream,
00065                             DWFZipFileDescriptor::teFileMode   eZipMode )
00066         throw();
00067 
00073     _DWFCORE_API 
00074     virtual ~DWFZippingOutputStream()
00075         throw();
00076 
00085     _DWFCORE_API 
00086     void open( const DWFString& zArchiveFile,
00087                const DWFString& zPassword = "",
00088                bool bPKZIPCompliantPassword = true )
00089         throw( DWFException );
00090 
00094     _DWFCORE_API 
00095     void flush()
00096         throw( DWFException );
00097 
00101     _DWFCORE_API 
00102     size_t write( const void*   pBuffer,
00103                   size_t        nBytesToWrite )
00104         throw( DWFException );
00105 
00106 private:
00107 
00108     bool                                _bFileOpen;
00109     zipFile                             _pZipStream;
00110     DWFZipFileDescriptor::teFileMode    _eZipMode;
00111 
00112 private:
00113 
00114     //
00115     // Unimplemented methods
00116     //
00117 
00118     DWFZippingOutputStream( const DWFZippingOutputStream& );
00119     DWFZippingOutputStream& operator=( const DWFZippingOutputStream& );
00120 };
00121 
00122 }
00123 
00124 
00125 
00126 #endif

Generated on Tue Jan 6 22:39:29 2009 for Autodesk DWF Core Library by  doxygen 1.4.5