diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/attachment.hpp | 3 | ||||
-rw-r--r-- | src/base.cpp | 4 | ||||
-rw-r--r-- | src/charset.cpp | 4 | ||||
-rw-r--r-- | src/defaultAttachment.hpp | 3 | ||||
-rw-r--r-- | src/encoder.hpp | 3 | ||||
-rw-r--r-- | src/encoderQP.cpp | 4 | ||||
-rw-r--r-- | src/exception.hpp | 3 | ||||
-rw-r--r-- | src/fileAttachment.hpp | 82 | ||||
-rw-r--r-- | src/genericField.hpp | 3 | ||||
-rw-r--r-- | src/genericParameter.hpp | 3 | ||||
-rw-r--r-- | src/headerFieldFactory.hpp | 2 | ||||
-rw-r--r-- | src/messageParser.cpp | 4 | ||||
-rw-r--r-- | src/messaging/IMAPMessage.cpp | 4 | ||||
-rw-r--r-- | src/messaging/builtinServices.inl | 5 | ||||
-rw-r--r-- | src/messaging/defaultAuthenticator.hpp | 6 | ||||
-rw-r--r-- | src/messaging/events.hpp | 34 | ||||
-rw-r--r-- | src/messaging/service.hpp | 5 | ||||
-rw-r--r-- | src/messaging/serviceInfos.hpp | 3 | ||||
-rw-r--r-- | src/messaging/simpleAuthenticator.hpp | 3 | ||||
-rw-r--r-- | src/messaging/socket.hpp | 6 | ||||
-rw-r--r-- | src/messaging/timeoutHandler.hpp | 3 | ||||
-rw-r--r-- | src/parameterFactory.hpp | 2 | ||||
-rw-r--r-- | src/platformDependant.hpp | 7 | ||||
-rw-r--r-- | src/textPartFactory.hpp | 2 | ||||
-rw-r--r-- | src/typeAdapter.hpp | 3 | ||||
-rw-r--r-- | src/utility/file.hpp | 2 |
26 files changed, 183 insertions, 20 deletions
diff --git a/src/attachment.hpp b/src/attachment.hpp index 7110d98e..2b4ad6e9 100644 --- a/src/attachment.hpp +++ b/src/attachment.hpp @@ -34,6 +34,9 @@ namespace vmime { +/** Base class for all types of attachment. + */ + class attachment { friend class messageBuilder; diff --git a/src/base.cpp b/src/base.cpp index 0e3fbc76..b6d752d3 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -98,6 +98,8 @@ namespace lineLengthLimits +#ifndef VMIME_BUILDING_DOC + // // V-Mime Initializer // ==================== @@ -133,5 +135,7 @@ public: initializer theInitializer; +#endif // VMIME_BUILDING_DOC + } // vmime diff --git a/src/charset.cpp b/src/charset.cpp index 793ea1f7..0ec050a8 100644 --- a/src/charset.cpp +++ b/src/charset.cpp @@ -28,6 +28,8 @@ extern "C" { #include <iconv.h> +#ifndef VMIME_BUILDING_DOC + // HACK: prototypes may differ depending on the compiler and/or system (the // second parameter may or may not be 'const'). This redeclaration is a hack // to have a common prototype "iconv_cast". @@ -35,6 +37,8 @@ extern "C" size_t *inbytesleft, char* * outbuf, size_t *outbytesleft); #define iconv_const ((iconv_const_hack) iconv) + +#endif // VMIME_BUILDING_DOC } diff --git a/src/defaultAttachment.hpp b/src/defaultAttachment.hpp index c9198598..0fe21092 100644 --- a/src/defaultAttachment.hpp +++ b/src/defaultAttachment.hpp @@ -29,6 +29,9 @@ namespace vmime { +/** Default implementation for attachments. + */ + class defaultAttachment : public attachment { protected: diff --git a/src/encoder.hpp b/src/encoder.hpp index 2103d896..3d2f7159 100644 --- a/src/encoder.hpp +++ b/src/encoder.hpp @@ -30,6 +30,9 @@ namespace vmime { +/** Encode/decode data in different encodings. + */ + class encoder { public: diff --git a/src/encoderQP.cpp b/src/encoderQP.cpp index 5b019319..d37ac351 100644 --- a/src/encoderQP.cpp +++ b/src/encoderQP.cpp @@ -71,6 +71,8 @@ const unsigned char encoderQP::sm_hexDecodeTable[256] = }; +#ifndef VMIME_BUILDING_DOC + #define QP_ENCODE_HEX(x) \ outBuffer[outBufferPos] = '='; \ outBuffer[outBufferPos + 1] = sm_hexDigits[x >> 4]; \ @@ -78,6 +80,8 @@ const unsigned char encoderQP::sm_hexDecodeTable[256] = outBufferPos += 3; \ curCol += 3; +#endif // VMIME_BUILDING_DOC + const utility::stream::size_type encoderQP::encode(utility::inputStream& in, utility::outputStream& out) { diff --git a/src/exception.hpp b/src/exception.hpp index 6a043c43..4ed40485 100644 --- a/src/exception.hpp +++ b/src/exception.hpp @@ -30,6 +30,9 @@ namespace vmime { +/** Base class for VMime exceptions. + */ + class exception { private: diff --git a/src/fileAttachment.hpp b/src/fileAttachment.hpp index d25af394..f38b6d79 100644 --- a/src/fileAttachment.hpp +++ b/src/fileAttachment.hpp @@ -28,6 +28,9 @@ namespace vmime { +/** Attachment of type 'file'. + */ + class fileAttachment : public defaultAttachment { public: @@ -35,6 +38,8 @@ public: fileAttachment(const string& filename, const mediaType& type, const text& desc = NULL_TEXT); fileAttachment(const string& filename, const mediaType& type, const encoding& enc, const text& desc = NULL_TEXT); + /** Stores information about a file attachment. + */ class fileInfo { public: @@ -42,27 +47,102 @@ public: fileInfo(); ~fileInfo(); + /** Check whether the 'filename' property is present. + * + * @return true if the 'filename' property is set, + * false otherwise + */ const bool hasFilename() const; + + /** Return the value of the 'filename' property. + * + * @return file name + */ const string& getFilename() const; + + /** Set the value of the 'filename' property. + * + * @param name file name + */ void setFilename(const string& name); + /** Check whether the 'creation-date' property is present. + * + * @return true if the 'creation-date' property is set, + * false otherwise + */ const bool hasCreationDate() const; + + /** Return the value of the 'creation-date' property. + * + * @return file creation time + */ const datetime& getCreationDate() const; + + /** Set the value of the 'creation-date' property. + * + * @param date file creation time + */ void setCreationDate(const datetime& date); + /** Check whether the 'modification-date' property is present. + * + * @return true if the 'modification-date' property is set, + * false otherwise + */ const bool hasModificationDate() const; + + /** Return the value of the 'modification-date' property. + * + * @return file modification time + */ const datetime& getModificationDate() const; + + /** Set the value of the 'modification-date' property. + * + * @param date file modification time + */ void setModificationDate(const datetime& date); + /** Check whether the 'read-date' property is set. + * + * @return true if the 'read-date' property is set, + * false otherwise + */ const bool hasReadDate() const; + + /** Return the value of the 'read-date' property. + * + * @return file access time + */ const datetime& getReadDate() const; + + /** Set the value of the 'read-date' property. + * + * @param date file access time + */ void setReadDate(const datetime& date); + /** Check whether the value of the 'size' property is set. + * + * @return true if the 'size' property is set, + * false otherwise + */ const bool hasSize() const; + + /** Return the value of the 'size' property. + * + * @return file size + */ const unsigned int getSize() const; + + /** Set the value of the 'size' property. + * + * @param size file size + */ void setSize(const unsigned int& size); - protected: + private: string* m_filename; unsigned int* m_size; diff --git a/src/genericField.hpp b/src/genericField.hpp index e83f25f2..b212fdbc 100644 --- a/src/genericField.hpp +++ b/src/genericField.hpp @@ -79,6 +79,9 @@ private: }; +/** Generic implementation for headerField with a value of type 'string'. + */ + template <> class genericField <string> : public genericField <typeAdapter <string> > { diff --git a/src/genericParameter.hpp b/src/genericParameter.hpp index abd01ccf..fa335240 100644 --- a/src/genericParameter.hpp +++ b/src/genericParameter.hpp @@ -79,6 +79,9 @@ private: }; +/** Generic implementation for parameter of type 'string'. + */ + template <> class genericParameter <string> : public genericParameter <typeAdapter <string> > { diff --git a/src/headerFieldFactory.hpp b/src/headerFieldFactory.hpp index 5471eb69..7090546d 100644 --- a/src/headerFieldFactory.hpp +++ b/src/headerFieldFactory.hpp @@ -46,6 +46,7 @@ protected: public: +#ifndef VMIME_BUILDING_DOC template <class TYPE> class registerer { @@ -57,6 +58,7 @@ public: return new TYPE(); } }; +#endif // VMIME_BUILDING_DOC template <class T> diff --git a/src/messageParser.cpp b/src/messageParser.cpp index dd2cb690..d5338dc6 100644 --- a/src/messageParser.cpp +++ b/src/messageParser.cpp @@ -58,6 +58,8 @@ messageParser::~messageParser() void messageParser::parse(const message& msg) { // Header fields (if field is present, copy its value, else do nothing) +#ifndef VMIME_BUILDING_DOC + #define TRY_FIELD(var, type, name) \ try { var = dynamic_cast<type&>(*msg.getHeader()->findField(name)).getValue(); } \ catch (exceptions::no_such_field) { } @@ -72,6 +74,8 @@ void messageParser::parse(const message& msg) #undef TRY_FIELD +#endif // VMIME_BUILDING_DOC + // Date try { diff --git a/src/messaging/IMAPMessage.cpp b/src/messaging/IMAPMessage.cpp index 36f51257..fc19d248 100644 --- a/src/messaging/IMAPMessage.cpp +++ b/src/messaging/IMAPMessage.cpp @@ -232,6 +232,8 @@ class structure& IMAPpart::getStructure() +#ifndef VMIME_BUILDING_DOC + // // IMAPMessage_literalHandler // @@ -268,6 +270,8 @@ private: progressionListener* m_progress; }; +#endif // VMIME_BUILDING_DOC + // diff --git a/src/messaging/builtinServices.inl b/src/messaging/builtinServices.inl index f1934ff9..77809234 100644 --- a/src/messaging/builtinServices.inl +++ b/src/messaging/builtinServices.inl @@ -17,6 +17,9 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // +#ifndef VMIME_BUILDING_DOC + + #define REGISTER_SERVICE(p_class, p_name) \ vmime::messaging::service::initializer <vmime::messaging::p_class> p_name(#p_name) @@ -44,3 +47,5 @@ REGISTER_SERVICE(maildirStore, maildir); #endif + +#endif // VMIME_BUILDING_DOC diff --git a/src/messaging/defaultAuthenticator.hpp b/src/messaging/defaultAuthenticator.hpp index 9480ec56..dcd0f297 100644 --- a/src/messaging/defaultAuthenticator.hpp +++ b/src/messaging/defaultAuthenticator.hpp @@ -29,8 +29,10 @@ namespace vmime { namespace messaging { -/** An auhenticator that simply returns the credentials set in the - * session properties (named 'username' and 'password'). +/** Default implementation for authenticator. It simply returns + * the credentials set in the session properties (named 'username' + * and 'password'). This is the default implementation used if + * you do not write your own authenticator object. */ class defaultAuthenticator : public authenticator diff --git a/src/messaging/events.hpp b/src/messaging/events.hpp index d51ca2d0..f2ab9e29 100644 --- a/src/messaging/events.hpp +++ b/src/messaging/events.hpp @@ -34,9 +34,8 @@ class folder; namespace events { -// -// messageCountEvent -// +/** Event about the message count in a folder. + */ class messageCountEvent { @@ -44,8 +43,8 @@ public: enum Types { - TYPE_ADDED, // new messages - TYPE_REMOVED // expunged messages: renumbering + TYPE_ADDED, /**< New messages have been added. */ + TYPE_REMOVED /**< Messages have been expunged (renumbering). */ }; @@ -65,6 +64,9 @@ private: }; +/** Listener for events about the message count in a folder. + */ + class messageCountListener { protected: @@ -78,9 +80,8 @@ public: }; -// -// messageChangedEvent -// +/** Event occuring on a message. + */ class messageChangedEvent { @@ -108,6 +109,9 @@ private: }; +/** Listener for events occuring on a message. + */ + class messageChangedListener { protected: @@ -120,9 +124,8 @@ public: }; -// -// folderEvent -// +/** Event occuring on a folder. + */ class folderEvent { @@ -130,9 +133,9 @@ public: enum Types { - TYPE_CREATED, // a folder was created - TYPE_DELETED, // a folder was deleted - TYPE_RENAMED // a folder was renamed + TYPE_CREATED, /**< A folder was created. */ + TYPE_DELETED, /**< A folder was deleted. */ + TYPE_RENAMED /**< A folder was renamed. */ }; @@ -152,6 +155,9 @@ private: }; +/** Listener for events occuring on a folder. + */ + class folderListener { protected: diff --git a/src/messaging/service.hpp b/src/messaging/service.hpp index cfab3611..e6aa372c 100644 --- a/src/messaging/service.hpp +++ b/src/messaging/service.hpp @@ -35,6 +35,9 @@ namespace vmime { namespace messaging { +/** Base class for messaging services. + */ + class service { protected: @@ -114,6 +117,7 @@ public: */ authenticator* getAuthenticator(); +#ifndef VMIME_BUILDING_DOC // Basic service registerer template <class S> class initializer @@ -126,6 +130,7 @@ public: template registerServiceByProtocol <S>(protocol); } }; +#endif // VMIME_BUILDING_DOC private: diff --git a/src/messaging/serviceInfos.hpp b/src/messaging/serviceInfos.hpp index 3215ab7d..d9ba7510 100644 --- a/src/messaging/serviceInfos.hpp +++ b/src/messaging/serviceInfos.hpp @@ -30,6 +30,9 @@ namespace vmime { namespace messaging { +/** Stores information about a messaging service. + */ + class serviceInfos { friend class serviceFactory; diff --git a/src/messaging/simpleAuthenticator.hpp b/src/messaging/simpleAuthenticator.hpp index 4fbbbf0a..8789c40a 100644 --- a/src/messaging/simpleAuthenticator.hpp +++ b/src/messaging/simpleAuthenticator.hpp @@ -28,6 +28,9 @@ namespace vmime { namespace messaging { +/** Basic implementation for an authenticator. + */ + class simpleAuthenticator : public authenticator { public: diff --git a/src/messaging/socket.hpp b/src/messaging/socket.hpp index 4cf69536..257a459c 100644 --- a/src/messaging/socket.hpp +++ b/src/messaging/socket.hpp @@ -28,6 +28,9 @@ namespace vmime { namespace messaging { +/** Interface for connecting to servers. + */ + class socket { public: @@ -81,6 +84,9 @@ public: }; +/** A class to create 'socket' objects. + */ + class socketFactory { public: diff --git a/src/messaging/timeoutHandler.hpp b/src/messaging/timeoutHandler.hpp index a7675b79..1d366084 100644 --- a/src/messaging/timeoutHandler.hpp +++ b/src/messaging/timeoutHandler.hpp @@ -54,6 +54,9 @@ public: }; +/** A class to create 'timeoutHandler' objects. + */ + class timeoutHandlerFactory { public: diff --git a/src/parameterFactory.hpp b/src/parameterFactory.hpp index 6a634717..9cda9128 100644 --- a/src/parameterFactory.hpp +++ b/src/parameterFactory.hpp @@ -46,6 +46,7 @@ protected: public: +#ifndef VMIME_BUILDING_DOC template <class TYPE> class registerer { @@ -57,6 +58,7 @@ public: return new TYPE(); } }; +#endif // VMIME_BUILDING_DOC template <class T> diff --git a/src/platformDependant.hpp b/src/platformDependant.hpp index 920e970b..660d54b3 100644 --- a/src/platformDependant.hpp +++ b/src/platformDependant.hpp @@ -40,14 +40,17 @@ namespace vmime { -/** The link between your application and VMime. It offers an interface to - * access platform-dependant objects: sockets, date/time, file system, etc. +/** Allow setting or getting the current platform handler. */ class platformDependant { public: + /** Handles all platform-dependant operations. It offers an interface to + * access platform-dependant objects: sockets, date/time, file system, etc. + */ + class handler { public: diff --git a/src/textPartFactory.hpp b/src/textPartFactory.hpp index d55d9dd5..2193f843 100644 --- a/src/textPartFactory.hpp +++ b/src/textPartFactory.hpp @@ -44,6 +44,7 @@ protected: NameMap m_nameMap; +#ifndef VMIME_BUILDING_DOC template <class TYPE> class registerer { @@ -55,6 +56,7 @@ protected: return new TYPE(); } }; +#endif // VMIME_BUILDING_DOC public: diff --git a/src/typeAdapter.hpp b/src/typeAdapter.hpp index 7ae04a6b..cd82816c 100644 --- a/src/typeAdapter.hpp +++ b/src/typeAdapter.hpp @@ -30,6 +30,9 @@ namespace vmime { +/** An adapter to allow any type being treated as a 'component'. + */ + template <class TYPE> class typeAdapter : public component { diff --git a/src/utility/file.hpp b/src/utility/file.hpp index 5ad9aef5..73ffd964 100644 --- a/src/utility/file.hpp +++ b/src/utility/file.hpp @@ -198,7 +198,7 @@ public: }; -/** Constructs file objects. +/** Constructs 'file' objects. */ class fileSystemFactory |