compressiondefault.h

00001 /*
00002  * Copyright (c) 2009 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 COMPRESSIONDEFAULT_H__
00015 #define COMPRESSIONDEFAULT_H__
00016 
00017 #include "compressionbase.h"
00018 
00019 namespace gloox
00020 {
00021 
00022   class CompressionDataHandler;
00023 
00030   class GLOOX_API CompressionDefault : public CompressionBase
00031   {
00032     public:
00033 
00037       enum Method
00038       {
00039         MethodZlib   =  1,          
00040         MethodLZW    =  2           
00041       };
00042 
00048       CompressionDefault( CompressionDataHandler* cdh, Method method = MethodZlib );
00049 
00053       virtual ~CompressionDefault();
00054 
00059       static int types();
00060 
00061       // reimplemented from CompressionBase
00062       virtual bool init();
00063 
00064       // reimplemented from CompressionBase
00065       virtual void compress( const std::string& data );
00066 
00067       // reimplemented from CompressionBase
00068       virtual void decompress( const std::string& data );
00069 
00070       // reimplemented from CompressionBase
00071       virtual void cleanup();
00072 
00073     private:
00074       CompressionBase* m_impl;
00075 
00076   };
00077 
00078 }
00079 
00080 #endif // COMPRESSIONDEFAULT_H__
Generated on Tue Jun 8 23:37:53 2010 for gloox by  doxygen 1.6.3