compressiondefault.h
/*
* Copyright (c) 2009-2023 by Jakob Schröter <js@camaya.net>
* This file is part of the gloox library. http://camaya.net/gloox
*
* This software is distributed under a license. The full license
* agreement can be found in the file LICENSE in this distribution.
* This software may not be copied, modified, sold or distributed
* other than expressed in the named license agreement.
*
* This software is distributed without any warranty.
*/
#ifndef COMPRESSIONDEFAULT_H__
#define COMPRESSIONDEFAULT_H__
#include "compressionbase.h"
namespace gloox
{
class CompressionDataHandler;
class GLOOX_API CompressionDefault : public CompressionBase
{
public:
enum Method
{
MethodZlib = 1,
MethodLZW = 2
};
CompressionDefault( CompressionDataHandler* cdh, Method method = MethodZlib );
virtual ~CompressionDefault();
static int types();
// reimplemented from CompressionBase
virtual bool init();
// reimplemented from CompressionBase
virtual void compress( const std::string& data );
// reimplemented from CompressionBase
virtual void decompress( const std::string& data );
// reimplemented from CompressionBase
virtual void cleanup();
private:
CompressionBase* m_impl;
};
}
#endif // COMPRESSIONDEFAULT_H__
gloox::CompressionBase
This is an abstract base class for stream compression implementations.
Definition compressionbase.h:35
gloox::CompressionBase::CompressionBase
CompressionBase(CompressionDataHandler *cdh)
Definition compressionbase.h:42
gloox::CompressionDataHandler
An abstract base class used to receive de/compressed data from a CompressionBase-derived object.
Definition compressiondatahandler.h:35
gloox::CompressionDefault
This is an abstraction of the various Compression implementations.
Definition compressiondefault.h:31
gloox::CompressionDefault::Method
Method
Definition compressiondefault.h:38
gloox::CompressionDefault::MethodLZW
@ MethodLZW
Definition compressiondefault.h:40
gloox::CompressionDefault::MethodZlib
@ MethodZlib
Definition compressiondefault.h:39
gloox::CompressionDefault::CompressionDefault
CompressionDefault(CompressionDataHandler *cdh, Method method=MethodZlib)
Definition compressiondefault.cpp:32
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28