compressionbase.h
/*
Copyright (c) 2005-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 COMPRESSIONBASE_H__
#define COMPRESSIONBASE_H__
#include "gloox.h"
#include "compressiondatahandler.h"
#include <string>
namespace gloox
{
class GLOOX_API CompressionBase
{
public:
CompressionBase( CompressionDataHandler* cdh ) : m_handler( cdh ), m_valid( false ) {}
virtual ~CompressionBase() {}
virtual bool init() = 0;
virtual void compress( const std::string& data ) = 0;
virtual void decompress( const std::string& data ) = 0;
virtual void cleanup() = 0;
protected:
CompressionDataHandler* m_handler;
bool m_valid;
};
}
#endif // COMPRESSIONBASE_H__
gloox::CompressionBase::~CompressionBase
virtual ~CompressionBase()
Definition compressionbase.h:47
gloox::CompressionBase::compress
virtual void compress(const std::string &data)=0
gloox::CompressionBase::m_handler
CompressionDataHandler * m_handler
Definition compressionbase.h:76
gloox::CompressionBase::m_valid
bool m_valid
Definition compressionbase.h:79
gloox::CompressionBase::cleanup
virtual void cleanup()=0
gloox::CompressionBase::init
virtual bool init()=0
gloox::CompressionBase::CompressionBase
CompressionBase(CompressionDataHandler *cdh)
Definition compressionbase.h:42
gloox::CompressionBase::decompress
virtual void decompress(const std::string &data)=0
gloox::CompressionDataHandler
An abstract base class used to receive de/compressed data from a CompressionBase-derived object.
Definition compressiondatahandler.h:35
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28