From 460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- mimelib/doc/address.html | 153 ++++++++++ mimelib/doc/addrlist.html | 214 ++++++++++++++ mimelib/doc/binhex.html | 169 +++++++++++ mimelib/doc/body.html | 308 ++++++++++++++++++++ mimelib/doc/bodypart.html | 157 ++++++++++ mimelib/doc/boyermor.html | 57 ++++ mimelib/doc/datetime.html | 340 ++++++++++++++++++++++ mimelib/doc/disptype.html | 224 +++++++++++++++ mimelib/doc/entity.html | 168 +++++++++++ mimelib/doc/field.html | 305 ++++++++++++++++++++ mimelib/doc/fieldbdy.html | 144 ++++++++++ mimelib/doc/group.html | 221 ++++++++++++++ mimelib/doc/headers.html | 512 +++++++++++++++++++++++++++++++++ mimelib/doc/mailbox.html | 238 +++++++++++++++ mimelib/doc/mboxlist.html | 232 +++++++++++++++ mimelib/doc/mechansm.html | 172 +++++++++++ mimelib/doc/mediatyp.html | 311 ++++++++++++++++++++ mimelib/doc/message.html | 136 +++++++++ mimelib/doc/mimepp.html | 80 ++++++ mimelib/doc/msgcmp.html | 298 +++++++++++++++++++ mimelib/doc/msgid.html | 198 +++++++++++++ mimelib/doc/nntp.html | 384 +++++++++++++++++++++++++ mimelib/doc/param.html | 189 ++++++++++++ mimelib/doc/pop.html | 286 ++++++++++++++++++ mimelib/doc/protocol.html | 274 ++++++++++++++++++ mimelib/doc/string.html | 717 ++++++++++++++++++++++++++++++++++++++++++++++ mimelib/doc/text.html | 149 ++++++++++ mimelib/doc/util.html | 111 +++++++ mimelib/doc/uuencode.html | 110 +++++++ 29 files changed, 6857 insertions(+) create mode 100644 mimelib/doc/address.html create mode 100644 mimelib/doc/addrlist.html create mode 100644 mimelib/doc/binhex.html create mode 100644 mimelib/doc/body.html create mode 100644 mimelib/doc/bodypart.html create mode 100644 mimelib/doc/boyermor.html create mode 100644 mimelib/doc/datetime.html create mode 100644 mimelib/doc/disptype.html create mode 100644 mimelib/doc/entity.html create mode 100644 mimelib/doc/field.html create mode 100644 mimelib/doc/fieldbdy.html create mode 100644 mimelib/doc/group.html create mode 100644 mimelib/doc/headers.html create mode 100644 mimelib/doc/mailbox.html create mode 100644 mimelib/doc/mboxlist.html create mode 100644 mimelib/doc/mechansm.html create mode 100644 mimelib/doc/mediatyp.html create mode 100644 mimelib/doc/message.html create mode 100644 mimelib/doc/mimepp.html create mode 100644 mimelib/doc/msgcmp.html create mode 100644 mimelib/doc/msgid.html create mode 100644 mimelib/doc/nntp.html create mode 100644 mimelib/doc/param.html create mode 100644 mimelib/doc/pop.html create mode 100644 mimelib/doc/protocol.html create mode 100644 mimelib/doc/string.html create mode 100644 mimelib/doc/text.html create mode 100644 mimelib/doc/util.html create mode 100644 mimelib/doc/uuencode.html (limited to 'mimelib/doc') diff --git a/mimelib/doc/address.html b/mimelib/doc/address.html new file mode 100644 index 00000000..c85046aa --- /dev/null +++ b/mimelib/doc/address.html @@ -0,0 +1,153 @@ + + + DwAddress Man Page + + +

+ NAME +

+

+DwAddress -- Abstract class representing an RFC-822 address +

+ SYNOPSIS +

+
class DW_EXPORT DwAddress : public DwFieldBody {
+
+    friend class DwAddressList;
+
+public:
+
+    virtual ~DwAddress();
+    DwBool IsMailbox() const;
+    DwBool IsGroup() const;
+    inline DwBool IsValid() const;
+    DwAddress* Next() const;
+    void SetNext(DwAddress* aAddress);
+
+protected:
+
+    DwAddress();
+    DwAddress(const DwAddress& aAddr);
+    DwAddress(const DwString& aStr, DwMessageComponent* aParent=0);
+    const DwAddress& operator = (const DwAddress& aAddr);
+    int mIsValid;
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+DwAddress represents an address as described in RFC-822. +You may not instantiate objects of type DwAddress, since +DwAddress is an abstract base class. Instead, you must +instantiate objects of type +DwMailbox or +DwGroup, which are subclasses of +DwAddress. +

+To determine the actual type of a DwAddress object, you can +use the member functions IsMailbox() and +IsGroup(). +

+If the string representation assigned to a DwAddress is +improperly formed, the parse method will fail. To determine if the parse +method failed, call the member function IsValid(). +

+A DwAddress object can be contained in list. To get the next +DwAddress object in the list, call the member function +Next() +

+ Public Member Functions +

+

+ DwBool IsMailbox() const + +

+Returns true value if this object is a DwMailbox. +

+ DwBool IsGroup() const + +

+Returns true value if this object is a DwGroup. +

+ inline DwBool IsValid() const + +

+Returns true value if the last parse was successful. Returns false if the +last parse failed (bad address) or the Parse() member function +was never called. +

+ DwAddress* Next() const +

+Returns the next DwAddress object in the list when the object +is included in a list of addresses. The function is used when iterating a +list. +

+ void SetNext(DwAddress* aAddress) + +

+Sets the next DwAddress object in the list. This member function +generally should not be used, since DwAddressList has member +functions to manage its list of DwAddress objects. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +It will also call PrintDebugInfo() for any of its child +components down to a level of aDepth. +

+This member function is available only in the debug version of the library. +

+ virtual void +CheckInvariants() const +

+Aborts if one of the invariants of the object fails. Use this member function +to track down bugs. +

+This member function is available only in the debug version of the library. +

+ Protected Member Functions +

+

+ DwAddress()
+DwAddress(const DwAddress& aAddr)
+DwAddress(const DwString& aStr, DwMessageComponent* aParent=0) +
+

+The first constructor is the default constructor, which sets the +DwAddress object's string representation to the empty string +and sets its parent to NULL. +

+The second constructor is the copy constructor, which copies the string +representation and all attributes from aAddress. The parent +of the new DwAddress object is set to +NULL. +

+The third constructor copies aStr to the +DwAddress object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwField. +

+ const DwAddress& operator = +(const DwAddress& aAddr) +

+This is the assignment operator, which performs a deep copy of +aAddr. The parent node of the DwAddress object +is not changed. +

+ diff --git a/mimelib/doc/addrlist.html b/mimelib/doc/addrlist.html new file mode 100644 index 00000000..d3a563ee --- /dev/null +++ b/mimelib/doc/addrlist.html @@ -0,0 +1,214 @@ + + + DwAddressList Man Page + + +

+ NAME +

+

+DwAddressList -- Class representing a list of RFC-822 addresses +

+ SYNOPSIS +

+
class DW_EXPORT DwAddressList : public DwFieldBody {
+
+public:
+
+    DwAddressList();
+    DwAddressList(const DwAddressList& aList);
+    DwAddressList(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwAddressList();
+    const DwAddressList& operator = (const DwAddressList& aList);
+    virtual void Parse();
+    virtual void Assemble();
+    virtual DwMessageComponent* Clone() const;
+    DwAddress* FirstAddress() const;
+    void Add(DwAddress* aAddr);
+    void Remove(DwAddress* aAddr);
+    void DeleteAll();
+    static DwAddressList* NewAddressList(const DwString& aStr,
+        DwMessageComponent* aParent);
+    static DwAddressList* (*sNewAddressList)(const DwString&,
+        DwMessageComponent*);
+
+protected:
+
+    DwAddress* mFirstAddress;
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+DwAddressList represents a list of addresses as described +in RFC-822. In MIME++, DwAddressList is a container for objects +of type DwAddress, and it contains +various member functions to manage its contained objects. +DwAddressList is also a +DwFieldBody. This reflects the +fact that certain RFC-822 header fields, such as the ``To'' header field, +have a list of addresses as their field bodies. +

+ Public Member Functions +

+

+ DwAddressList()
+DwAddressList(const DwAddressList& aList)
+DwAddressList(const DwString& aStr, DwMessageComponent* aParent=0) +
+

+The first constructor is the default constructor, which sets the +DwAddressList object's string representation to the empty +string and sets its parent to NULL. +

+The second constructor is the copy constructor, which copies the string +representation and all DwAddress objects from +aList. The parent of the new +DwAddressList object is set to NULL. +

+The third constructor copies aStr to the +DwAddressList object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwField. +

+ const DwAddressList& operator += (const DwAddressList& aList) +

+This is the assignment operator, which performs a deep copy of +aList. The parent node of the +DwAddressList object is not changed. +

+ virtual void Parse() +

+This virtual function, inherited from DwMessageComponent, +executes the parse method for DwAddressList objects. The +parse method creates or updates the broken-down representation from the string +representation. For DwAddressList objects, the parse method +parses the string representation to create a list of +DwAddress objects. This member function also calls the +Parse() member function of each DwAddress +object in its list. +

+You should call this member function after you set or modify the string +representation, and before you access any of the contained +DwAddress objects. +

+This function clears the is-modified flag. +

+ virtual void Assemble() + +

+This virtual function, inherited from DwMessageComponent, +executes the assemble method for DwAddressList objects. The +assemble method creates or updates the string representation from the broken-down +representation. That is, the assemble method builds the string representation +from its list of DwAddress objects. Before it builds the +string representation for the DwAddressList object, this +function first calls the Assemble() member function of each +DwAddress object in its list. +

+You should call this member function after you set or modify any of the contained +DwAddress objects, and before you retrieve the string +representation. +

+This function clears the is-modified flag. +

+ virtual DwMessageComponent* +Clone() const +

+This virtual function, inherited from DwMessageComponent, +creates a new DwAddressList on the free store that has the +same value as this DwAddressList object. The basic idea is +that of a virtual copy constructor. +

+ DwAddress* FirstAddress() +const +

+Gets the first DwAddress object in the list. Use the member +function DwAddress::Next() to iterate. Returns +NULL if the list is empty. +

+ void Add(DwAddress* aAddr) + +

+Adds aAddr to the end of the list of +DwAddress objects maintained by this +DwAddressList object. +

+ void Remove(DwAddress* aAddr) + +

+Removes aAddr from the list of DwAddress +objects maintained by this DwAddressList object. The +DwAddress object is not deleted by this member function. +

+ void DeleteAll() +

+Removes and deletes all DwAddress objects from the list +maintained by this DwAddressList object. +

+ static DwAddressList* +NewAddressList(const DwString& aStr, +DwMessageComponent* aParent) +

+Creates a new DwAddressList object on the free store. If +the static data member sNewAddressList is +NULL, this member function will create a new +DwAddressList and return it. Otherwise, +NewAddressList() will call the user-supplied function pointed +to by sNewAddressList, which is assumed to return an object +from a class derived from DwAddressList, and return that +object. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +It will also call PrintDebugInfo() for any of its child +components down to a level of aDepth. +

+This member function is available only in the debug version of the library. +

+ virtual void +CheckInvariants() const +

+Aborts if one of the invariants of the object fails. Use this member function +to track down bugs. +

+This member function is available only in the debug version of the library. +

+ Public Data Members +

+

+ static DwAddressList* +(*sNewAddressList)(const DwString&, +DwMessageComponent*) +

+If sNewAddressList is not NULL, it is assumed +to point to a user-supplied function that returns a pointer to an object +from a class derived from DwAddressList. +

+ Protected Data Members +

+

+ DwAddress* mFirstAddress + +

+Points to first DwMailbox object in list. +

+ diff --git a/mimelib/doc/binhex.html b/mimelib/doc/binhex.html new file mode 100644 index 00000000..6d7f7ffb --- /dev/null +++ b/mimelib/doc/binhex.html @@ -0,0 +1,169 @@ + + + DwBinhex Man Page + + +

+ NAME +

+

+DwBinhex -- Class for converting files to or from Binhex 4.0 format +

+ SYNOPSIS +

+
+class DW_EXPORT DwBinhex {
+
+public:
+
+    DwBinhex();
+    virtual ~DwBinhex();
+    void Initialize();
+    const char* FileName() const;
+    void SetFileName(const char* aName);
+    void FileType(char* aBuf) const;
+    void SetFileType(const char* aType);
+    void FileCreator(char* aBuf) const;
+    void SetFileCreator(const char* aType);
+    DwUint8 Flag1() const;
+    void SetFlag1(DwUint8 aFlag);
+    DwUint8 Flag2() const;
+    void SetFlag2(DwUint8 aFlag);
+    const DwString& DataFork() const;
+    void SetDataFork(const DwString& aStr);
+    const DwString& ResourceFork() const;
+    void SetResourceFork(const DwString& aStr);
+    const DwString& BinhexChars() const;
+    void SetBinhexChars(const DwString& aStr);
+    void Encode();
+    int Decode();
+};
+
+

+ DESCRIPTION +

+

+DwBinhex converts data to or from Binhex 4.0 format. Binhex +is a format used almost exclusively on Macintosh computers for encoding files +into text characters for transmission through the mail transport system or +for archiving on non-Macintosh systems. The format includes the file name, +file type, file creator, Macintosh Finder flags, data fork, resource fork, +and checksums. In MIME, the use of Binhex is deprecated; applesingle and +appledouble are the preferred format for encoding Macintosh files. The Binhex +4.0 format is described in RFC-1741. Binhex is a widely used, de facto +standard, but it is not an official Internet standard. +

+To use DwBinhex for converting a Macintosh file to Binex +format, call the member functions SetFileName(), +SetFileType(), SetFileCreator(), +SetFlag1(), SetFlag2(), +SetDataFork(), and SetResourceFork() to set +the elements to be encoded. Any elements that are not set by calling one +of the member functions are assigned reasonable defaults. Then call the +Encode() member function to actually perform the conversion +to Binhex. Finally, call BinhexChars() to retrieve the Binhex +characters. +

+To use DwBinhex for converting a Macintosh file from Binhex +format, call the member function SetBinhexChars() to assign +the Binhex characters to be converted. Then call Decode() +to actually perform the conversion. Finally, call +FileName(), FileType(), +FileCreator(), Flag1(), +Flag2(), DataFork(), and +ResourceFork() to extract the decoded elements. +

+Note: DwBinhex does not change the file name in any way. +When you you are dealing with file names, you should be aware of the fact +that some filenames that are valid on a Macintosh may cause problems or +unexpected results on a non-Macintosh system, and vice versa. Such problem +characters include slash ('/'), colon (':'), space and possibly other characters. +

+ Public Member Functions +

+

+ DwBinhex() +

+This is the default constructor. +

+ void Initialize() +

+Resets the object's internal state to its initial state. Call this member +function to reuse the object for more than one encode or decode operation. +

+ const char* FileName() +const
+void SetFileName(const char* aName)
+

+Gets or sets the file name. The file name is restricted to a maximum length +of 63 characters. +

+ void FileType(char* aBuf) +const
+void SetFileType(const char* aType)
+

+Gets or sets the file type. All Macintosh files have a file type, which is +represented by four bytes. Some examples include "TEXT" for a text file, +or "APPL" for an application. aBuf should point to an array +of at least four characters. +

+ void FileCreator(char* aBuf) +const
+void SetFileCreator(const char* aType) +
+

+Gets or sets the file creator. Most Macintosh files have a creator, which +is represented by a signature of four bytes. The creator specifies which +application to launch when a file's icon is double clicked. +aBuf should point to an array of at least four characters. +

+ DwUint8 Flag1() const
+void SetFlag1(DwUint8 aFlag)
+

+Gets or sets the first byte of the Macintosh Finder flags. For files that +originate on non-Macintosh systems, this byte should be set to zero (the +default). +

+ DwUint8 Flag2() const
+void SetFlag2(DwUint8 aFlag)
+

+Gets or sets the second byte of the Macintosh Finder flags. For files that +originate on non-Macintosh systems, this byte should be set to zero (the +default). +

+ const DwString& DataFork() +const
+void SetDataFork(const DwString& aStr) +
+

+Gets or sets the data fork for the file. For files that originate on +non-Macintosh systems, such as a GIF or JPEG file, the file data should be +set as the data fork. +

+ const DwString& +ResourceFork() const
+void SetResourceFork(const DwString& aStr) +
+

+Gets or sets the resource fork for the file. For files that originate on +non-Macintosh systems, such as a GIF or JPEG file, the resource should be +normally be empty. +

+ const DwString& +BinhexChars() const
+void SetBinhexChars(const DwString& aStr) +
+

+Gets or sets the characters of the Binhex encoded file. +

+ void Encode() +

+Converts the Macintosh file information to Binhex format. +

+ int Decode() +

+Converts the Macintosh file information from Binhex format. Returns zero +if the decode operation completes successufully; otherwise, the function +returns -1. +

+ diff --git a/mimelib/doc/body.html b/mimelib/doc/body.html new file mode 100644 index 00000000..1526751a --- /dev/null +++ b/mimelib/doc/body.html @@ -0,0 +1,308 @@ + + + DwBody Man Page + + +

+ NAME +

+

+DwBody -- Class representing a MIME message body +

+ SYNOPSIS +

+
class DW_EXPORT DwBody : public DwMessageComponent {
+
+    friend class DwHeaders;
+    friend class DwEntity;
+    friend class DwBodyPart;
+
+public:
+
+    DwBody();
+    DwBody(const DwBody& aBody);
+    DwBody(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwBody();
+    const DwBody& operator = (const DwBody& aBody);
+    virtual void Parse();
+    virtual void Assemble();
+    virtual DwMessageComponent* Clone() const;
+    DwBodyPart* FirstBodyPart() const;
+    void AddBodyPart(DwBodyPart* aPart);
+    DwMessage* Message() const;
+    void SetMessage(DwMessage* aMessage);
+    static DwBody* NewBody(const DwString& aStr, DwMessageComponent* aParent);
+    static DwBody* (*sNewBody)(const DwString&, DwMessageComponent*);
+
+protected:
+
+    DwString    mBoundaryStr;
+    DwString    mPreamble;
+    DwString    mEpilogue;
+    DwBodyPart* mFirstBodyPart;
+    DwMessage*  mMessage;
+    static const char* const sClassName;
+    void _AddBodyPart(DwBodyPart*);
+    void _SetMessage(DwMessage*);
+    void DeleteBodyParts();
+    void CopyBodyParts(const DwBodyPart* aFirst);
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+DwBody represents a body, as described in RFC-2045. +A body is always part of an entity, which could be either a +message or a body part. An entity has a collection of header +fields and a body. If the content type of a body is ``multipart,'' then +the body contains one or more body parts. If the content type is ``message,'' +then the body contains an encapsulated message. In all content types, the +body contains a string of characters. +

+In MIME++, a DwBody object is contained in a +DwEntity object. The +DwBody object may contain a discrete body consisting only +of a string of characters, or it may be a composite body, consisting of several +contained DwBodyPart objects +or a single contained +DwMessage object. The only reliable +way to determine the type of DwBody is to access the Content-Type +header field from the +DwHeaders object of the +DwEntity that contains it. For this reason, a +DwBody should always be part of a +DwEntity. +

+In the tree (broken-down) representation of a message, a +DwBody object can be an intermediate node, having both a +parent node and one or more child nodes, or a leaf node, having a parent +but no child nodes. In either case, the parent node is the +DwEntity object that contains it. If it is an intermediate +node, it must be of type multipart with DwBodyPart objects +as child nodes, or of type message with a single +DwMessage object as its child node. +

+Normally, you do not create a DwBody object directly, but +you access it through the Body() member function of +DwEntity, which creates the DwBody object +for you. +

+To add a DwBodyPart to a multipart +DwBody, use the member function +AddBodyPart(). To iterate over the +DwBodyParts contained in multipart +DwBody, get the first DwBodyPart by calling +FirstBodyPart(). Then get the following +DwBodyParts by calling DwBodyPart::Next() +on the current DwBodyPart. To get the +DwMessage contained in a Body with message +content type, call Message(). +

+ Public Member Functions +

+

+ DwBody()
+DwBody(const DwBody& aBody)
+DwBody(const DwString& aStr, DwMessageComponent* aParent=0)
+

+The first constructor is the default constructor, which sets the +DwBody object's string representation to the empty string +and sets its parent to NULL. +

+The second constructor is the copy constructor, which performs a deep copy +of aBody. The parent of the new DwBody object +is set to NULL. +

+The third constructor copies aStr to the +DwBody object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwEntity. +

+ const DwBody& operator = (const +DwBody& aBody) +

+This is the assignment operator, which performs a deep copy of +aBody. The parent node of the DwBody object +is not changed. +

+ virtual void Parse() +

+This virtual function, inherited from DwMessageComponent, +executes the parse method for DwBody objects. The parse method +creates or updates the broken-down representation from the string representation. +For a multipart DwBody object, the parse method creates a +collection of DwBodyPart objects. For a message +DwBody, the parse method creates a single +DwMessage object. For any other type of +DwBody, the parse method does nothing. This member function +calls the Parse() member function of any objects it creates. +

+Note: If the DwBody object has no parent node -- that is, +it is not contained by a DwEntity object -- then the parse +method does nothing, since it is unable to determine the type of body. +

+You should call this member function after you set or modify the string +representation, and before you access a contained +DwBodyPart or DwMessage. +

+This function clears the is-modified flag. +

+ virtual void Assemble() + +

+This virtual function, inherited from DwMessageComponent, +executes the assemble method for DwBody objects. The assemble +method creates or updates the string representation from the broken-down +representation. Only DwBody objects with content type of +multipart or message require assembling. In either case, the +DwBody object must be able to find the headers of the message +or body part that contains it. Therefore, if the DwBody object +is not the child of a DwEntity (i.e., +DwMessage or DwBodyPart) object, the +DwBody cannot be assembled because the content type cannot +be determined. +

+This function calls the Parse() member function of any +DwBodyPart or DwMessage object it contains. +

+You should call this member function after you add a +DwBodyPart object to a multipart body, or add a +DwMessage object to a message body, and before you access +the object's string representation. +

+This function clears the is-modified flag. +

+ virtual DwMessageComponent* +Clone() const +

+This virtual function, inherited from DwMessageComponent, +creates a new DwBody on the free store that has the same +value as this DwBody object. The basic idea is that of a +virtual copy constructor. +

+ DwBodyPart* +FirstBodyPart() const +

+For a multipart DwBody, this member function returns the +first contained DwBodyPart object. Use +DwBodyPart::Next() to iterate through the list of +DwBodyParts. +

+ void AddBodyPart(DwBodyPart* +aPart) +

+For a multipart DwBody, this member function appends a +DwBodyPart object to the list. Any +DwBodyPart objects added to a DwBody object's +list will be deleted by the DwBody object's destructor. +

+ DwMessage* Message() const + +

+For a DwBody with content type of message, this member function +returns the DwMessage encapsulated in it. +

+ void SetMessage(DwMessage* +aMessage) +

+For a DwBody with content type of message, this member function +sets the DwMessage object it contains. +

+ static DwBody* NewBody(const +DwString& aStr, DwMessageComponent* aParent) +

+Creates a new DwBody object on the free store. If the static +data member sNewBody is NULL, this member +function will create a new DwBody and return it. Otherwise, +NewBody() will call the user-supplied function pointed to +by sNewBody, which is assumed to return an object from a +class derived from DwBody, and return that object. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +It will also call PrintDebugInfo() for any of its child +components down to a level of aDepth. +

+This member function is available only in the debug version of the library. +

+ virtual void +CheckInvariants() const +

+Aborts if one of the invariants of the object fails. Use this member function +to track down bugs. +

+This member function is available only in the debug version of the library. +

+ Public Data Members +

+

+ static DwBody* +(*sNewBody)(const DwString&, DwMessageComponent*) + +

+If sNewBody is not NULL, it is assumed to +point to a user-supplied function that returns an object from a class derived +from DwBody. +

+ Protected Member Functions +

+

+ void +_AddBodyPart(DwBodyPart*) +

+Adds a body part to a multipart body. This function differs from +AddBodyPart in that it does not set the is-modified flag. +

+ void _SetMessage(DwMessage*) + +

+Sets a message to a body. This function differs from +SetMessage() in that it does not set the is-modified flag. +

+ Protected Data Members +

+

+ DwString mBoundaryStr + +

+A cache for the boundary string, which is obtained from the headers associated +with this body. +

+ DwString mPreamble +

+Contains the preamble -- the text preceding the first boundary -- in a +``multipart/*'' media type. +

+ DwString mEpilogue +

+Contains the epilogue -- the text following the last boundary -- in a +``multipart/*'' media type. +

+ DwBodyPart* +mFirstBodyPart +

+Points to the first body part in a ``multipart/*'' media type. Is +NULL if there are no body parts. +

+ DwMessage* mMessage +

+Points to the contained message, in a ``message/*'' media type. +

+ diff --git a/mimelib/doc/bodypart.html b/mimelib/doc/bodypart.html new file mode 100644 index 00000000..6a3a29b6 --- /dev/null +++ b/mimelib/doc/bodypart.html @@ -0,0 +1,157 @@ + + + DwBodyPart Man Page + + +

+ NAME +

+

+DwBodyPart -- Class representing a MIME body-part +

+ SYNOPSIS +

+
class DW_EXPORT DwBodyPart : public DwEntity {
+
+public:
+
+    DwBodyPart();
+    DwBodyPart(const DwBodyPart& aPart);
+    DwBodyPart(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwBodyPart();
+    const DwBodyPart& operator = (const DwBodyPart& aPart);
+    virtual DwMessageComponent* Clone() const;
+    static DwBodyPart* NewBodyPart(const DwString& aStr,
+        DwMessageComponent* aParent);
+    DwBodyPart* Next() const;
+    void SetNext(const DwBodyPart* aPart);
+    static DwBodyPart* (*sNewBodyPart)(const DwString&, DwMessageComponent*);
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+DwBodyPart represents a body part, as described in +RFC-2045 and RFC-2046. A body part is an entity, so it has a collection +of headers and a body. A body part is different from a message +in that a body part is part of a multipart body. +

+In MIME++, a DwBodyPart is a subclass of +DwEntity; therefore, it contains +both a DwHeaders object and a +DwBody object, and it is contained +in a multipart DwBody object. +

+As with DwMessage, most of the +functionality of DwBodyPart is implemented by the abstract +class DwEntity. +

+ Public Member Functions +

+

+ DwBodyPart()
+DwBodyPart(const DwBodyPart& aPart)
+DwBodyPart(const DwString& aStr, DwMessageComponent* aParent=0) +
+

+The first constructor is the default constructor, which sets the +DwBodyPart object's string representation to the empty string +and sets its parent to NULL. +

+The second constructor is the copy constructor, which performs a deep copy +of aPart. The parent of the new +DwBodyPart object is set to NULL. +

+The third constructor copies aStr to the +DwBodyPart object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwBody. +

+ const DwBodyPart& operator = +(const DwBodyPart& aPart) +

+This is the assignment operator, which performs a deep copy of +aPart. The parent node of the DwBodyPart +object is not changed. +

+ virtual DwMessageComponent* +Clone() const +

+This virtual function, inherited from DwMessageComponent, +creates a new DwBodyPart on the free store that has the same +value as this DwBodyPart object. The basic idea is that of +a virtual copy constructor. +

+ static DwBodyPart* +NewBodyPart(const DwString& aStr, +DwMessageComponent* aParent) +

+Creates a new DwBodyPart on the free store. If the static +data member sNewBodyPart is NULL, this member +function will create a new DwBodyPart and return it. Otherwise, +NewBodyPart() will call the user-supplied function pointed +to by sNewBodyPart, which is assumed to return an object +from a class derived from DwBodyPart, and return that object. +

+ DwBodyPart* Next() const + +

+This member function returns the next DwBodyPart object following +this DwBodyPart in the list of DwBodyPart +objects contained in a multipart DwBody. +

+ void SetNext(const DwBodyPart* +aPart) +

+This advanced function sets aPart as the next +DwBodyPart object following this +DwBodyPart in the list of DwBodyPart objects +contained in a multipart DwBody. Since +DwBody contains a member function for adding a +DwBodyPart object to its list, this function should be avoided +for most applications. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +It will also call PrintDebugInfo() for any of its child +components down to a level of aDepth. +

+This member function is available only in the debug version of the library. +

+ virtual void +CheckInvariants() const +

+Aborts if one of the invariants of the object fails. Use this member function +to track down bugs. +

+This member function is available only in the debug version of the library. +

+ Public Data Members +

+

+ static DwBodyPart* +(*sNewBodyPart)(const DwString&, +DwMessageComponent*) +

+If sNewBodyPart is not NULL, it is assumed +to point to a user-supplied function that returns an object from a class +derived from DwBodyPart. +

+ diff --git a/mimelib/doc/boyermor.html b/mimelib/doc/boyermor.html new file mode 100644 index 00000000..12606e35 --- /dev/null +++ b/mimelib/doc/boyermor.html @@ -0,0 +1,57 @@ + + + DwBoyerMoore Man Page + + +

+ NAME +

+

+DwBoyerMoore -- Class for executing Boyer-Moore string search algorithm +

+ SYNOPSIS +

+
class DW_EXPORT DwBoyerMoore {
+
+public:
+
+    DwBoyerMoore(const char* aCstr);
+    DwBoyerMoore(const DwString& aStr);
+    virtual ~DwBoyerMoore();
+    void Assign(const char* aCstr);
+    void Assign(const DwString& aStr);
+    size_t FindIn(const DwString& aStr, size_t aPos);
+};
+
+

+ DESCRIPTION +

+

+DwBoyerMoore implements the Boyer-Moore algorithm for searching +for a string. The Boyer-Moore algorithm is fast, but requires a bit of start-up +overhead compared to a brute force algorithm. +

+ Public Member Functions +

+

+ DwBoyerMoore(const char* +aCstr)
+DwBoyerMoore(const DwString& aStr)
+

+Constructs a DwBoyerMoore object for searching for a particular +string. +

+ void Assign(const char* aCstr) +
+void Assign(const DwString& aStr)
+

+Sets the string to search for. +

+ size_t FindIn(const DwString& +aStr, size_t aPos) +

+Searches for the search string in aStr starting at position +aPos. If found, the function returns the first position in +aStr where the search string was found. If not found, the +function returns DwString::npos. + diff --git a/mimelib/doc/datetime.html b/mimelib/doc/datetime.html new file mode 100644 index 00000000..0516d929 --- /dev/null +++ b/mimelib/doc/datetime.html @@ -0,0 +1,340 @@ + + + DwDateTime Man Page + + +

+ NAME +

+

+DwDateTime -- Class representing an RFC-822 date-time +

+ SYNOPSIS +

+
class DW_EXPORT DwDateTime : public DwFieldBody {
+
+public:
+
+    DwDateTime();
+    DwDateTime(const DwDateTime& aDateTime);
+    DwDateTime(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwDateTime();
+    const DwDateTime& operator = (const DwDateTime& aDateTime);
+    virtual void Parse();
+    virtual void Assemble();
+    virtual DwMessageComponent* Clone() const;
+    DwUint32 AsUnixTime() const;
+    void FromUnixTime(DwUint32 aTime);
+    time_t AsCalendarTime() const;
+    void FromCalendarTime(time_t aTime);
+    DwInt32 DateAsJulianDayNum() const;
+    void DateFromJulianDayNum(DwInt32 aJdn);
+    DwInt32 TimeAsSecsPastMidnight() const;
+    void TimeFromSecsPastMidnight(DwInt32 aSecs);
+    int Year() const;
+    void SetYear(int aYear);
+    int Month() const;
+    void SetMonth(int aMonth);
+    int Day() const;
+    void SetDay(int aDay);
+    int Hour() const;
+    void SetHour(int aHour);
+    int Minute() const;
+    void SetMinute(int aMinute);
+    int Second() const;
+    void SetSecond(int aSecond);
+    int Zone() const;
+    void SetZone(int aZone);
+    static void SetDefaultZone(int aZone);
+    static DwDateTime* NewDateTime(const DwString&, DwMessageComponent*);
+    static DwDateTime* (*sNewDateTime)(const DwString&, DwMessageComponent*);
+
+protected:
+
+    void _FromUnixTime(DwUint32 aTime);
+    void _FromCalendarTime(time_t aTime);
+    int  mYear;
+    int  mMonth;
+    int  mDay;
+    int  mHour;
+    int  mMinute;
+    int  mSecond;
+    int  mZone;
+    static int sDefaultZone;
+    static int sIsDefaultZoneSet;
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+DwDatetime represents a date-time as described in +RFC-822 and RFC-1123. The parse method for DwDateTime parses +the string representation to extract the year, month, day, hour, minute, +second, and time zone. DwDateTime provides member functions +to set or get the individual components of the date-time. +

+ Public Member Functions +

+

+ DwDateTime()
+DwDateTime(const DwDateTime& aDateTime)
+DwDateTime(const DwString& aStr, DwMessageComponent* aParent=0) +
+

+The first constructor is the default constructor, which assigns the current +date and time as reported by the operating system. +

+The second constructor is the copy constructor. The parent of the new +DwDateTime object is set to NULL. +

+The third constructor sets aStr as the +DwDateTime object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called after this constructor to extract +the date and time information from the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwField. +

+ const DwDateTime& operator = +(const DwDateTime& aDateTime) +

+This is the assignment operator, which sets this +DwDateTime object to the same value as +aDateTime. +

+ virtual void Parse() +

+This virtual function, inherited from DwMessageComponent, +executes the parse method for DwDateTime objects. The parse +method creates or updates the broken-down representation from the string +representation. For DwDateTime objects, the parse method +parses the string representation to extract the year, month, day, hour, minute, +second, and time zone. +

+This function clears the is-modified flag. +

+ virtual void Assemble() + +

+This virtual function, inherited from DwMessageComponent, +executes the assemble method for DwDateTime objects. It should +be called whenever one of the object's attributes is changed in order to +assemble the string representation from its broken-down representation. It +will be called automatically for this object by the parent object's +Assemble() member function if the is-modified flag is set. +

+This function clears the is-modified flag. +

+ virtual DwMessageComponent* +Clone() const +

+This virtual function, inherited from DwMessageComponent, +creates a new DwDateTime on the free store that has the same +value as this DwDateTime object. The basic idea is that of +a virtual copy constructor. +

+ DwUint32 AsUnixTime() const + +

+Returns the date and time as a UNIX (POSIX) time, defined as the number of +seconds elapsed since 1 Jan 1970 00:00:00 UTC. +

+ void FromUnixTime(DwUint32 +aTime) +

+Sets the date and time from aTime, interpreted as the number +of of seconds elapsed since 1 Jan 1970 00:00:00 UTC. +

+ time_t AsCalendarTime() +const +

+Returns the date and time as a value of type time_t that +conforms to the native format returned by the time() ANSI +C function. On most UNIX systems, this function returns the same value as +AsUnixTime(). (For efficiency, use +AsUnixTime() instead of AsCalendarTime() +if possible). +

+ void +FromCalendarTime(time_t aTime) +

+Sets the date and time from aTime, which is assumed to be +in a format compatible with the native time() ANSI C function. +For most UNIX systems, this function is the same as the function +FromUnixTime(). (For efficiency, use +FromUnixTime() instead of +FromCalendarTime() if possible). +

+ DwInt32 +DateAsJulianDayNum() const +

+Returns the Julian Day Number, defined as the number of days elapsed since +1 Jan 4713 BC. The JDN is calculated directly from the values of the year, +month, and day; time zone information is ignored. +

+ void +DateFromJulianDayNum(DwInt32 aJdn) + +

+Sets the year, month, and day from aJdn, interpreted as a +Julian Day Number. By definition, the JDN is the number of days elapsed since +1 Jan 4713 BC. This member function ignores time zone information. +

+ DwInt32 +TimeAsSecsPastMidnight() const + +

+Returns the number of seconds past midnight. The value is calculated directly +from the values of the hour, minute, and second; time zone information is +ignored. +

+ void +TimeFromSecsPastMidnight(DwInt32 aSecs) + +

+Sets the hour, minute, and second from aSecs, interpreted +as the number of seconds elapsed since midnight. This member function ignores +time zone information. The argument aSecs should be in the +range 0 to 86399, inclusive. +

+ int Year() const +

+Returns the four digit year, e.g. 1997. +

+ void SetYear(int aYear) + +

+Sets the year from aYear, which should be a four digit year. +

+ int Month() const +

+Returns the month. Values range from 1 to 12. +

+ void SetMonth(int aMonth) + +

+Sets the month from aMonth, which should be in the range +1 to 12. +

+ int Day() const +

+Returns the day of the month. Values range from 1 to 31. +

+ void SetDay(int aDay) +

+Sets the day of the month from aDay. +

+ int Hour() const +

+Returns the hour according to the 24 hour clock. Values range from 0 to 23. +

+ void SetHour(int aHour) + +

+Sets the hour from aHour based on the 24-hour clock. +aHour should be in the range 0 to 23. +

+ int Minute() const +

+Returns the minute. Values range from 0 to 59. +

+ void SetMinute(int aMinute) + +

+Sets the minute from aMinute, which should be in the range +0 to 59. +

+ int Second() const +

+Returns the second. Values range from 0 to 59. +

+ void SetSecond(int aSecond) + +

+Sets the second from aSecond, which should be in the range +0 to 59. +

+ int Zone() const +

+Returns the time zone as the diffence in minutes between local time and +Coordinated Universal Time (UTC or GMT). +

+ void SetZone(int aZone) + +

+Sets the time zone from aZone, interpreted as the time difference +in minutes between local time and Coordinated Universal Time (UTC, or GMT). +

+ static void +SetDefaultZone(int aZone) +

+Sets the default time zone. aZone should be the time difference +in minutes between local time and Coordinated Universal Time (UTC, or GMT). +The value is used to set the time zone for any objects created using the +default constructor. +

+ static DwDateTime* +NewDateTime(const DwString&, DwMessageComponent*) + +

+Creates a new DwDateTime object on the free store. If the +static data member sNewDateTime is NULL, +this member function will create a new DwDateTime and return +it. Otherwise, NewDateTime() will call the user-supplied +function pointed to by sNewDateTime, which is assumed to +return an object from a class derived from DwDateTime, and +return that object. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +

+This member function is available only in the debug version of the library. +

+ virtual void +CheckInvariants() const +

+Aborts if one of the invariants of the object fails. Use this member function +to track down bugs. +

+This member function is available only in the debug version of the library. +

+ Public Data Members +

+

+ static DwDateTime* +(*sNewDateTime)(const DwString&, +DwMessageComponent*) +

+If sNewDateTime is not NULL, it is assumed +to point to a user-supplied function that returns an object from a class +derived from DwDateTime. +

+ Protected Member Functions +

+

+ void +_FromUnixTime(DwUint32 aTime) +

+Like FromUnixTime(), but doesn't set the is-modified flag. +

+ void +_FromCalendarTime(time_t aTime) +

+Like FromCalendarTime(), but doesn't set the is-modified +flag. +

+ diff --git a/mimelib/doc/disptype.html b/mimelib/doc/disptype.html new file mode 100644 index 00000000..c64b1dc1 --- /dev/null +++ b/mimelib/doc/disptype.html @@ -0,0 +1,224 @@ + + + DwDispositionType Man Page + + +

+ NAME +

+

+DwDispositionType -- Class representing a MIME content-disposition field +body +

+ SYNOPSIS +

+
class DW_EXPORT DwDispositionType : public DwFieldBody {
+
+public:
+
+    DwDispositionType();
+    DwDispositionType(const DwDispositionType& aDispType);
+    DwDispositionType(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwDispositionType();
+    const DwDispositionType& operator = (const DwDispositionType& aDispType);
+    virtual void Parse();
+    virtual void Assemble();
+    virtual DwMessageComponent* Clone() const;
+    int DispositionType() const;
+    void SetDispositionType(int aType);
+    const DwString& DispositionTypeStr() const;
+    void SetDispositionTypeStr(const DwString& aStr);
+    const DwString& Filename() const;
+    void SetFilename(const DwString& aStr);
+    DwParameter* FirstParameter() const;
+    void AddParameter(DwParameter* aParam);
+    static DwDispositionType* NewDispositionType(const DwString& aStr,
+        DwMessageComponent* aParent);
+    static DwDispositionType* (*sNewDispositionType)(const DwString&,
+        DwMessageComponent*);
+
+protected:
+
+    void _AddParameter(DwParameter* aParam);
+    virtual void EnumToStr();
+    virtual void StrToEnum();
+    void DeleteParameterList();
+    void CopyParameterList(DwParameter* aFirst);
+    int mDispositionType;
+    DwString mDispositionTypeStr;
+    DwString mFilenameStr;
+    DwParameter* mFirstParameter;
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+DwDispositionType represents a field body for the +Content-Disposition header field as described in RFC-1806. This header field +specifies whether the content of a message or body part should be displayed +automatically to a user. A disposition-type of inline indicates that the +content should be displayed; a disposition-type of attachment indicates that +it should not be. RFC-1806 specifies that a filename parameter may be optionally +included in the field body; the filename parameter suggests a file name for +saving the message or body part's content. +

+DwDispositionType provides convenience functions that allow +you to set or get the disposition-type as an enumerated value, to set or +get the filename parameter, or to manage a list of parameters. +

+RFC-1806 specifically states that the Content-Disposition header field is +experimental and not a proposed standard. +

+ Public Member Functions +

+

+ DwDispositionType() +
+DwDispositionType(const DwDispositionType& aDispType)
+DwDispositionType(const DwString& aStr, DwMessageComponent* aParent=0) +
+

+The first constructor is the default constructor, which sets the +DwDispositionType object's string representation to the empty +string and sets its parent to NULL. +

+The second constructor is the copy constructor, which performs deep copy +of aDispType. The parent of the new +DwDispositionType object is set to NULL. +

+The third constructor copies aStr to the +DwDispositionType object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwField. +

+ const DwDispositionType& operator += (const DwDispositionType& aDispType) +

+This is the assignment operator, which performs a deep copy of +aDispType. The parent node of the +DwDipositionType object is not changed. +

+ virtual void Parse() +

+This virtual function, inherited from DwMessageComponent, +executes the parse method for DwDispositionType objects. +It should be called immediately after the string representation is modified +and before the parts of the broken-down representation are accessed. +

+This function clears the is-modified flag. +

+ virtual void Assemble() + +

+This virtual function, inherited from DwMessageComponent, +executes the assemble method for DwDispositionType objects. +It should be called whenever one of the object's attributes is changed in +order to assemble the string representation from its broken-down representation. +It will be called automatically for this object by the parent object's +Assemble() member function if the is-modified flag is set. +

+This function clears the is-modified flag. +

+ virtual DwMessageComponent* +Clone() const +

+This virtual function, inherited from DwMessageComponent, +creates a new DwDispositionType object on the free store +that has the same value as this DwDispositionType object. +The basic idea is that of a virtual copy constructor. +

+ int DispositionType() +const +

+Returns the disposition-type as an enumerated value. Valid enumerated types, +which are defined in enum.h, include +DwMime::kDispTypeNull, +DwMime::kDispTypeUnknown, +DwMime::kDispTypeInline, and +DwMime::kDispTypeAttachment. +

+ void +SetDispositionType(int aType) +

+Sets the disposition-type from the enumerated value +aType. Valid enumerated types, which are defined in enum.h, +include DwMime::kDispTypeNull, +DwMime::kDispTypeUnknown, +DwMime::kDispTypeInline, and +DwMime::kDispTypeAttachment. +

+ const DwString& +DispositionTypeStr() const +

+Returns the disposition-type as a string. +

+ void +SetDispositionTypeStr(const DwString& +aStr) +

+Sets the disposition-type from a string. +

+ const DwString& Filename() +const +

+This convenience function returns the value from the filename parameter, +if present. If no filename parameter is present, an empty string is returned. +

+ void SetFilename(const +DwString& aStr) +

+This convenience function sets the value of the filename parameter to +aStr. +

+ DwParameter* +FirstParameter() const +

+Returns the first DwParameter object in the list managed +by this DwDispositionType object, or NULL +if no parameters are present. Use DwParameter::Next() to +iterate through the list. +

+ void +AddParameter(DwParameter* aParam) +

+Adds a DwParameter object to the list managed by this +DwDispositionType object. +

+ static DwDispositionType* +NewDispositionType(const DwString& aStr, +DwMessageComponent* aParent) +

+Creates a new DwDispositionType object on the free store. +If the static data member sNewDispositionType is +NULL, this member function will create a new +DwDispositionType and return it. Otherwise, +NewDispositionType() will call the user-supplied function +pointed to by sNewDispositionType, which is assumed to return +an object from a class derived from DwDispositionType, and +return that object. +

+ Public Data Members +

+

+ static DwDispositionType* +(*sNewDispositionType)(const DwString&, +DwMessageComponent*) +

+If sNewDispositionType is not NULL, it is +assumed to point to a user-supplied function that returns an object from +a class derived from DwDispositionType. +

+ diff --git a/mimelib/doc/entity.html b/mimelib/doc/entity.html new file mode 100644 index 00000000..08cf8b75 --- /dev/null +++ b/mimelib/doc/entity.html @@ -0,0 +1,168 @@ + + + DwEntity Man Page + + +

+ NAME +

+

+DwEntity -- Abstract class representing a MIME entity +

+ SYNOPSIS +

+
class DW_EXPORT DwEntity : public DwMessageComponent {
+
+public:
+
+    DwEntity();
+    DwEntity(const DwEntity& aEntity);
+    DwEntity(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwEntity();
+    const DwEntity& operator = (const DwEntity& aEntity);
+    virtual void Parse();
+    virtual void Assemble();
+    DwHeaders& Headers() const;
+    DwBody& Body() const;
+
+protected:
+
+    DwHeaders* mHeaders;
+    DwBody*    mBody;
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+RFC-2045 defines an entity as either a message or a body +part, both of which have a collection of headers and a body. In +MIME++, an entity is represented by the class DwEntity, which +contains both a DwHeaders object +and a DwBody object. +

+In the tree (broken-down) representation of message, a +DwEntity object may be either a root node, having child nodes +but no parent node, or an intermediate node, having both a parent node and +child nodes. A DwEntity object that is a root node must also +be a DwMessage object. If a +DwEntity object is an intermediate node, its parent must +be a DwBody object. The child nodes of a +DwEntity object are the DwHeaders and +DwBody objects it contains. +

+Since DwEntity is an abstract base class, you cannot create +instances of it directly. DwEntity has two derived classes, +DwMessage and +DwBodyPart, which are concrete +classes. +

+To access the contained DwHeaders object, use the member +function Headers(). To access the contained +DwBody object, use the member function +Body(). +

+ Public Member Functions +

+

+ DwEntity()
+DwEntity(const DwEntity& aEntity)
+DwEntity(const DwString& aStr, DwMessageComponent* aParent=0)
+

+The first constructor is the default constructor, which sets the +DwEntity object's string representation to the empty string +and sets its parent to NULL. +

+The second constructor is the copy constructor, which performs a deep copy +of aEntity. The parent of the new +DwEntity object is set to NULL. +

+The third constructor copies aStr to the +DwEntity object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwBody. +

+ const DwEntity& operator = +(const DwEntity& aEntity) +

+This is the assignment operator, which performs a deep copy of +aEntity. The parent node of the DwEntity +object is not changed. +

+ virtual void Parse() +

+This virtual function, inherited from DwMessageComponent, +executes the parse method for DwEntity objects. The parse +method creates or updates the broken-down representation from the string +representation. For DwEntity objects, the parse method parses +the string representation and sets the values of the +DwHeaders and DwBody objects it contains. +This member function also calls the Parse() member functions +of the contained DwHeaders and DwBody objects. +

+You should call this member function after you set or modify the string +representation, and before you access either the contained headers or body. +

+This function clears the is-modified flag. +

+ virtual void Assemble() + +

+This virtual function, inherited from DwMessageComponent, +executes the assemble method for DwEntity objects. The assemble +method creates or updates the string representation from the broken-down +representation. In more concrete terms, the assemble method builds the string +representation from the string representations of the contained +DwHeaders and DwBody objects. This member +function calls the Assemble() member functions of its +DwHeaders and DwBody objects. +

+You should call this member function after you modify either the contained +headers or body, and before you retrieve the string representation. +

+This function clears the is-modified flag. +

+ DwHeaders& Headers() const + +

+This function returns the DwHeaders object contained by this +object. +

+ DwBody& Body() const + +

+This function returns the DwBody object contained by this +object. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +It will also call PrintDebugInfo() for any of its child +components down to a level of aDepth. +

+This member function is available only in the debug version of the library. +

+ virtual void +CheckInvariants() const +

+Aborts if one of the invariants of the object fails. Use this member function +to track down bugs. +

+This member function is available only in the debug version of the library. +

+ diff --git a/mimelib/doc/field.html b/mimelib/doc/field.html new file mode 100644 index 00000000..19736f27 --- /dev/null +++ b/mimelib/doc/field.html @@ -0,0 +1,305 @@ + + + DwField Man Page + + +

+ NAME +

+

+DwField -- Class representing a MIME header field +

+ SYNOPSIS +

+
class DW_EXPORT DwField : public DwMessageComponent {
+
+    friend class DwHeaders;
+
+public:
+
+    DwField();
+    DwField(const DwField& aField);
+    DwField(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwField();
+    const DwField& operator = (const DwField& aField);
+    virtual void Parse();
+    virtual void Assemble();
+    virtual DwMessageComponent* Clone() const;
+    DwFieldBody* FieldBody() const;
+    const DwString& FieldNameStr() const;
+    const DwString& FieldBodyStr() const;
+    DwField* Next() const;
+    void SetFieldBody(DwFieldBody* aFieldBody);
+    void SetFieldNameStr(const DwString& aStr);
+    void SetFieldBodyStr(const DwString& aStr);
+    void SetNext(const DwField* aField);
+    static DwField* NewField(const DwString& aStr,
+        DwMessageComponent* aParent);
+    static DwFieldBody* CreateFieldBody(const DwString& aFieldName,
+        const DwString& aFieldBody, DwMessageComponent* aParent);
+    static DwFieldBody* _CreateFieldBody(const DwString& aFieldName,
+        const DwString& aFieldBody, DwMessageComponent* aParent);
+    static DwField* (*sNewField)(const DwString&, DwMessageComponent*);
+    static DwFieldBody* (*sCreateFieldBody)(const DwString& aFieldName,
+        const DwString& aFieldBody, DwMessageComponent* aParent);
+
+protected:
+
+    DwString mFieldNameStr;
+    DwString mFieldBodyStr;
+    DwFieldBody* mFieldBody;
+    void _SetFieldBody(DwFieldBody* aFieldBody);
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+DwField represents a header field as described in RFC-822. +According to RFC-822, a field contains a field name and a field body. In +MIME++, a DwField contains three elements: a +DwString that contains its field +name, a DwString that contains its field body, and a +DwFieldBody object that contains +a broken-down (that is, parsed) version of its field body. +

+In the tree (broken-down) representation of message, a +DwField object is always an intermediate node, having a parent +node and a single child node. The parent node is the +DwHeaders object that contains +it. The child node is the DwFieldBody object it contains. +

+To get and set the field name, use the member functions +FieldNameStr() and SetFieldNameStr(). To +get and set the field body, use the member functions +FieldBodyStr() and SetFieldBodyStr(). To +get and set the DwFieldBody object, use +FieldBody() and SetFieldBody(). +

+A DwField object can be included in a list of +DwField objects; usually this is the list of +DwField objects maintained by its parent +DwHeaders object. To get the next DwField +object in a list, use the member function Next(). +

+ Public Member Functions +

+

+ DwField()
+DwField(const DwField& aField)
+DwField(const DwString& aStr, DwMessageComponent* aParent=0)
+

+The first constructor is the default constructor, which sets the +DwField object's field name and field body to the empty string, +set its parent to NULL, and sets its +DwFieldBody object to NULL. +

+The second constructor is the copy constructor, which performs a deep copy +of aField. The parent of the new DwField +object is set to NULL. +

+The third constructor copies aStr to the +DwField object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwHeaders. +

+ const DwField& operator = +(const DwField& aField) +

+This is the assignment operator, which performs a deep copy of +aField. The parent node of the DwField object +is not changed. +

+ virtual void Parse() +

+This virtual function, inherited from DwMessageComponent, +executes the parse method for DwField objects. The parse +method creates or updates the broken-down representation from the string +representation. For DwField objects, the parse method parses +the string representation, sets the values of the field name string and the +field body string, and creates an instance of the appropriate subclass of +DwFieldBody. This member function also calls the +Parse() member function of its contained +DwFieldBody object. +

+You should call this member function after you set or modify the string +representation, and before you access the field name, the field body, or +the contained DwFieldBody object. +

+This function clears the is-modified flag. +

+ virtual void Assemble() + +

+This virtual function, inherited from DwMessageComponent, +executes the assemble method for DwField objects. The assemble +method creates or updates the string representation from the broken-down +representation. In more concrete terms, the assemble method builds the string +representation from the field name and the string representation of the contained +DwFieldBody object. This member function calls the +Assemble() member function of its contained +DwFieldBody object. +

+You should call this member function after you modify either the field name +or the contained DwFieldBody object, and before you retrieve +the string representation. +

+This function clears the is-modified flag. +

+ virtual DwMessageComponent* +Clone() const +

+This virtual function, inherited from DwMessageComponent, +creates a new DwField on the free store that has the same +value as this DwField object. The basic idea is that of a +virtual copy constructor. +

+ DwFieldBody* FieldBody() const + +

+Returns the DwFieldBody object contained by this +DwField object. If there is no field body, +NULL will be returned. +

+ const DwString& +FieldNameStr() const +

+Returns the field name of this header field as a string. +

+ const DwString& +FieldBodyStr() const +

+Returns the field body of this header field as a string. +

+ DwField* Next() const +

+Returns the next DwField object following this +DwField object in the list contained in a +DwHeaders. Returns NULL if this object is +last in the list. +

+ void +SetFieldBody(DwFieldBody* aFieldBody) +

+Sets the DwFieldBody object contained by this object. +

+ void +SetFieldNameStr(const DwString& aStr) + +

+Sets the field name of this header field. +

+ void +SetFieldBodyStr(const DwString& aStr) + +

+Sets the field body of this header field. +

+ void SetNext(const DwField* +aField) +

+This advanced function sets aField as the next field +following this field in the list of fields contained in the headers. Since +DwHeaders contains member functions for adding +DwField objects to its list, this function should be avoided +for most applications. +

+ static DwField* NewField(const +DwString& aStr, DwMessageComponent* aParent) +

+Creates a new DwField object on the free store. If the static +data member sNewField is NULL, this member +function will create a new DwField and return it. Otherwise, +NewField() will call the user-supplied function pointed to +by sNewField, which is assumed to return an object from a +class derived from DwField, and return that object. +

+ static DwFieldBody* +CreateFieldBody(const DwString& aFieldName, +const DwString& aFieldBody, DwMessageComponent* aParent) +

+The static member function CreateFieldBody() is called from +the Parse() member function and is responsible for creating +a DwFieldBody object for this particular field. A typical +scenario might go as follows: This member function examines the field name +for this field, finds that it contains "To", creates a +DwAddressList object to contain the field body, calls the +Parse() member function for the +DwAddressList, and sets the DwAddressList +object as this DwField object's +DwFieldBody. +

+If you want to override the behavior of +CreateFieldBody(), you can do so by setting the public data +member sCreateFieldBody to point to your own function. +CreateFieldBody() first checks to see if +sCreateFieldBody is NULL. If it is not, +CreateFieldBody() will assume that it points to a user-supplied +function and will call that function. If it is NULL, +CreateFieldBody() will call +_CreateFieldBody(), which actually creates the +DwFieldBody object. You may call +_CreateFieldBody() from your own function for fields you +do not wish to handle. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +It will also call PrintDebugInfo() for any of its child +components down to a level of aDepth. +

+This member function is available only in the debug version of the library. +

+ virtual void +CheckInvariants() const +

+Aborts if one of the invariants of the object fails. Use this member function +to track down bugs. +

+This member function is available only in the debug version of the library. +

+ Public Data Members +

+

+ static DwField* +(*sNewField)(const DwString&, DwMessageComponent*) + +

+If sNewField is not NULL, it is assumed to +point to a user-supplied function that returns an object from a class derived +from DwField. +

+ static DwFieldBody* +(*sCreateFieldBody)(const DwString& +aFieldName, const DwString& aFieldBody, DwMessageComponent* aParent) + +

+See CreateFieldBody(). +

+ Protected Member Functions +

+

+ void +_SetFieldBody(DwFieldBody* aFieldBody) + +

+Sets the DwFieldBody object contained by this object. This +function differs from SetFieldBody() in that it does not +set the is-modified flag. +

+ diff --git a/mimelib/doc/fieldbdy.html b/mimelib/doc/fieldbdy.html new file mode 100644 index 00000000..856fd533 --- /dev/null +++ b/mimelib/doc/fieldbdy.html @@ -0,0 +1,144 @@ + + + DwFieldBody Man Page + + +

+ NAME +

+

+DwFieldBody -- Class representing a MIME header field body +

+ SYNOPSIS +

+
class DW_EXPORT DwFieldBody : public DwMessageComponent {
+
+    friend class DwField;
+
+public:
+
+    DwFieldBody();
+    DwFieldBody(const DwFieldBody& aFieldBody);
+    DwFieldBody(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwFieldBody();
+    const DwFieldBody& operator = (const DwFieldBody& aFieldBody);
+    void SetOffset(int aOffset);
+    void SetFolding(DwBool aTrueOrFalse);
+    DwBool IsFolding() const;
+
+protected:
+
+    int mLineOffset;
+    DwBool mDoFolding;
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+DwFieldBody represents the field-body element in the BNF +grammar specified by RFC-822. It is an abstract base class that defines the +interface common to all structured field bodies. +

+In the tree (broken-down) representation of a message, a +DwFieldBody object may be either a leaf node, having a parent +but no child nodes, or an intermediate node, having a parent and one or more +child nodes. The parent node is the +DwField object that contains it. +Child nodes, if present, depend on the particular subclass of +DwFieldBody that is instantiated. A +DwAddressList object, for example, has +DwAddress objects as its child nodes. +

+Since DwFieldBody is an abstract base class, you cannot create +instances of it directly. Normally, objects of classes derived from +DwFieldBody are obtained by calling convenience member functions +in the class DwHeaders. +

+Some MIME parsers are broken in that they do not handle the folding of some +fields properly. DwFieldBody folds its string representation +by default. You can disable folding, however, by calling the +SetFolding() member function. To determine if folding is +enabled, call IsFolding(). +

+ Public Member Functions +

+

+ DwFieldBody()
+DwFieldBody(const DwFieldBody& aFieldBody)
+DwFieldBody(const DwString& aStr, DwMessageComponent* aParent=0) +
+

+The first constructor is the default constructor, which sets the +DwFieldBody object's string representation to the empty string +and sets its parent to NULL. +

+The second constructor is the copy constructor, which performs a deep copy +of aFieldBody. The parent of the new +DwFieldBody object is set to NULL. +

+The third constructor copies aStr to the +DwFieldBody object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwField. +

+ const DwFieldBody& operator = +(const DwFieldBody& aFieldBody) +

+This is the assignment operator, which performs a deep copy of +aFieldBody. The parent node of the +DwFieldBody object is not changed. +

+ void SetOffset(int aOffset) + +

+Sets the offset to aOffset. The offset is used when folding +lines. It indicates how much the first line should be offset to account for +the field name, colon, and initial white space. +

+ void SetFolding(DwBool +aTrueOrFalse) +

+Enables (aTrueOrFalse = DwTrue) or disables +(aTrueOrFalse = DwFalse) the folding of fields. The default +is to fold fields. Unfortunately, some parsers are broke and do not handle +folded lines properly. This function allows a kludge to deal with these broken +parsers. +

+ DwBool IsFolding() const + +

+Returns a boolean indicating if folding of fields is enabled. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +It will also call PrintDebugInfo() for any of its child +components down to a level of aDepth. +

+This member function is available only in the debug version of the library. +

+ virtual void +CheckInvariants() const +

+Aborts if one of the invariants of the object fails. Use this member function +to track down bugs. +

+This member function is available only in the debug version of the library. +

+ diff --git a/mimelib/doc/group.html b/mimelib/doc/group.html new file mode 100644 index 00000000..1d374d87 --- /dev/null +++ b/mimelib/doc/group.html @@ -0,0 +1,221 @@ + + + DwGroup Man Page + + +

+ NAME +

+

+DwGroup -- Class representing an RFC-822 address group +

+ SYNOPSIS +

+
class DW_EXPORT DwGroup : public DwAddress {
+
+public:
+
+    DwGroup();
+    DwGroup(const DwGroup& aGroup);
+    DwGroup(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwGroup();
+    const DwGroup& operator = (const DwGroup& aGroup);
+    virtual void Parse();
+    virtual void Assemble();
+    virtual DwMessageComponent* Clone() const;
+    const DwString& GroupName() const;
+    const DwString& Phrase() const;
+    void SetGroupName(const DwString& aName);
+    void SetPhrase(const DwString& aPhrase);
+    DwMailboxList& MailboxList() const;
+    static DwGroup* NewGroup(const DwString& aStr,
+        DwMessageComponent* aParent);
+    static DwGroup* (*sNewGroup)(const DwString&, DwMessageComponent*);
+
+protected:
+
+    DwMailboxList* mMailboxList;
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+DwGroup represents a group as described in RFC-822. +A group contains a group name and a (possibly empty) list of +mailboxes. In MIME++, a DwGroup object contains a +string for the group name and a +DwMailboxList object for the +list of mailboxes. +

+In the tree (broken-down) representation of message, a +DwGroup object may be only an intermediate node, having both +a parent and a single child node. Its parent node must be a +DwField or a +DwAddressList. Its child is a +DwMailboxList. +

+A DwGroup is a +DwAddress, and therefore it can +be included in a list of DwAddress objects. To get the next +DwAddress object in a list, use the inherited member function +DwAddress::Next(). +

+ Public Member Functions +

+

+ DwGroup()
+DwGroup(const DwGroup& aGroup)
+DwGroup(const DwString& aStr, DwMessageComponent* aParent=0)
+

+The first constructor is the default constructor, which sets the +DwGroup object's string representation to the empty string +and sets its parent to NULL. +

+The second constructor is the copy constructor, which performs a deep copy +of aGroup. The parent of the new DwGroup +object is set to NULL. +

+The third constructor copies aStr to the +DwGroup object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwField or +DwAddressList. +

+ const DwGroup& operator = +(const DwGroup& aGroup) +

+This is the assignment operator, which performs a deep copy of +aGroup. The parent node of the DwGroup object +is not changed. +

+ virtual void Parse() +

+This virtual function, inherited from DwMessageComponent, +executes the parse method for DwGroup objects. The parse +method creates or updates the broken-down representation from the string +representation. For DwGroup objects, the parse method parses +the string representation to extract the group name and to create a +DwMailboxList object from the list of mailboxes. This member +function also calls the Parse() member function of the +DwMailboxList object it creates. +

+You should call this member function after you set or modify the string +representation, and before you access the group name or the mailbox list. +

+This function clears the is-modified flag. +

+ virtual void Assemble() + +

+This virtual function, inherited from DwMessageComponent, +executes the assemble method for DwGroup objects. The assemble +method creates or updates the string representation from the broken-down +representation. That is, the assemble method builds the string representation +from its group name and mailbox list. Before it builds the string representation, +this function calls the Assemble() member function of its +contained DwMailboxList object. +

+You should call this member function after you set or modify either the group +name or the contained DwMailboxList object, and before you +retrieve the string representation. +

+This function clears the is-modified flag. +

+ virtual DwMessageComponent* +Clone() const +

+This virtual function, inherited from DwMessageComponent, +creates a new DwGroup on the free store that has the same +value as this DwGroup object. The basic idea is that of a +virtual copy constructor. +

+ const DwString& +GroupName() const +

+Returns the name of the group. +

+ const DwString& Phrase() +const +

+Returns the name of the phrase part of a group as described in RFC-822. The +phrase is the same as the group name. +

+ void SetGroupName(const +DwString& aName) +

+Sets the name of the group. +

+ void SetPhrase(const +DwString& aPhrase) +

+Sets the name of the phrase part of a group as described in RFC-822. The +phrase is the same as the group name. +

+ DwMailboxList& MailboxList() +const +

+Provides access to the list of mailboxes that is part of a group as described +in RFC-822. +

+ static DwGroup* NewGroup(const +DwString& aStr, DwMessageComponent* aParent) +

+Creates a new DwGroup object on the free store. If the static +data member sNewGroup is NULL, this member +function will create a new DwGroup and return it. Otherwise, +NewGroup() will call the user-supplied function pointed to +by sNewGroup, which is assumed to return an object from a +class derived from DwGroup, and return that object. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +It will also call PrintDebugInfo() for any of its child +components down to a level of aDepth. +

+This member function is available only in the debug version of the library. +

+ virtual void +CheckInvariants() const +

+Aborts if one of the invariants of the object fails. Use this member function +to track down bugs. +

+This member function is available only in the debug version of the library. +

+ Public Data Members +

+

+ static DwGroup* +(*sNewGroup)(const DwString&, DwMessageComponent*) + +

+If sNewGroup is not NULL, it is assumed to +point to a user-supplied function that returns an object from a class derived +from DwGroup. +

+ Protected Data Members +

+

+ DwMailboxList* mMailboxList + +

+Points to the DwMailboxList object. +

+ diff --git a/mimelib/doc/headers.html b/mimelib/doc/headers.html new file mode 100644 index 00000000..8bf94ad9 --- /dev/null +++ b/mimelib/doc/headers.html @@ -0,0 +1,512 @@ + + + DwHeaders Man Page + + +

+ NAME +

+

+DwHeaders -- Class representing the collection of header fields in a message +or body part +

+ SYNOPSIS +

+
+class DW_EXPORT DwHeaders : public DwMessageComponent {
+
+public:
+
+    DwHeaders();
+    DwHeaders(const DwHeaders& aHeaders);
+    DwHeaders(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwHeaders();
+    const DwHeaders& operator = (const DwHeaders& aHeaders);
+    virtual void Parse();
+    virtual void Assemble();
+    virtual DwMessageComponent* Clone() const;
+    DwBool HasBcc() const;
+    DwBool HasCc() const;
+    DwBool HasComments() const;
+    DwBool HasDate() const;
+    DwBool HasEncrypted() const;
+    DwBool HasFrom() const;
+    DwBool HasInReplyTo() const;
+    DwBool HasKeywords() const;
+    DwBool HasMessageId() const;
+    DwBool HasReceived() const;
+    DwBool HasReferences() const;
+    DwBool HasReplyTo() const;
+    DwBool HasResentBcc() const;
+    DwBool HasResentCc() const;
+    DwBool HasResentDate() const;
+    DwBool HasResentFrom() const;
+    DwBool HasResentMessageId() const;
+    DwBool HasResentReplyTo() const;
+    DwBool HasResentSender() const;
+    DwBool HasResentTo() const;
+    DwBool HasReturnPath() const;
+    DwBool HasSender() const;
+    DwBool HasSubject() const;
+    DwBool HasTo() const;
+    DwBool HasApproved() const;
+    DwBool HasControl() const;
+    DwBool HasDistribution() const;
+    DwBool HasExpires() const;
+    DwBool HasFollowupTo() const;
+    DwBool HasLines() const;
+    DwBool HasNewsgroups() const;
+    DwBool HasOrganization() const;
+    DwBool HasPath() const;
+    DwBool HasSummary() const;
+    DwBool HasXref() const;
+    DwBool HasContentDescription() const;
+    DwBool HasContentId() const;
+    DwBool HasContentTransferEncoding() const;
+    DwBool HasCte() const;
+    DwBool HasContentType() const;
+    DwBool HasMimeVersion() const;
+    DwBool HasContentDisposition() const;
+    DwBool HasField(const char* aFieldName) const;
+    DwBool HasField(const DwString& aFieldName) const;
+    DwAddressList&  Bcc();
+    DwAddressList&  Cc();
+    DwText&         Comments();
+    DwDateTime&     Date();
+    DwText&         Encrypted();
+    DwMailboxList&  From();
+    DwText&         InReplyTo();
+    DwText&         Keywords();
+    DwMsgId&        MessageId();
+    DwText&         Received();
+    DwText&         References();
+    DwAddressList&  ReplyTo();
+    DwAddressList&  ResentBcc();
+    DwAddressList&  ResentCc();
+    DwDateTime&     ResentDate();
+    DwMailboxList&  ResentFrom();
+    DwMsgId&        ResentMessageId();
+    DwAddressList&  ResentReplyTo();
+    DwMailbox&      ResentSender();
+    DwAddressList&  ResentTo();
+    DwAddress&      ReturnPath();
+    DwMailbox&      Sender();
+    DwText&         Subject();
+    DwAddressList&  To();
+    DwText& Approved();
+    DwText& Control();
+    DwText& Distribution();
+    DwText& Expires();
+    DwText& FollowupTo();
+    DwText& Lines();
+    DwText& Newsgroups();
+    DwText& Organization();
+    DwText& Path();
+    DwText& Summary();
+    DwText& Xref();
+    DwText&         ContentDescription();
+    DwMsgId&        ContentId();
+    DwMechanism&    ContentTransferEncoding();
+    DwMechanism&    Cte();
+    DwMediaType&    ContentType();
+    DwText&         MimeVersion();
+    DwDispositionType& ContentDisposition();
+    DwFieldBody& FieldBody(const DwString& aFieldName);
+    int NumFields() const;
+    DwField* FirstField() const;
+    DwField* FindField(const char* aFieldName) const;
+    DwField* FindField(const DwString& aFieldName) const;
+    void AddOrReplaceField(DwField* aField);
+    void AddField(DwField* aField);
+    void AddFieldAt(int aPos, DwField* aField);
+    void RemoveField(DwField* aField);
+    void DeleteAllFields();
+    static DwHeaders* NewHeaders(const DwString& aStr,
+        DwMessageComponent* aParent);
+    static DwHeaders* (*sNewHeaders)(const DwString&, DwMessageComponent*);
+
+protected:
+
+    void _AddField(DwField* aField);
+    DwField* mFirstField;
+
+protected:
+
+    static const char* const sClassName;
+    void CopyFields(DwField* aFirst);
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+};
+
+

+ DESCRIPTION +

+

+DwHeaders represents the collection of header fields +(often called just headers) in an entity (either a message +or body part), as described in RFC-822 and RFC-2045. A +DwHeaders object manages a list of +DwField objects, which represent +the individual header fields. +

+In the tree (broken-down) representation of a message, a +DwHeaders object is an intermediate node, having both a parent +node and several child nodes. The parent node is the +DwEntity object that contains it. +The child nodes are the DwField objects in the list it manages. +(See the man page for +DwMessageComponent for a discussion +of the tree representation of a message.) +

+Normally, you do not create a DwHeaders object directly, +but you access it through the Headers() member function of +DwEntity, which creates the DwHeaders object +for you. +

+While DwHeaders has public member functions for managing +the list of DwField objects it contains, you will normally +use convenience functions to access the field bodies of the header fields +directly. You can access the field body for a specific well-known header +field by using the member function +<Field>(), where +<Field> is the field name of the header field with +hyphens removed and the first word following a hyphen capitalized. For example, +to access the field body for the "MIME-version" header field, use +MimeVersion(). The member function +<Field>() will create a header field with field +name <Field> if such a header +field does not already exist. You can check for the existence of a particular +well-known header field by using the member function +Has<Field>(). For example, to check for the +existence of the MIME-version header field, use +HasMimeVersion(). Well-known header fields are those documented +in RFC-822 (standard email), RFC-1036 (USENET messages), RFC-2045 (MIME +messages), and possibly other RFCs. +

+In the case of an extension field or user-defined field, you can access the +field body of the header field by calling the member function +FieldBody() with the field name as its argument. If the extension +field or user-defined field does not exist, FieldBody() will +create it. You can check for the existence of an extension field or user-defined +field by using the member function HasField() with the field +name as its argument. +

+DwHeaders has several other member functions provided for +the sake of completeness that are not required for most applications. These +functions are documented below. +

+ Public Member Functions +

+

+ DwHeaders()
+DwHeaders(const DwHeaders& aHeaders)
+DwHeaders(const DwString& aStr, DwMessageComponent* aParent=0) +
+

+The first constructor is the default constructor, which sets the +DwHeaders object's string representation to the empty string +and sets its parent to NULL. +

+The second constructor is the copy constructor, which performs a deep copy +of aHeaders. The parent of the new +DwHeaders object is set to NULL. +

+The third constructor copies aStr to the +DwHeaders object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwEntity. +

+ const DwHeaders& operator = +(const DwHeaders& aHeaders) +

+This is the assignment operator, which performs a deep copy of +aHeaders. The parent node of the +DwHeaders object is not changed. +

+ virtual void Parse() +

+This virtual function, inherited from DwMessageComponent, +executes the parse method for DwHeaders objects. The parse +method creates or updates the broken-down representation from the string +representation. For DwHeaders objects, +DwHeaders::Parse() parses the string representation to create +a list of DwField objects. This member function also calls +the Parse() member function of each +DwField object in its list. +

+You should call this member function after you set or modify the string +representation, and before you access any of the header fields. +

+This function clears the is-modified flag. +

+ virtual void Assemble() + +

+This virtual function, inherited from DwMessageComponent, +executes the assemble method for DwHeaders objects. The assemble +method creates or updates the string representation from the broken-down +representation. That is, the assemble method builds the string representation +from its list of DwField objects. Before it builds the string +representation, this function first calls the Assemble() +member function of each DwField object in its list. +

+You should call this member function after you set or modify any of the header +fields, and before you retrieve the string representation. +

+This function clears the is-modified flag. +

+ virtual DwMessageComponent* +Clone() const +

+This virtual function, inherited from DwMessageComponent, +creates a new DwHeaders on the free store that has the same +value as this DwHeaders object. The basic idea is that of +a virtual copy constructor. +

+ DwBool HasBcc() const
+DwBool HasCc() const
+DwBool HasComments() const
+DwBool HasDate() const
+DwBool HasEncrypted() const
+DwBool HasFrom() const
+DwBool HasInReplyTo() const
+DwBool HasKeywords() const
+DwBool HasMessageId() const
+DwBool HasReceived() const
+DwBool HasReferences() const
+DwBool HasReplyTo() const
+DwBool HasResentBcc() const
+DwBool HasResentCc() const
+DwBool HasResentDate() const
+DwBool HasResentFrom() const
+DwBool HasResentMessageId() const
+DwBool HasResentReplyTo() const
+DwBool HasResentSender() const
+DwBool HasResentTo() const
+DwBool HasReturnPath() const
+DwBool HasSender() const
+DwBool HasSubject() const
+DwBool HasTo() const
+DwBool HasApproved() const
+DwBool HasControl() const
+DwBool HasDistribution() const
+DwBool HasExpires() const
+DwBool HasFollowupTo() const
+DwBool HasLines() const
+DwBool HasNewsgroups() const
+DwBool HasOrganization() const
+DwBool HasPath() const
+DwBool HasSummary() const
+DwBool HasXref() const
+DwBool HasContentDescription() const
+DwBool HasContentId() const
+DwBool HasContentTransferEncoding() +const
+DwBool HasCte() const
+DwBool HasContentType() const
+DwBool HasMimeVersion() const
+DwBool HasContentDisposition() const +
+

+Each member function in this group returns a boolean value indicating whether +a particular well-known header field is present in this object's collection +of header fields. +

+ DwBool HasField(const char* +aFieldName) const
+DwBool HasField(const DwString& aFieldName) const
+

+Returns true if the header field specified by aFieldName +is present in this object's collection of header fields. These member functions +are used for extension fields or user-defined fields. +

+ DwAddressList& Bcc()
+DwAddressList& Cc()
+DwText& Comments()
+DwDateTime& Date()
+DwText& Encrypted()
+DwMailboxList& From()
+DwText& InReplyTo()
+DwText& Keywords()
+DwMsgId& MessageId()
+DwText& Received()
+DwText& References()
+DwAddressList& ReplyTo()
+DwAddressList& ResentBcc()
+DwAddressList& ResentCc()
+DwDateTime& ResentDate()
+DwMailboxList& ResentFrom()
+DwMsgId& ResentMessageId()
+DwAddressList& ResentReplyTo()
+DwMailbox& ResentSender()
+DwAddressList& ResentTo()
+DwAddress& ReturnPath()
+DwMailbox& Sender()
+DwText& Subject()
+DwAddressList& To()
+DwText& Approved()
+DwText& Control()
+DwText& Distribution()
+DwText& Expires()
+DwText& FollowupTo()
+DwText& Lines()
+DwText& Newsgroups()
+DwText& Organization()
+DwText& Path()
+DwText& Summary()
+DwText& Xref()
+DwText& ContentDescription()
+DwMsgId& ContentId()
+DwMechanism& +ContentTransferEncoding()
+DwMechanism& Cte()
+DwMediaType& ContentType()
+DwText& MimeVersion()
+DwDispositionType& ContentDisposition() +
+

+Each member function in this group returns a reference to a +DwFieldBody object for a particular header field. If the +header field does not already exist, it is created. Use the corresponding +Has<Field>() function to test if the header +field already exists without creating it. +

+ DwFieldBody& FieldBody(const +DwString& aFieldName) +

+Returns a reference to the DwFieldBody object for a particular +header field with field name aFieldName. If the header field +does not already exist, it is created. Use HasField() to +test if the header field already exists without creating it. This member +function allows access to extension fields or user-defined fields. +

+ int NumFields() const + +

+Returns the number of DwField objects contained by this +DwHeaders object. +

+ DwField* FirstField() const + +

+Returns a pointer to the first DwField object contained by +this DwHeaders object. Use this member function to begin +an iteration over the entire list of DwField objects. Continue +the iteration by calling DwField::Next() on each +DwField object. +

+ DwField* FindField(const char* +aFieldName) const
+DwField* FindField(const DwString& aFieldName) const
+

+Searches for a header field by its field name. Returns +NULL if the field is not found. This is an advanced +function: most applications should use the +<Field>() or +Has<Field>() family of functions. +

+ void +AddOrReplaceField(DwField* aField) + +

+Adds a DwField object to the list. If a header field with +the same field name already exists, it is replaced by the new header field. +

+DwHeaders takes responsibility for deleting the added +DwField object. +

+This is an advanced function. Consider using the member functions +<Field>() (e.g. To(), +ContentType(), and so on) and FieldBody() +to add header fields. +

+ void AddField(DwField* aField) + +

+Adds a DwField object to the list. If a header field with +the same field name already exists, it is not replaced; thus, duplicate +header fields may occur when using this member function. (This is what you +want for some header fields, such as the "Received" header field). +

+DwHeaders takes responsibility for deleting the added +DwField object. +

+This is an advanced function. Consider using the member functions +<Field>() (e.g. To(), +ContentType(), and so on) and FieldBody() +for adding header fields. +

+ void AddFieldAt(int aPos, +DwField* aField) +

+This member functions follows the semantics of AddField() +except that aPos specifies a position for adding the field. +A position of 1 indicates the beginning of the list. A position of 0 indicates +the end of the list. +

+This is an advanced function. Consider using the member functions +<Field>() (e.g. To(), +ContentType(), and so on) and FieldBody() +for adding header fields. +

+ void RemoveField(DwField* +aField) +

+Removes the DwField object from the list. The +DwField object is not deleted. +

+ void DeleteAllFields() + +

+Removes all DwField objects from the list and deletes them. +

+ static DwHeaders* +NewHeaders(const DwString& aStr, DwMessageComponent* +aParent) +

+Creates a new DwHeaders object on the free store. If the +static data member sNewHeaders is NULL, this +member function will create a new DwHeaders and return it. +Otherwise, NewHeaders() will call the user-supplied function +pointed to by sNewHeaders, which is assumed to return an +object from a class derived from DwHeaders, and return that +object. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +It will also call PrintDebugInfo() for any of its child +components down to a level of aDepth. +

+This member function is available only in the debug version of the library. +

+ virtual void +CheckInvariants() const +

+Aborts if one of the invariants of the object fails. Use this member function +to track down bugs. +

+This member function is available only in the debug version of the library. +

+

+ Public Data Members +

+

+ static DwHeaders* +(*sNewHeaders)(const DwString&, +DwMessageComponent*) +

+If sNewHeaders is not NULL, it is assumed +to point to a user-supplied function that returns an object from a class +derived from DwHeaders. +

+ diff --git a/mimelib/doc/mailbox.html b/mimelib/doc/mailbox.html new file mode 100644 index 00000000..492070cc --- /dev/null +++ b/mimelib/doc/mailbox.html @@ -0,0 +1,238 @@ + + + DwMailbox Man Page + + +

+ NAME +

+

+DwMailbox -- Class representing an RFC-822 mailbox +

+ SYNOPSIS +

+
class DW_EXPORT DwMailbox : public DwAddress {
+
+    friend class DwMailboxList;
+
+public:
+
+    DwMailbox();
+    DwMailbox(const DwMailbox& aMailbox);
+    DwMailbox(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwMailbox();
+    const DwMailbox& operator = (const DwMailbox& aMailbox);
+    virtual void Parse();
+    virtual void Assemble();
+    virtual DwMessageComponent* Clone() const;
+    const DwString& FullName() const;
+    void SetFullName(const DwString& aFullName);
+    const DwString& Route() const;
+    void SetRoute(const DwString& aRoute);
+    const DwString& LocalPart() const;
+    void SetLocalPart(const DwString& aLocalPart);
+    const DwString& Domain() const;
+    void SetDomain(const DwString& aDomain);
+    static DwMailbox* NewMailbox(const DwString& aStr, DwMessageComponent*
+        aParent);
+    static DwMailbox* (*sNewMailbox)(const DwString&, DwMessageComponent*);
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+RFC-822 defines a mailbox as an entity that can be the recipient of +a message. A mailbox is more specific than an address, which may be +either a mailbox or a group. An RFC-822 mailbox contains a full name, +a local-part, an optional route, and a domain. For example, +in the mailbox +

+Joe Schmoe <jschmoe@aol.co> +

+"Joe Schmoe" is the full name, "jschmoe" is the local-part, and "aol.com" +is the domain. The optional route is rarely seen in current usage, and is +deprecated according to RFC-1123. +

+In MIME++, an RFC-822 mailbox is represented by a +DwMailbox object. DwMailbox is a subclass +of DwAddress, which reflects the +fact that a mailbox is also an address. A DwMailbox contains +strings representing the full name, local-part, route, and domain of a mailbox. +

+In the tree (broken-down) representation of message, a +DwMailbox object may be only a leaf node, having a parent +but no child nodes. Its parent node must be a +DwField, a +DwAddressList, or a +DwMailboxList object. +

+DwMailbox has member functions for getting or setting the +strings it contains. +

+DwMailbox object can be included in a list of +DwMailbox objects. To get the next +DwMailbox object in a list, use the inherited member function +DwAddress::Next(). +

+ Public Member Functions +

+

+ DwMailbox()
+DwMailbox(const DwMailbox& aMailbox)
+DwMailbox(const DwString& aStr, DwMessageComponent* aParent=0) +
+

+The first constructor is the default constructor, which sets the +DwMailbox object's string representation to the empty string +and sets its parent to NULL. +

+The second constructor is the copy constructor, which performs a deep copy +of aMailbox. The parent of the new +DwMailbox is set to NULL. +

+The third constructor copies aStr to the +DwMailbox object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwField. +

+ const DwMailbox& operator = +(const DwMailbox& aMailbox) +

+This is the assignment operator, which performs a deep copy of +aMailbox. The parent node of the +DwMailbox object is not changed. +

+ virtual void Parse() +

+This virtual function, inherited from DwMessageComponent, +executes the parse method for DwMailbox objects. The parse +method creates or updates the broken-down representation from the string +representation. For DwMailbox objects, the parse method parses +the string representation into the substrings for the full name, local-part, +route, and domain. +

+You should call this member function after you set or modify the string +representation, and before you retrieve the full name, local-part, route, +or domain. +

+This function clears the is-modified flag. +

+ virtual void Assemble() + +

+This virtual function, inherited from DwMessageComponent, +executes the assemble method for DwMailbox objects. The assemble +method creates or updates the string representation from the broken-down +representation. For DwMailbox objects, the assemble method +builds the string representation from the full name, local-part, route, and +domain strings. +

+You should call this member function after you modify the full name, local-part, +route, or domain, and before you retrieve the string representation. +

+This function clears the is-modified flag. +

+ virtual DwMessageComponent* +Clone() const +

+This virtual function, inherited from DwMessageComponent, +creates a new DwMailbox on the free store that has the same +value as this DwMailbox object. The basic idea is that of +a virtual copy constructor. +

+ const DwString& FullName() +const +

+Returns the full name for this DwMailbox object. +

+ void SetFullName(const +DwString& aFullName) +

+Sets the full name for this DwMailbox object. +

+ const DwString& Route() const + +

+Returns the route for this DwMailbox object. +

+ void SetRoute(const DwString& +aRoute) +

+Sets the route for this DwMailbox object. +

+ const DwString& +LocalPart() const +

+Returns the local-part for this DwMailbox object. +

+ void SetLocalPart(const +DwString& aLocalPart) +

+Sets the local-part for this DwMailbox object. +

+ const DwString& Domain() +const +

+Returns the domain for this DwMailbox object. +

+ void SetDomain(const +DwString& aDomain) +

+Sets the domain for this DwMailbox object. +

+ static DwMailbox* +NewMailbox(const DwString& aStr, DwMessageComponent* +aParent) +

+Creates a new DwMailbox object on the free store. If the +static data member sNewMailbox is NULL, this +member function will create a new DwMailbox and return it. +Otherwise, NewMailbox() will call the user-supplied function +pointed to by sNewMailbox, which is assumed to return an +object from a class derived from DwMailbox, and return that +object. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +It will also call PrintDebugInfo() for any of its child +components down to a level of aDepth. +

+This member function is available only in the debug version of the library. +

+ virtual void +CheckInvariants() const +

+Aborts if one of the invariants of the object fails. Use this member function +to track down bugs. +

+This member function is available only in the debug version of the library. +

+ Public Data Members +

+

+ static DwMailbox* +(*sNewMailbox)(const DwString&, +DwMessageComponent*) +

+If sNewMailbox is not NULL, it is assumed +to point to a user-supplied function that returns an object from a class +derived from DwMailbox. +

+ diff --git a/mimelib/doc/mboxlist.html b/mimelib/doc/mboxlist.html new file mode 100644 index 00000000..2bae2b4e --- /dev/null +++ b/mimelib/doc/mboxlist.html @@ -0,0 +1,232 @@ + + + DwMailboxList Man Page + + +

+ NAME +

+

+DwMailboxList -- Class representing a list of RFC-822 mailboxes +

+ SYNOPSIS +

+
class DW_EXPORT DwMailboxList : public DwFieldBody {
+
+public:
+
+    DwMailboxList();
+    DwMailboxList(const DwMailboxList& aList);
+    DwMailboxList(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwMailboxList();
+    const DwMailboxList& operator = (const DwMailboxList& aList);
+    virtual void Parse();
+    virtual void Assemble();
+    virtual DwMessageComponent* Clone() const;
+    DwMailbox* FirstMailbox() const;
+    void Add(DwMailbox* aMailbox);
+    void Remove(DwMailbox* aMailbox);
+    void DeleteAll();
+    static DwMailboxList* NewMailboxList(const DwString& aStr,
+        DwMessageComponent* aParent);
+    static DwMailboxList* (*sNewMailboxList)(const DwString&,
+        DwMessageComponent*);
+
+protected:
+
+    DwMailbox* mFirstMailbox;
+    void _AddMailbox(DwMailbox* aMailbox);
+    void _DeleteAll();
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+DwMailboxList represents a list of mailboxes as described +in RFC-822. In MIME++, DwMailboxList is a container for objects +of type DwMailbox, and it contains +various member functions to manage its contained objects. +DwAddressList is also a +DwFieldBody. This reflects the +fact that certain RFC-822 header fields, such as the "From" header field, +have a list of mailboxes as their field bodies. +

+ Public Member Functions +

+

+ DwMailboxList()
+DwMailboxList(const DwMailboxList& aList)
+DwMailboxList(const DwString& aStr, DwMessageComponent* aParent=0) +
+

+The first constructor is the default constructor, which sets the +DwMailboxList object's string representation to the empty +string and sets its parent to NULL. +

+The second constructor is the copy constructor, which copies the string +representation and all DwMailbox objects from +aList. The parent of the new +DwMailboxList object is set to NULL. +

+The third constructor copies aStr to the +DwMailboxList object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwField. +

+ const DwMailboxList& operator += (const DwMailboxList& aList) +

+This is the assignment operator, which performs a deep copy of +aList. The parent node of the +DwMailboxList object is not changed. +

+ virtual void Parse() +

+This virtual function, inherited from DwMessageComponent, +executes the parse method for DwMailboxList objects. The +parse method creates or updates the broken-down representation from the string +representation. For DwMailboxList objects, the parse method +parses the string representation to create a list of +DwMailbox objects. This member function also calls the +Parse() member function of each DwMailbox +object in its list. +

+You should call this member function after you set or modify the string +representation, and before you access any of the contained +DwMailbox objects. +

+This function clears the is-modified flag. +

+ virtual void Assemble() + +

+This virtual function, inherited from DwMessageComponent, +executes the assemble method for DwMailboxList objects. The +assemble method creates or updates the string representation from the broken-down +representation. For DwMailboxList objects, the assemble method +builds the string representation from its list of +DwMailbox objects. Before it builds the string representation +for the DwMailboxList object, this function first calls the +Assemble() member function of each +DwMailbox object in its list. +

+You should call this member function after you set or modify any of the contained +DwMailbox objects, and before you retrieve the string +representation. +

+This function clears the is-modified flag. +

+ virtual DwMessageComponent* +Clone() const +

+This virtual function, inherited from DwMessageComponent, +creates a new DwMailboxList on the free store that has the +same value as this DwMailboxList object. The basic idea is +that of a virtual copy constructor. +

+ DwMailbox* FirstMailbox() +const +

+Gets the first DwMailbox object in the list. Use the member +function DwMailbox::Next() to iterate. Returns +NULL if the list is empty. +

+ void Add(DwMailbox* aMailbox) + +

+Adds aMailbox to the end of the list of +DwMailbox objects maintained by this +DwMailboxList object. +

+ void Remove(DwMailbox* aMailbox) + +

+Removes aMailbox from the list of +DwMailbox objects maintained by this +DwMailboxList object. The DwMailbox object +is not deleted by this member function. +

+ void DeleteAll() +

+Removes and deletes all DwMailbox objects from the list +maintained by this DwMailboxList object. +

+ static DwMailboxList* +NewMailboxList(const DwString& aStr, +DwMessageComponent* aParent) +

+Creates a new DwMailboxList object on the free store. If +the static data member sNewMailboxList is +NULL, this member function will create a new +DwMailboxList and return it. Otherwise, +NewMailboxList() will call the user-supplied function pointed +to by sNewMailboxList, which is assumed to return an object +from a class derived from DwMailboxList, and return that +object. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +It will also call PrintDebugInfo() for any of its child +components down to a level of aDepth. +

+This member function is available only in the debug version of the library. +

+ virtual void +CheckInvariants() const +

+Aborts if one of the invariants of the object fails. Use this member function +to track down bugs. +

+This member function is available only in the debug version of the library. +

+ Public Data Members +

+

+ static DwMailboxList* +(*sNewMailboxList)(const DwString&, +DwMessageComponent*) +

+If sNewMailboxList is not NULL, it is assumed +to point to a user-supplied function that returns an object from a class +derived from DwMailboxList. +

+ Protected Member Functions +

+

+ void _AddMailbox(DwMailbox* +aMailbox) +

+Adds a mailbox, but does not set the is-modified flag. +

+ void _DeleteAll() +

+Removes and deletes all DwMailbox objects from the list +maintained by this DwMailboxList object. Doesn't set the +is-modified flag. +

+ Protected Data Members +

+

+ DwMailbox* mFirstMailbox + +

+Points to first DwMailbox object in list. +

+ diff --git a/mimelib/doc/mechansm.html b/mimelib/doc/mechansm.html new file mode 100644 index 00000000..9880b5fa --- /dev/null +++ b/mimelib/doc/mechansm.html @@ -0,0 +1,172 @@ + + + DwMechanism Man Page + + +

+ NAME +

+

+DwMechanism -- Class representing a MIME content-transfer-encoding field-body +

+ SYNOPSIS +

+
class DW_EXPORT DwMechanism : public DwFieldBody {
+
+public:
+
+    DwMechanism();
+    DwMechanism(const DwMechanism& aCte);
+    DwMechanism(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwMechanism();
+    const DwMechanism& operator = (const DwMechanism& aCte);
+    virtual void Parse();
+    virtual void Assemble();
+    virtual DwMessageComponent* Clone() const;
+    int AsEnum() const;
+    void FromEnum(int aCte);
+    static DwMechanism*
+        NewMechanism(const DwString& aStr, DwMessageComponent* aParent);
+    static DwMechanism*
+        (*sNewMechanism)(const DwString&, DwMessageComponent*);
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+DwMechanism represents a field body for the +Content-Transfer-Encoding header field as described in RFC-2045. +DwMechanism provides convenience functions that allow you +to set or get the content-transfer-encoding attribute as an enumerated value. +

+ Public Member Functions +

+

+ DwMechanism()
+DwMechanism(const DwMechanism& aCte)
+DwMechanism(const DwString& aStr, DwMessageComponent* aParent=0) +
+

+The first constructor is the default constructor, which sets the +DwMechanism object's string representation to the empty string +and sets its parent to NULL. +

+The second constructor is the copy constructor, which copies the string +representation from aCte. The parent of the new +DwMechanism object is set to NULL. +

+The third constructor copies aStr to the +DwMechanism object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwField. +

+ const DwMechanism& operator = +(const DwMechanism& aCte) +

+This is the assignment operator, which performs a deep copy of +aCte. The parent node of the DwMechanism +object is not changed. +

+ virtual void Parse() +

+This virtual function, inherited from DwMessageComponent, +executes the parse method for DwMechanism objects. It should +be called immediately after the string representation is modified and before +any of the object's attributes are retrieved. +

+This function clears the is-modified flag. +

+ virtual void Assemble() + +

+This virtual function, inherited from DwMessageComponent, +executes the assemble method for DwMechanism objects. It +should be called whenever one of the object's attributes is changed in order +to assemble the string representation. It will be called automatically for +this object by the parent object's Assemble() member function +if the is-modified flag is set. +

+This function clears the is-modified flag. +

+ virtual DwMessageComponent* +Clone() const +

+This virtual function, inherited from DwMessageComponent, +creates a new DwMechanism object on the free store that has +the same value as this DwMechanism object. The basic idea +is that of a virtual copy constructor. +

+ int AsEnum() const +

+Returns the content transfer encoding as an enumerated value. Enumerated +values are defined for all standard content transfer encodings in the file +enum.h. If the content transfer encoding is non-standard +DwMime::kCteUnknown is returned. The inherited member function +DwMessageComponent::AsString() may be used to get the content +transfer encoding, standard or non-standard, as a string. +

+ void FromEnum(int aCte) + +

+Sets the content transfer encoding from an enumerated value. Enumerated values +are defined for all standard content transfer encodings in the file enum.h. +You may set the content transfer encoding to any string value, standard or +non-standard, by using the inherited member function +DwMessageComponent::FromString(). +

+ static DwMechanism* +NewMechanism(const DwString& aStr, +DwMessageComponent* aParent) +

+Creates a new DwMechanism object on the free store. If the +static data member sNewMechanism is NULL, +this member function will create a new DwMechanism and return +it. Otherwise, NewMechanism() will call the user-supplied +function pointed to by sNewMechanism, which is assumed to +return an object from a class derived from DwMechanism, and +return that object. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +It will also call PrintDebugInfo() for any of its child +components down to a level of aDepth. +

+This member function is available only in the debug version of the library. +

+ virtual void +CheckInvariants() const +

+Aborts if one of the invariants of the object fails. Use this member function +to track down bugs. +

+This member function is available only in the debug version of the library. +

+ Public Data Members +

+

+ static DwMechanism* +(*sNewMechanism)(const DwString&, +DwMessageComponent*) +

+If sNewMechanism is not NULL, it is assumed +to point to a user-supplied function that returns an object from a class +derived from DwMechanism. +

+ diff --git a/mimelib/doc/mediatyp.html b/mimelib/doc/mediatyp.html new file mode 100644 index 00000000..01696084 --- /dev/null +++ b/mimelib/doc/mediatyp.html @@ -0,0 +1,311 @@ + + + DwMediaType Man Page + + +

+ NAME +

+

+DwMediaType -- Class representing a MIME media-type +

+ SYNOPSIS +

+
class DW_EXPORT DwMediaType : public DwFieldBody {
+
+public:
+
+    DwMediaType();
+    DwMediaType(const DwMediaType& aMediaType);
+    DwMediaType(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwMediaType();
+    const DwMediaType& operator = (const DwMediaType& aMediaType);
+    virtual void Parse();
+    virtual void Assemble();
+    virtual DwMessageComponent* Clone() const;
+    int Type() const;
+    void SetType(int aType);
+    const DwString& TypeStr() const;
+    void SetTypeStr(const DwString& aStr);
+    int Subtype() const;
+    void SetSubtype(int aSubtype);
+    const DwString& SubtypeStr() const;
+    void SetSubtypeStr(const DwString& aStr);
+    const DwString& Boundary() const;
+    void SetBoundary(const DwString& aStr);
+    virtual void CreateBoundary(unsigned aLevel=0);
+    const DwString& Name() const;
+    void SetName(const DwString& aStr);
+    DwParameter* FirstParameter() const;
+    void AddParameter(DwParameter* aParam);
+    static DwMediaType* NewMediaType(const DwString& aStr,
+        DwMessageComponent* aParent);
+    static DwMediaType* (*sNewMediaType)(const DwString&,
+        DwMessageComponent*);
+
+protected:
+
+    void _AddParameter(DwParameter* aParam);
+    virtual void TypeEnumToStr();
+    virtual void TypeStrToEnum();
+    virtual void SubtypeEnumToStr();
+    virtual void SubtypeStrToEnum();
+    void DeleteParameterList();
+    void CopyParameterList(DwParameter* aFirst);
+    int mType;
+    int mSubtype;
+    DwString mTypeStr;
+    DwString mSubtypeStr;
+    DwString mBoundaryStr;
+    DwString mNameStr;
+    DwParameter* mFirstParameter;
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+    virtual void CheckInvariants() const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+DwMediaType represents a field body for the Content-Type +header field as described in RFC-2045. This field body specifies the kind +of data contained in the body of a message or a body part. A media type is +described by two keywords: a primary type (or just type) and a +subtype. RFC-2046 specifies the seven primary types text, multipart, +message, image, audio, video, and application. RFC-2077 adds the new primary +type model. +

+DwMediaType has member functions that allow you to set or +get the type and subtype as either enumerated values or as strings. It also +contains a list of +DwParameter objects that represent +the parameters of the field body. You can use convenience functions to directly +access the boundary parameter of a multipart media type, or to access the +name parameter that is often used with several media types, such as +application/octet-stream. +

+Some MIME parsers have problems with folded header fields, and this especially +seems to be a problem with the Content-Type field. To disable folding when +the DwMediaType object is assembled, call the inherited member +function DwFieldBody::SetFolding() with an argument of +DwFalse. +

+ Public Member Functions +

+

+ DwMediaType()
+DwMediaType(const DwMediaType& aMediaType)
+DwMediaType(const DwString& aStr, DwMessageComponent* aParent=0) +
+

+The first constructor is the default constructor, which sets the +DwMediaType object's string representation to the empty string +and sets its parent to NULL. +

+The second constructor is the copy constructor, which performs deep copy +of aMediaType. The parent of the new +DwMediaType object is set to NULL. +

+The third constructor copies aStr to the +DwMediaType object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. Unless it is +NULL, aParent should point to an object of +a class derived from DwField. +

+ const DwMediaType& operator = +(const DwMediaType& aMediaType) +

+This is the assignment operator, which performs a deep copy of +aMediaType. The parent node of the +DwMediaType object is not changed. +

+ virtual void Parse() +

+This virtual function, inherited from DwMessageComponent, +executes the parse method for DwMediaType objects. It should +be called immediately after the string representation is modified and before +the parts of the broken-down representation are accessed. +

+This function clears the is-modified flag. +

+ virtual void Assemble() + +

+This virtual function, inherited from DwMessageComponent, +executes the assemble method for DwMediaType objects. It +should be called whenever one of the object's attributes is changed in order +to assemble the string representation from its broken-down representation. +It will be called automatically for this object by the parent object's +Assemble() member function if the is-modified flag is set. +

+This function clears the is-modified flag. +

+ virtual DwMessageComponent* +Clone() const +

+This virtual function, inherited from DwMessageComponent, +creates a new DwMediaType object on the free store that has +the same value as this DwMediaType object. The basic idea +is that of a virtual copy constructor. +

+ int Type() const +

+Returns the primary type as an enumerated value. Enumerated values are defined +for all standard types in the file enum.h. If the type is non-standard, +DwMime::kTypeUnknown is returned. The member function +TypeStr() may be used to get the value of any type, standard +or non-standard, as a string. +

+ void SetType(int aType) + +

+Sets the primary type from the enumerated value aType. Enumerated +values are defined for all standard types in the file enum.h. The member +function SetTypeStr() may be used to set the value of any +type, standard or non-standard, from a string. +

+ const DwString& TypeStr() +const +

+Returns the primary type as a string. +

+ void SetTypeStr(const +DwString& aStr) +

+Sets the primary type from a string. +

+ int Subtype() const +

+Returns the subtype as an enumerated value. Enumerated values are defined +for all standard subtypes in the file enum.h. If the subtype is non-standard, +DwMime::kSubtypeUnknown is returned. The member function +SubtypeStr() may be used to get the value of any subtype, +standard or non-standard, as a string. +

+ void SetSubtype(int aSubtype) + +

+Sets the subtype from the enumerated value aSubtype. Enumerated +values are defined for all standard subtypes in the file enum.h. The member +function SetSubtypeStr() may be used to set the value of +any subtype, standard or non-standard, from a string. +

+ const DwString& +SubtypeStr() const +

+Returns the subtype as a string. +

+ void SetSubtypeStr(const +DwString& aStr) +

+Sets the subtype from a string. +

+ const DwString& Boundary() +const +

+For the multipart type only, returns the value of the boundary parameter. +This member function is a convenience function that searches the list of +DwParameter objects. +

+ void SetBoundary(const +DwString& aStr) +

+For the multipart type only, sets the value of the boundary parameter. This +member function is a convenience function that accesses the list of +DwParameter objects. +

+ virtual void +CreateBoundary(unsigned aLevel=0) +

+For the multipart type only, creates a boundary string. +aLevel indicates the level of a nested multipart body part; +if it is positive, it is used to form part of the created boundary string. +This member function is a convenience function that accesses the list of +child DwParameter objects. +

+ const DwString& Name() const + +

+Returns the value of the "name" parameter, if such a parameter is present. +The name parameter is often found in several media types, including the +application/octet-stream media type; it suggests a file name for saving to +a disk file. (The filename parameter in the Content-Disposition header field +is an alternative way to indicate a file name.) This member function is a +convenience function that searches the list of +DwParameter objects. +

+ void SetName(const DwString& +aStr) +

+Sets the value of the "name" parameter. If a name parameter is not already +present, it is added. The name parameter is often found in several media +types, including the application/octet-stream media type; it suggests a file +name for saving to a disk file. (The filename parameter in the +Content-Disposition header field is an alternative way to indicate a file +name.) This member function is a convenience function that accesses the list +of DwParameter objects. +

+ DwParameter* +FirstParameter() const +

+Returns the first DwParameter object in the list managed +by this DwMediaType object. Use +DwParameter::Next() to iterate through the list. +

+ void +AddParameter(DwParameter* aParam) +

+Adds a DwParameter object to the list managed by this +DwMediaType object. +

+ static DwMediaType* +NewMediaType(const DwString& aStr, +DwMessageComponent* aParent) +

+Creates a new DwMediaType object on the free store. If the +static data member sNewMediaType is NULL, +this member function will create a new DwMediaType and return +it. Otherwise, NewMediaType() will call the user-supplied +function pointed to by sNewMediaType, which is assumed to +return an object from a class derived from DwMediaType, and +return that object. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +It will also call PrintDebugInfo() for any of its child +components down to a level of aDepth. +

+This member function is available only in the debug version of the library. +

+ virtual void +CheckInvariants() const +

+Aborts if one of the invariants of the object fails. Use this member function +to track down bugs. +

+This member function is available only in the debug version of the library. +

+ Public Data Members +

+

+ static DwMediaType* +(*sNewMediaType)(const DwString&, +DwMessageComponent*) +

+If sNewMediaType is not NULL, it is assumed +to point to a user-supplied function that returns an object from a class +derived from DwMediaType. + diff --git a/mimelib/doc/message.html b/mimelib/doc/message.html new file mode 100644 index 00000000..d08d5af4 --- /dev/null +++ b/mimelib/doc/message.html @@ -0,0 +1,136 @@ + + + DwMessage Man Page + + +

+ NAME +

+

+DwMessage -- Class representing an RFC-822/MIME message +

+ SYNOPSIS +

+
class DW_EXPORT DwMessage : public DwEntity {
+
+public:
+
+    DwMessage();
+    DwMessage(const DwMessage& aMessage);
+    DwMessage(const DwString& aStr, DwMessageComponent* aParent=0);
+    virtual ~DwMessage();
+    const DwMessage& operator = (const DwMessage& aMessage);
+    virtual DwMessageComponent* Clone() const;
+    static DwMessage* NewMessage(const DwString& aStr,
+        DwMessageComponent* aParent);
+    static DwMessage* (*sNewMessage)(const DwString&, DwMessageComponent*);
+
+public:
+
+    virtual void PrintDebugInfo(ostream& aStrm, int aDepth=0) const;
+
+protected:
+
+    void _PrintDebugInfo(ostream& aStrm) const;
+};
+
+

+ DESCRIPTION +

+

+DwMessage represents an RFC-822/MIME message. +

+A message contains both a collection of header fields and a +body. In the terminology of RFC-2045, the general term for the +headers-body combination is entity. In MIME++, +DwMessage is a direct subclass of +DwEntity, and therefore contains +both a DwHeaders object and a +DwBody object. +

+In the tree (broken-down) representation of message, a +DwMessage object is almost always a root node, having child +nodes but no parent node. The child nodes are the +DwHeaders object and the DwBody object it +contains. A DwMessage may sometimes be an intermediate node. +In this special case, the parent node is a DwBody object +of type "message/*" and the DwMessage object represents an +encapsulated message. +

+To access the contained DwHeaders object, use the inherited +member function DwEntity::Headers(). To access the contained +DwBody object, use the inherited member function +DwEntity::Body(). +

+ Public Member Functions +

+

+ DwMessage()
+DwMessage(const DwMessage& aMessage)
+DwMessage(const DwString& aStr, DwMessageComponent* aParent=0) +
+

+The first constructor is the default constructor, which sets the +DwMessage object's string representation to the empty string +and sets its parent to NULL. +

+The second constructor is the copy constructor, which performs a deep copy +of aMessage. The parent of the new +DwMessage object is set to NULL. +

+The third constructor copies aStr to the +DwMessage object's string representation and sets +aParent as its parent. The virtual member function +Parse() should be called immediately after this constructor +in order to parse the string representation. +

+ const DwMessage& operator = +(const DwMessage& aMessage) +

+This is the assignment operator, which performs a deep copy of +aMessage. The parent node of the +DwMessage object is not changed. +

+ virtual DwMessageComponent* +Clone() const +

+This virtual function, inherited from DwMessageComponent, +creates a new DwMessage on the free store that has the same +value as this DwMessage object. The basic idea is that of +a ``virtual copy constructor.'' +

+ static DwMessage* +NewMessage(const DwString& aStr, DwMessageComponent* +aParent) +

+Creates a new DwMessage object on the free store. If the +static data member sNewMessage is NULL, this +member function will create a new DwMessage and return it. +Otherwise, NewMessage() will call the user-supplied function +pointed to by sNewMessage, which is assumed to return an +object from a class derived from DwMessage, and return that +object. +

+ virtual void +PrintDebugInfo(ostream& aStrm, int aDepth=0) +const +

+This virtual function, inherited from DwMessageComponent, +prints debugging information about this object to aStrm. +It will also call PrintDebugInfo() for any of its child +components down to a level of aDepth. +

+This member function is available only in the debug version of the library. +

+ Public Data Members +

+

+ static DwMessage* +(*sNewMessage)(const DwString&, +DwMessageComponent*) +

+If sNewMessage is not NULL, it is assumed +to point to a user supplied function that returns an object from a class +derived from DwMessage. +

+ diff --git a/mimelib/doc/mimepp.html b/mimelib/doc/mimepp.html new file mode 100644 index 00000000..3545ccfb --- /dev/null +++ b/mimelib/doc/mimepp.html @@ -0,0 +1,80 @@ + + + + + + MIME++ Man Page + + + + + +

NAME

+ +MIME++ -- C++ class library for creating, parsing, or modifying messages +in MIME format + + +

SYNOPSIS

+
+
+#include <mimepp/mimepp.h>
+
+ + +

DESCRIPTION

+
+MIME++ is a C++ class library for creating, parsing, or modifying messages +in Multipurpose Internet Mail Extensions (MIME) format. For information +on the MIME standards, see RFC-822, RFC-1123, RFC-1521, RFC-1522, and +RFC-1523. + + +

Class Inheritance

+
+