00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
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
00057 virtual void compress( const std::string& data );
00058
00059
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__