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/disptype.html | 224 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 mimelib/doc/disptype.html (limited to 'mimelib/doc/disptype.html') diff --git a/mimelib/doc/disptype.html b/mimelib/doc/disptype.html new file mode 100644 index 000000000..c64b1dc13 --- /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. +

+ -- cgit v1.2.1