aboutsummaryrefslogtreecommitdiffstats
path: root/vmime
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vmime/encoding.hpp5
-rw-r--r--vmime/net/imap/IMAPParser.hpp10
-rw-r--r--vmime/utility/encoder/b64Encoder.hpp (renamed from vmime/encoderB64.hpp)19
-rw-r--r--vmime/utility/encoder/binaryEncoder.hpp (renamed from vmime/encoderBinary.hpp)19
-rw-r--r--vmime/utility/encoder/defaultEncoder.hpp (renamed from vmime/encoderDefault.hpp)19
-rw-r--r--vmime/utility/encoder/eightBitEncoder.hpp (renamed from vmime/encoder8bit.hpp)19
-rw-r--r--vmime/utility/encoder/encoder.hpp (renamed from vmime/encoder.hpp)13
-rw-r--r--vmime/utility/encoder/encoderFactory.hpp (renamed from vmime/encoderFactory.hpp)15
-rw-r--r--vmime/utility/encoder/qpEncoder.hpp (renamed from vmime/encoderQP.hpp)19
-rw-r--r--vmime/utility/encoder/sevenBitEncoder.hpp (renamed from vmime/encoder7bit.hpp)19
-rw-r--r--vmime/utility/encoder/uuEncoder.hpp (renamed from vmime/encoderUUE.hpp)19
-rw-r--r--vmime/vmime.hpp2
-rw-r--r--vmime/wordEncoder.hpp8
13 files changed, 110 insertions, 76 deletions
diff --git a/vmime/encoding.hpp b/vmime/encoding.hpp
index fa5cc183..aa998539 100644
--- a/vmime/encoding.hpp
+++ b/vmime/encoding.hpp
@@ -27,7 +27,8 @@
#include "vmime/base.hpp"
#include "vmime/headerFieldValue.hpp"
-#include "vmime/encoder.hpp"
+
+#include "vmime/utility/encoder/encoder.hpp"
namespace vmime
@@ -99,7 +100,7 @@ public:
* is registered for the encoding
* @return a new encoder object for the encoding type
*/
- ref <encoder> getEncoder() const;
+ ref <utility::encoder::encoder> getEncoder() const;
private:
diff --git a/vmime/net/imap/IMAPParser.hpp b/vmime/net/imap/IMAPParser.hpp
index c6e1831d..b3079570 100644
--- a/vmime/net/imap/IMAPParser.hpp
+++ b/vmime/net/imap/IMAPParser.hpp
@@ -34,8 +34,8 @@
#include "vmime/utility/stringUtils.hpp"
#include "vmime/utility/progressListener.hpp"
-#include "vmime/encoderB64.hpp"
-#include "vmime/encoderQP.hpp"
+#include "vmime/utility/encoder/b64Encoder.hpp"
+#include "vmime/utility/encoder/qpEncoder.hpp"
#include "vmime/platform.hpp"
@@ -1233,18 +1233,18 @@ public:
delete (theCharset);
// Decode text
- encoder* theEncoder = NULL;
+ utility::encoder::encoder* theEncoder = NULL;
if (theEncoding->value()[0] == 'q' || theEncoding->value()[0] == 'Q')
{
// Quoted-printable
- theEncoder = new encoderQP;
+ theEncoder = new utility::encoder::qpEncoder();
theEncoder->getProperties()["rfc2047"] = true;
}
else if (theEncoding->value()[0] == 'b' || theEncoding->value()[0] == 'B')
{
// Base64
- theEncoder = new encoderB64;
+ theEncoder = new utility::encoder::b64Encoder();
}
if (theEncoder)
diff --git a/vmime/encoderB64.hpp b/vmime/utility/encoder/b64Encoder.hpp
index 46444a53..831e9f6f 100644
--- a/vmime/encoderB64.hpp
+++ b/vmime/utility/encoder/b64Encoder.hpp
@@ -21,25 +21,26 @@
// the GNU General Public License cover the whole combination.
//
-#ifndef VMIME_ENCODERB64_HPP_INCLUDED
-#define VMIME_ENCODERB64_HPP_INCLUDED
+#ifndef VMIME_UTILITY_ENCODER_B64ENCODER_HPP_INCLUDED
+#define VMIME_UTILITY_ENCODER_B64ENCODER_HPP_INCLUDED
-#include "vmime/encoder.hpp"
+#include "vmime/utility/encoder/encoder.hpp"
-namespace vmime
-{
+namespace vmime {
+namespace utility {
+namespace encoder {
/** Base64 encoder.
*/
-class encoderB64 : public encoder
+class b64Encoder : public encoder
{
public:
- encoderB64();
+ b64Encoder();
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);
@@ -53,7 +54,9 @@ protected:
};
+} // encoder
+} // utility
} // vmime
-#endif // VMIME_ENCODERB64_HPP_INCLUDED
+#endif // VMIME_UTILITY_ENCODER_B64ENCODER_HPP_INCLUDED
diff --git a/vmime/encoderBinary.hpp b/vmime/utility/encoder/binaryEncoder.hpp
index 4708c791..783f8312 100644
--- a/vmime/encoderBinary.hpp
+++ b/vmime/utility/encoder/binaryEncoder.hpp
@@ -21,29 +21,32 @@
// the GNU General Public License cover the whole combination.
//
-#ifndef VMIME_ENCODERBINARY_HPP_INCLUDED
-#define VMIME_ENCODERBINARY_HPP_INCLUDED
+#ifndef VMIME_UTILITY_ENCODER_BINARYENCODER_HPP_INCLUDED
+#define VMIME_UTILITY_ENCODER_BINARYENCODER_HPP_INCLUDED
-#include "vmime/encoderDefault.hpp"
+#include "vmime/utility/encoder/defaultEncoder.hpp"
-namespace vmime
-{
+namespace vmime {
+namespace utility {
+namespace encoder {
/** Binary encoder.
*/
-class encoderBinary : public encoderDefault
+class binaryEncoder : public defaultEncoder
{
public:
- encoderBinary();
+ binaryEncoder();
};
+} // encoder
+} // utility
} // vmime
-#endif // VMIME_ENCODERBINARY_HPP_INCLUDED
+#endif // VMIME_UTILITY_ENCODER_BINARYENCODER_HPP_INCLUDED
diff --git a/vmime/encoderDefault.hpp b/vmime/utility/encoder/defaultEncoder.hpp
index 71dc9e9f..3ddad1fb 100644
--- a/vmime/encoderDefault.hpp
+++ b/vmime/utility/encoder/defaultEncoder.hpp
@@ -21,32 +21,35 @@
// the GNU General Public License cover the whole combination.
//
-#ifndef VMIME_ENCODERDEFAULT_HPP_INCLUDED
-#define VMIME_ENCODERDEFAULT_HPP_INCLUDED
+#ifndef VMIME_UTILITY_ENCODER_DEFAULTENCODER_HPP_INCLUDED
+#define VMIME_UTILITY_ENCODER_DEFAULTENCODER_HPP_INCLUDED
-#include "vmime/encoder.hpp"
+#include "vmime/utility/encoder/encoder.hpp"
-namespace vmime
-{
+namespace vmime {
+namespace utility {
+namespace encoder {
/** Default encoder (simple copy, no encoding/decoding is performed).
*/
-class encoderDefault : public encoder
+class defaultEncoder : public encoder
{
public:
- encoderDefault();
+ defaultEncoder();
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);
};
+} // encoder
+} // utility
} // vmime
-#endif // VMIME_ENCODERDEFAUL_HPP_INCLUDED
+#endif // VMIME_UTILITY_ENCODER_DEFAULTENCODER_HPP_INCLUDED
diff --git a/vmime/encoder8bit.hpp b/vmime/utility/encoder/eightBitEncoder.hpp
index 67722b06..2e9b1381 100644
--- a/vmime/encoder8bit.hpp
+++ b/vmime/utility/encoder/eightBitEncoder.hpp
@@ -21,29 +21,32 @@
// the GNU General Public License cover the whole combination.
//
-#ifndef VMIME_ENCODER8BIT_HPP_INCLUDED
-#define VMIME_ENCODER8BIT_HPP_INCLUDED
+#ifndef VMIME_UTILITY_ENCODER_EIGHTBITENCODER_HPP_INCLUDED
+#define VMIME_UTILITY_ENCODER_EIGHTBITENCODER_HPP_INCLUDED
-#include "vmime/encoderDefault.hpp"
+#include "vmime/utility/encoder/defaultEncoder.hpp"
-namespace vmime
-{
+namespace vmime {
+namespace utility {
+namespace encoder {
/** 8-bit encoder.
*/
-class encoder8bit : public encoderDefault
+class eightBitEncoder : public defaultEncoder
{
public:
- encoder8bit();
+ eightBitEncoder();
};
+} // encoder
+} // utility
} // vmime
-#endif // VMIME_ENCODER8BIT_HPP_INCLUDED
+#endif // VMIME_UTILITY_ENCODER_EIGHTBITENCODER_HPP_INCLUDED
diff --git a/vmime/encoder.hpp b/vmime/utility/encoder/encoder.hpp
index cb5de063..eec00035 100644
--- a/vmime/encoder.hpp
+++ b/vmime/utility/encoder/encoder.hpp
@@ -21,8 +21,8 @@
// the GNU General Public License cover the whole combination.
//
-#ifndef VMIME_ENCODER_HPP_INCLUDED
-#define VMIME_ENCODER_HPP_INCLUDED
+#ifndef VMIME_UTILITY_ENCODER_ENCODER_HPP_INCLUDED
+#define VMIME_UTILITY_ENCODER_ENCODER_HPP_INCLUDED
#include "vmime/base.hpp"
@@ -31,8 +31,9 @@
#include "vmime/utility/progressListener.hpp"
-namespace vmime
-{
+namespace vmime {
+namespace utility {
+namespace encoder {
/** Encode/decode data in different encodings.
@@ -101,7 +102,9 @@ private:
};
+} // encoder
+} // utility
} // vmime
-#endif // VMIME_ENCODER_HPP_INCLUDED
+#endif // VMIME_UTILITY_ENCODER_ENCODER_HPP_INCLUDED
diff --git a/vmime/encoderFactory.hpp b/vmime/utility/encoder/encoderFactory.hpp
index 5358ce76..22f28f4b 100644
--- a/vmime/encoderFactory.hpp
+++ b/vmime/utility/encoder/encoderFactory.hpp
@@ -21,16 +21,17 @@
// the GNU General Public License cover the whole combination.
//
-#ifndef VMIME_ENCODERFACTORY_HPP_INCLUDED
-#define VMIME_ENCODERFACTORY_HPP_INCLUDED
+#ifndef VMIME_UTILITY_ENCODER_ENCODERFACTORY_HPP_INCLUDED
+#define VMIME_UTILITY_ENCODER_ENCODERFACTORY_HPP_INCLUDED
-#include "vmime/encoder.hpp"
+#include "vmime/utility/encoder/encoder.hpp"
#include "vmime/utility/stringUtils.hpp"
-namespace vmime
-{
+namespace vmime {
+namespace utility {
+namespace encoder {
/** A factory to create 'encoder' objects for the specified encoding.
@@ -143,7 +144,9 @@ public:
};
+} // encoder
+} // utility
} // vmime
-#endif // VMIME_ENCODERFACTORY_HPP_INCLUDED
+#endif // VMIME_UTILITY_ENCODER_ENCODERFACTORY_HPP_INCLUDED
diff --git a/vmime/encoderQP.hpp b/vmime/utility/encoder/qpEncoder.hpp
index bd604abc..6af3c901 100644
--- a/vmime/encoderQP.hpp
+++ b/vmime/utility/encoder/qpEncoder.hpp
@@ -21,25 +21,26 @@
// the GNU General Public License cover the whole combination.
//
-#ifndef VMIME_ENCODERQP_HPP_INCLUDED
-#define VMIME_ENCODERQP_HPP_INCLUDED
+#ifndef VMIME_UTILITY_ENCODER_QPENCODER_HPP_INCLUDED
+#define VMIME_UTILITY_ENCODER_QPENCODER_HPP_INCLUDED
-#include "vmime/encoder.hpp"
+#include "vmime/utility/encoder/encoder.hpp"
-namespace vmime
-{
+namespace vmime {
+namespace utility {
+namespace encoder {
/** Quoted-printable encoder.
*/
-class encoderQP : public encoder
+class qpEncoder : public encoder
{
public:
- encoderQP();
+ qpEncoder();
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);
@@ -53,7 +54,9 @@ protected:
};
+} // encoder
+} // utility
} // vmime
-#endif // VMIME_ENCODERQP_HPP_INCLUDED
+#endif // VMIME_UTILITY_ENCODER_QPENCODER_HPP_INCLUDED
diff --git a/vmime/encoder7bit.hpp b/vmime/utility/encoder/sevenBitEncoder.hpp
index 0b8fd177..98a999aa 100644
--- a/vmime/encoder7bit.hpp
+++ b/vmime/utility/encoder/sevenBitEncoder.hpp
@@ -21,29 +21,32 @@
// the GNU General Public License cover the whole combination.
//
-#ifndef VMIME_ENCODER7BIT_HPP_INCLUDED
-#define VMIME_ENCODER7BIT_HPP_INCLUDED
+#ifndef VMIME_UTILITY_ENCODER_SEVENBITENCODER_HPP_INCLUDED
+#define VMIME_UTILITY_ENCODER_SEVENBITENCODER_HPP_INCLUDED
-#include "vmime/encoderDefault.hpp"
+#include "vmime/utility/encoder/defaultEncoder.hpp"
-namespace vmime
-{
+namespace vmime {
+namespace utility {
+namespace encoder {
/** 7-bit encoder.
*/
-class encoder7bit : public encoderDefault
+class sevenBitEncoder : public defaultEncoder
{
public:
- encoder7bit();
+ sevenBitEncoder();
};
+} // encoder
+} // utility
} // vmime
-#endif // VMIME_ENCODER7BIT_HPP_INCLUDED
+#endif // VMIME_UTILITY_ENCODER_SEVENBITENCODER_HPP_INCLUDED
diff --git a/vmime/encoderUUE.hpp b/vmime/utility/encoder/uuEncoder.hpp
index bdffb101..6cb5fa1e 100644
--- a/vmime/encoderUUE.hpp
+++ b/vmime/utility/encoder/uuEncoder.hpp
@@ -21,25 +21,26 @@
// the GNU General Public License cover the whole combination.
//
-#ifndef VMIME_ENCODERUUE_HPP_INCLUDED
-#define VMIME_ENCODERUUE_HPP_INCLUDED
+#ifndef VMIME_UTILITY_ENCODER_UUENCODER_HPP_INCLUDED
+#define VMIME_UTILITY_ENCODER_UUENCODER_HPP_INCLUDED
-#include "vmime/encoder.hpp"
+#include "vmime/utility/encoder/encoder.hpp"
-namespace vmime
-{
+namespace vmime {
+namespace utility {
+namespace encoder {
/** UUEncode encoder.
*/
-class encoderUUE : public encoder
+class uuEncoder : public encoder
{
public:
- encoderUUE();
+ uuEncoder();
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);
@@ -48,7 +49,9 @@ public:
};
+} // encoder
+} // utility
} // vmime
-#endif // VMIME_ENCODERUUE_HPP_INCLUDED
+#endif // VMIME_UTILITY_ENCODER_UUENCODER_HPP_INCLUDED
diff --git a/vmime/vmime.hpp b/vmime/vmime.hpp
index f62e53db..0e54d7b7 100644
--- a/vmime/vmime.hpp
+++ b/vmime/vmime.hpp
@@ -66,7 +66,7 @@
#include "vmime/parameterizedHeaderField.hpp"
// Encoders
-#include "vmime/encoderFactory.hpp"
+#include "vmime/utility/encoder/encoderFactory.hpp"
// Message builder/parser
#include "vmime/messageBuilder.hpp"
diff --git a/vmime/wordEncoder.hpp b/vmime/wordEncoder.hpp
index 98294fa6..09c141d0 100644
--- a/vmime/wordEncoder.hpp
+++ b/vmime/wordEncoder.hpp
@@ -32,8 +32,14 @@ namespace vmime
{
+namespace utility {
+namespace encoder {
+
class encoder;
+} // encoder
+} // utility
+
/** Encodes words following RFC-2047.
*/
@@ -83,7 +89,7 @@ private:
charset m_charset;
Encoding m_encoding;
- ref <encoder> m_encoder;
+ ref <utility::encoder::encoder> m_encoder;
};