1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-19 16:47:14 +02:00

Major plugin refactor and cleanup.

Switched to POCO library for unified platform/library interface.
Deprecated the external module API. It was creating more problems than solving.
Removed most built-in libraries in favor of system libraries for easier maintenance.
Cleaned and secured code with help from static analyzers.
This commit is contained in:
Sandu Liviu Catalin
2021-01-30 08:51:39 +02:00
parent e0e34b4030
commit 4a6bfc086c
6219 changed files with 1209835 additions and 454916 deletions

View File

@ -0,0 +1,86 @@
//
// QuotedPrintableDecoder.h
//
// Library: Net
// Package: Messages
// Module: QuotedPrintableDecoder
//
// Definition of the QuotedPrintableDecoder class.
//
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Net_QuotedPrintableDecoder_INCLUDED
#define Net_QuotedPrintableDecoder_INCLUDED
#include "Poco/Net/Net.h"
#include "Poco/UnbufferedStreamBuf.h"
#include <istream>
namespace Poco {
namespace Net {
class Net_API QuotedPrintableDecoderBuf: public Poco::UnbufferedStreamBuf
/// This streambuf decodes all quoted-printable (see RFC 2045)
/// encoded data read from the istream connected to it.
///
/// Note: For performance reasons, the characters
/// are read directly from the given istream's
/// underlying streambuf, so the state
/// of the istream will not reflect that of
/// its streambuf.
{
public:
QuotedPrintableDecoderBuf(std::istream& istr);
~QuotedPrintableDecoderBuf();
private:
int readFromDevice();
std::streambuf& _buf;
};
class Net_API QuotedPrintableDecoderIOS: public virtual std::ios
/// The base class for QuotedPrintableDecoder.
///
/// This class is needed to ensure the correct initialization
/// order of the stream buffer and base classes.
{
public:
QuotedPrintableDecoderIOS(std::istream& istr);
~QuotedPrintableDecoderIOS();
QuotedPrintableDecoderBuf* rdbuf();
protected:
QuotedPrintableDecoderBuf _buf;
};
class Net_API QuotedPrintableDecoder: public QuotedPrintableDecoderIOS, public std::istream
/// This istream decodes all quoted-printable (see RFC 2045)
/// encoded data read from the istream connected to it.
///
/// Note: For performance reasons, the characters
/// are read directly from the given istream's
/// underlying streambuf, so the state
/// of the istream will not reflect that of
/// its streambuf.
{
public:
QuotedPrintableDecoder(std::istream& istr);
~QuotedPrintableDecoder();
};
} } // namespace Poco::Net
#endif // Net_QuotedPrintableDecoder_INCLUDED