00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef _MIMETIC_CONTENT_DISPOSITION_H_
00017 #define _MIMETIC_CONTENT_DISPOSITION_H_
00018 #include <string>
00019 #include <iostream>
00020 #include <mimetic/fieldparam.h>
00021 #include <mimetic/rfc822/fieldvalue.h>
00022
00023 namespace mimetic
00024 {
00025
00026
00027
00028
00029 struct ContentDisposition: public FieldValue
00030 {
00031 typedef FieldParam Param;
00032 typedef FieldParamList ParamList;
00033 public:
00034 static const char label[];
00035 ContentDisposition();
00036 ContentDisposition(const char*);
00037 ContentDisposition(const std::string&);
00038
00039 void type(const std::string&);
00040 const istring& type() const;
00041
00042 const ParamList& paramList() const;
00043 ParamList& paramList();
00044
00045 const std::string& param(const std::string&) const;
00046 void param(const std::string&, const std::string&);
00047
00048 void set(const std::string&);
00049 std::string str() const;
00050
00051 std::ostream& write(std::ostream& os, int fold = 0) const;
00052 protected:
00053 FieldValue* clone() const;
00054 private:
00055 istring m_type;
00056 ParamList m_paramList;
00057 };
00058
00059 }
00060
00061 #endif
00062