1 // 2 // VMime library (http://www.vmime.org) 3 // Copyright (C) 2002-2013 Vincent Richard <vincent@vmime.org> 4 // 5 // This program is free software; you can redistribute it and/or 6 // modify it under the terms of the GNU General Public License as 7 // published by the Free Software Foundation; either version 3 of 8 // the License, or (at your option) any later version. 9 // 10 // This program is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 // General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License along 16 // with this program; if not, write to the Free Software Foundation, Inc., 17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 // 19 // Linking this library statically or dynamically with other modules is making 20 // a combined work based on this library. Thus, the terms and conditions of 21 // the GNU General Public License cover the whole combination. 22 // 23 24 #ifndef VMIME_CONTENTDISPOSITIONFIELD_HPP_INCLUDED 25 #define VMIME_CONTENTDISPOSITIONFIELD_HPP_INCLUDED 26 27 28 #include "vmime/parameterizedHeaderField.hpp" 29 30 #include "vmime/contentDisposition.hpp" 31 #include "vmime/dateTime.hpp" 32 #include "vmime/word.hpp" 33 34 35 namespace vmime 36 { 37 38 39 /** Describes presentation information, as per RFC-2183. 40 */ 41 42 class VMIME_EXPORT contentDispositionField : public parameterizedHeaderField 43 { 44 friend class headerFieldFactory; 45 46 protected: 47 48 contentDispositionField(); 49 contentDispositionField(contentDispositionField&); 50 51 public: 52 53 /** Test whether the "creation-date" parameter is set. 54 * 55 * @return true if the "creation-date" parameter is set, or false otherwise 56 */ 57 bool hasCreationDate() const; 58 59 /** Return the value of the "creation-date" parameter. 60 * 61 * @return value of the "creation-date" parameter 62 */ 63 const datetime getCreationDate() const; 64 65 /** Set the value of the "creation-date" parameter. 66 * 67 * @param creationDate new value for the "creation-date" parameter 68 */ 69 void setCreationDate(const datetime& creationDate); 70 71 /** Test whether the "modification-date" parameter is set. 72 * 73 * @return true if the "modification-date" parameter is set, or false otherwise 74 */ 75 bool hasModificationDate() const; 76 77 /** Return the value of the "modification-date" parameter. 78 * 79 * @return value of the "modification-date" parameter 80 */ 81 const datetime getModificationDate() const; 82 83 /** Set the value of the "modification-date" parameter. 84 * 85 * @param modificationDate new value for the "modification-date" parameter 86 */ 87 void setModificationDate(const datetime& modificationDate); 88 89 /** Test whether the "read-date" parameter is set. 90 * 91 * @return true if the "read-date" parameter is set, or false otherwise 92 */ 93 bool hasReadDate() const; 94 95 /** Return the value of the "read-date" parameter. 96 * 97 * @return value of the "read-date" parameter 98 */ 99 const datetime getReadDate() const; 100 101 /** Set the value of the "read-date" parameter. 102 * 103 * @param readDate new value for the "read-date" parameter 104 */ 105 void setReadDate(const datetime& readDate); 106 107 /** Test whether the "filename" parameter is set. 108 * 109 * @return true if the "filename" parameter is set, or false otherwise 110 */ 111 bool hasFilename() const; 112 113 /** Return the value of the "filename" parameter. 114 * 115 * @return value of the "filename" parameter 116 */ 117 const word getFilename() const; 118 119 /** Set the value of the "filename" parameter. 120 * 121 * @param filename new value for the "filename" parameter 122 */ 123 void setFilename(const word& filename); 124 125 /** Test whether the "size" parameter is set. 126 * 127 * @return true if the "size" parameter is set, or false otherwise 128 */ 129 bool hasSize() const; 130 131 /** Return the value of the "size" parameter. 132 * 133 * @return value of the "size" parameter 134 */ 135 const string getSize() const; 136 137 /** Set the value of the "size" parameter. 138 * 139 * @param size new value for the "size" parameter 140 */ 141 void setSize(const string& size); 142 }; 143 144 145 } // vmime 146 147 148 #endif // VMIME_CONTENTDISPOSITIONFIELD_HPP_INCLUDED 149