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

compressionzlib.h

00001 /*
00002   Copyright (c) 2005-2008 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 bool init();
00058 
00059       // reimplemented from CompressionBase
00060       virtual void compress( const std::string& data );
00061 
00062       // reimplemented from CompressionBase
00063       virtual void decompress( const std::string& data );
00064 
00065     private:
00066       z_stream m_zinflate;
00067       z_stream m_zdeflate;
00068 
00069       Mutex m_compressMutex;
00070 
00071   };
00072 
00073 }
00074 
00075 #endif // HAVE_ZLIB
00076 
00077 #endif // COMPRESSIONZLIB_H__

Generated on Sun Oct 12 16:25:15 2008 for gloox by  doxygen 1.4.1