diff --git a/SConstruct b/SConstruct index 27d708aa..9d048942 100644 --- a/SConstruct +++ b/SConstruct @@ -152,7 +152,7 @@ libvmime_sources = [ 'utility/encoder/eightBitEncoder.cpp', 'utility/encoder/eightBitEncoder.hpp', 'utility/encoder/b64Encoder.cpp', 'utility/encoder/b64Encoder.hpp', 'utility/encoder/binaryEncoder.cpp', 'utility/encoder/binaryEncoder.hpp', - 'utility/encoder/defaultEncoder.cpp', 'utility/encoder/defaultEncoder.hpp', + 'utility/encoder/noopEncoder.cpp', 'utility/encoder/noopEncoder.hpp', 'utility/encoder/encoderFactory.cpp', 'utility/encoder/encoderFactory.hpp', 'utility/encoder/qpEncoder.cpp', 'utility/encoder/qpEncoder.hpp', 'utility/encoder/uuEncoder.cpp', 'utility/encoder/uuEncoder.hpp', diff --git a/src/utility/encoder/defaultEncoder.cpp b/src/utility/encoder/noopEncoder.cpp similarity index 80% rename from src/utility/encoder/defaultEncoder.cpp rename to src/utility/encoder/noopEncoder.cpp index 95e531cd..cf72a4f6 100644 --- a/src/utility/encoder/defaultEncoder.cpp +++ b/src/utility/encoder/noopEncoder.cpp @@ -21,7 +21,7 @@ // the GNU General Public License cover the whole combination. // -#include "vmime/utility/encoder/defaultEncoder.hpp" +#include "vmime/utility/encoder/noopEncoder.hpp" #include "vmime/utility/streamUtils.hpp" @@ -31,12 +31,12 @@ namespace utility { namespace encoder { -defaultEncoder::defaultEncoder() +noopEncoder::noopEncoder() { } -utility::stream::size_type defaultEncoder::encode(utility::inputStream& in, +utility::stream::size_type noopEncoder::encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress) { in.reset(); // may not work... @@ -53,7 +53,7 @@ utility::stream::size_type defaultEncoder::encode(utility::inputStream& in, } -utility::stream::size_type defaultEncoder::decode(utility::inputStream& in, +utility::stream::size_type noopEncoder::decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress) { in.reset(); // may not work... @@ -70,13 +70,13 @@ utility::stream::size_type defaultEncoder::decode(utility::inputStream& in, } -utility::stream::size_type defaultEncoder::getEncodedSize(const utility::stream::size_type n) const +utility::stream::size_type noopEncoder::getEncodedSize(const utility::stream::size_type n) const { return n; } -utility::stream::size_type defaultEncoder::getDecodedSize(const utility::stream::size_type n) const +utility::stream::size_type noopEncoder::getDecodedSize(const utility::stream::size_type n) const { return n; } diff --git a/vmime/utility/encoder/binaryEncoder.hpp b/vmime/utility/encoder/binaryEncoder.hpp index 8d032a25..1c831939 100644 --- a/vmime/utility/encoder/binaryEncoder.hpp +++ b/vmime/utility/encoder/binaryEncoder.hpp @@ -25,7 +25,7 @@ #define VMIME_UTILITY_ENCODER_BINARYENCODER_HPP_INCLUDED -#include "vmime/utility/encoder/defaultEncoder.hpp" +#include "vmime/utility/encoder/noopEncoder.hpp" namespace vmime { @@ -36,7 +36,7 @@ namespace encoder { /** Binary encoder. */ -class VMIME_EXPORT binaryEncoder : public defaultEncoder +class VMIME_EXPORT binaryEncoder : public noopEncoder { public: diff --git a/vmime/utility/encoder/eightBitEncoder.hpp b/vmime/utility/encoder/eightBitEncoder.hpp index f9de5217..ee50ca95 100644 --- a/vmime/utility/encoder/eightBitEncoder.hpp +++ b/vmime/utility/encoder/eightBitEncoder.hpp @@ -25,7 +25,7 @@ #define VMIME_UTILITY_ENCODER_EIGHTBITENCODER_HPP_INCLUDED -#include "vmime/utility/encoder/defaultEncoder.hpp" +#include "vmime/utility/encoder/noopEncoder.hpp" namespace vmime { @@ -36,7 +36,7 @@ namespace encoder { /** 8-bit encoder. */ -class VMIME_EXPORT eightBitEncoder : public defaultEncoder +class VMIME_EXPORT eightBitEncoder : public noopEncoder { public: diff --git a/vmime/utility/encoder/defaultEncoder.hpp b/vmime/utility/encoder/noopEncoder.hpp similarity index 84% rename from vmime/utility/encoder/defaultEncoder.hpp rename to vmime/utility/encoder/noopEncoder.hpp index 3f7d9111..7e18e3f9 100644 --- a/vmime/utility/encoder/defaultEncoder.hpp +++ b/vmime/utility/encoder/noopEncoder.hpp @@ -21,8 +21,8 @@ // the GNU General Public License cover the whole combination. // -#ifndef VMIME_UTILITY_ENCODER_DEFAULTENCODER_HPP_INCLUDED -#define VMIME_UTILITY_ENCODER_DEFAULTENCODER_HPP_INCLUDED +#ifndef VMIME_UTILITY_ENCODER_NOOPENCODER_HPP_INCLUDED +#define VMIME_UTILITY_ENCODER_NOOPENCODER_HPP_INCLUDED #include "vmime/utility/encoder/encoder.hpp" @@ -33,14 +33,14 @@ namespace utility { namespace encoder { -/** Default encoder (simple copy, no encoding/decoding is performed). +/** Default, no-op encoder (simple copy, no encoding/decoding is performed). */ -class VMIME_EXPORT defaultEncoder : public encoder +class VMIME_EXPORT noopEncoder : public encoder { public: - defaultEncoder(); + noopEncoder(); utility::stream::size_type encode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); utility::stream::size_type decode(utility::inputStream& in, utility::outputStream& out, utility::progressListener* progress = NULL); @@ -55,4 +55,4 @@ public: } // vmime -#endif // VMIME_UTILITY_ENCODER_DEFAULTENCODER_HPP_INCLUDED +#endif // VMIME_UTILITY_ENCODER_NOOPENCODER_HPP_INCLUDED diff --git a/vmime/utility/encoder/sevenBitEncoder.hpp b/vmime/utility/encoder/sevenBitEncoder.hpp index 9f1660d1..d260cc7b 100644 --- a/vmime/utility/encoder/sevenBitEncoder.hpp +++ b/vmime/utility/encoder/sevenBitEncoder.hpp @@ -25,7 +25,7 @@ #define VMIME_UTILITY_ENCODER_SEVENBITENCODER_HPP_INCLUDED -#include "vmime/utility/encoder/defaultEncoder.hpp" +#include "vmime/utility/encoder/noopEncoder.hpp" namespace vmime { @@ -36,7 +36,7 @@ namespace encoder { /** 7-bit encoder. */ -class VMIME_EXPORT sevenBitEncoder : public defaultEncoder +class VMIME_EXPORT sevenBitEncoder : public noopEncoder { public: