Some more class documentation.

This commit is contained in:
Vincent Richard 2004-12-22 14:55:43 +00:00
parent 8d19078b26
commit 4f9e439eec
27 changed files with 392 additions and 229 deletions

View File

@ -34,6 +34,9 @@ namespace vmime
{
/** Base class for all types of attachment.
*/
class attachment
{
friend class messageBuilder;

View File

@ -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

View File

@ -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
}

View File

@ -29,6 +29,9 @@ namespace vmime
{
/** Default implementation for attachments.
*/
class defaultAttachment : public attachment
{
protected:

View File

@ -30,6 +30,9 @@ namespace vmime
{
/** Encode/decode data in different encodings.
*/
class encoder
{
public:

View File

@ -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)
{

View File

@ -30,6 +30,9 @@ namespace vmime
{
/** Base class for VMime exceptions.
*/
class exception
{
private:

View File

@ -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;

View File

@ -79,6 +79,9 @@ private:
};
/** Generic implementation for headerField with a value of type 'string'.
*/
template <>
class genericField <string> : public genericField <typeAdapter <string> >
{

View File

@ -79,6 +79,9 @@ private:
};
/** Generic implementation for parameter of type 'string'.
*/
template <>
class genericParameter <string> : public genericParameter <typeAdapter <string> >
{

View File

@ -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>

View File

@ -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
{

View File

@ -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
//

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -30,6 +30,9 @@ namespace vmime {
namespace messaging {
/** Stores information about a messaging service.
*/
class serviceInfos
{
friend class serviceFactory;

View File

@ -28,6 +28,9 @@ namespace vmime {
namespace messaging {
/** Basic implementation for an authenticator.
*/
class simpleAuthenticator : public authenticator
{
public:

View File

@ -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:

View File

@ -54,6 +54,9 @@ public:
};
/** A class to create 'timeoutHandler' objects.
*/
class timeoutHandlerFactory
{
public:

View File

@ -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>

View File

@ -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:

View File

@ -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:

View File

@ -30,6 +30,9 @@ namespace vmime
{
/** An adapter to allow any type being treated as a 'component'.
*/
template <class TYPE>
class typeAdapter : public component
{

View File

@ -198,7 +198,7 @@ public:
};
/** Constructs file objects.
/** Constructs 'file' objects.
*/
class fileSystemFactory

View File

@ -344,7 +344,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = ./src/ ./src/messaging/ ./src/utility/
INPUT = ./src/ ./src/messaging/ ./src/utility/ ./src/platforms/posix/
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
@ -376,7 +376,7 @@ EXCLUDE_SYMLINKS = NO
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
# certain files from those directories.
EXCLUDE_PATTERNS = */config.hpp */IMAPTag* */IMAPParser* */IMAPUtils* */IMAPConnection* */md5* */smartPtr* */authHelper.*
EXCLUDE_PATTERNS = */config.hpp */IMAPTag* */IMAPParser* */IMAPUtils* */IMAPConnection* */md5* */smartPtr* */authHelper* */maildirUtils*
# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
@ -842,7 +842,7 @@ INCLUDE_FILE_PATTERNS =
# or name=definition (no spaces). If the definition and the = are
# omitted =1 is assumed.
PREDEFINED =
PREDEFINED = VMIME_BUILDING_DOC
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.