compressionzlib.h

00001 /*
00002   Copyright (c) 2005-2007 by Jakob Schroeter <js@camaya.net>
00003   This file is part of the gloox library. http://camaya.net/gloox
00004 
00005   This software is distributed under a license. The full license
00006   agreement can be found in the file LICENSE in this distribution.
00007   This software may not be copied, modified, sold or distributed
00008   other than expressed in the named license agreement.
00009 
00010   This software is distributed without any warranty.
00011 */
00012 
00013 
00014 #ifndef COMPRESSIONZLIB_H__
00015 #define COMPRESSIONZLIB_H__
00016 
00017 #include "compressionbase.h"
00018 #include "mutex.h"
00019 
00020 #ifdef _WIN32
00021 # include "../config.h.win"
00022 #elif defined( _WIN32_WCE )
00023 # include "../config.h.win"
00024 #else
00025 # include "config.h"
00026 #endif
00027 
00028 #ifdef HAVE_ZLIB
00029 
00030 #include <zlib.h>
00031 
00032 #include <string>
00033 
00034 namespace gloox
00035 {
00042   class GLOOX_API CompressionZlib : public CompressionBase
00043   {
00044     public:
00049       CompressionZlib( CompressionDataHandler *cdh );
00050 
00054       virtual ~CompressionZlib();
00055 
00056       // reimplemented from CompressionBase
00057       virtual void compress( const std::string& data );
00058 
00059       // reimplemented from CompressionBase
00060       virtual void decompress( const std::string& data );
00061 
00062     private:
00063       z_stream m_zinflate;
00064       z_stream m_zdeflate;
00065 
00066       Mutex m_compressMutex;
00067 
00068   };
00069 
00070 }
00071 
00072 #endif // HAVE_ZLIB
00073 
00074 #endif // COMPRESSIONZLIB_H__

Generated on Sat Nov 10 08:50:27 2007 for gloox by  doxygen 1.5.3-20071008