diff options
author | Vincent Richard <[email protected]> | 2004-12-26 20:23:29 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2004-12-26 20:23:29 +0000 |
commit | 4ce991d3b1bd97fbb896d17fb8f36f6650429a22 (patch) | |
tree | 2db6e072b862dd809d4acd8c571a1b859fdcb484 /src/fileAttachment.hpp | |
parent | Allow creating a service from an URL. (diff) | |
download | vmime-4ce991d3b1bd97fbb896d17fb8f36f6650429a22.tar.gz vmime-4ce991d3b1bd97fbb896d17fb8f36f6650429a22.zip |
Moved all header files to 'vmime/' directory.
Diffstat (limited to 'src/fileAttachment.hpp')
-rw-r--r-- | src/fileAttachment.hpp | 170 |
1 files changed, 0 insertions, 170 deletions
diff --git a/src/fileAttachment.hpp b/src/fileAttachment.hpp deleted file mode 100644 index f38b6d79..00000000 --- a/src/fileAttachment.hpp +++ /dev/null @@ -1,170 +0,0 @@ -// -// VMime library (http://vmime.sourceforge.net) -// Copyright (C) 2002-2004 Vincent Richard <[email protected]> -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of -// the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// - -#ifndef VMIME_FILEATTACHMENT_HPP_INCLUDED -#define VMIME_FILEATTACHMENT_HPP_INCLUDED - - -#include "defaultAttachment.hpp" - - -namespace vmime -{ - - -/** Attachment of type 'file'. - */ - -class fileAttachment : public defaultAttachment -{ -public: - - fileAttachment(const string& filename, const mediaType& type, const text& desc = NULL_TEXT); - fileAttachment(const string& filename, const mediaType& type, const encoding& enc, const text& desc = NULL_TEXT); - - /** Stores information about a file attachment. - */ - class fileInfo - { - public: - - fileInfo(); - ~fileInfo(); - - /** Check whether the 'filename' property is present. - * - * @return true if the 'filename' property is set, - * false otherwise - */ - const bool hasFilename() const; - - /** Return the value of the 'filename' property. - * - * @return file name - */ - const string& getFilename() const; - - /** Set the value of the 'filename' property. - * - * @param name file name - */ - void setFilename(const string& name); - - /** Check whether the 'creation-date' property is present. - * - * @return true if the 'creation-date' property is set, - * false otherwise - */ - const bool hasCreationDate() const; - - /** Return the value of the 'creation-date' property. - * - * @return file creation time - */ - const datetime& getCreationDate() const; - - /** Set the value of the 'creation-date' property. - * - * @param date file creation time - */ - void setCreationDate(const datetime& date); - - /** Check whether the 'modification-date' property is present. - * - * @return true if the 'modification-date' property is set, - * false otherwise - */ - const bool hasModificationDate() const; - - /** Return the value of the 'modification-date' property. - * - * @return file modification time - */ - const datetime& getModificationDate() const; - - /** Set the value of the 'modification-date' property. - * - * @param date file modification time - */ - void setModificationDate(const datetime& date); - - /** Check whether the 'read-date' property is set. - * - * @return true if the 'read-date' property is set, - * false otherwise - */ - const bool hasReadDate() const; - - /** Return the value of the 'read-date' property. - * - * @return file access time - */ - const datetime& getReadDate() const; - - /** Set the value of the 'read-date' property. - * - * @param date file access time - */ - void setReadDate(const datetime& date); - - /** Check whether the value of the 'size' property is set. - * - * @return true if the 'size' property is set, - * false otherwise - */ - const bool hasSize() const; - - /** Return the value of the 'size' property. - * - * @return file size - */ - const unsigned int getSize() const; - - /** Set the value of the 'size' property. - * - * @param size file size - */ - void setSize(const unsigned int& size); - - private: - - string* m_filename; - unsigned int* m_size; - datetime* m_creationDate; - datetime* m_modifDate; - datetime* m_readDate; - }; - - const fileInfo& getFileInfo() const; - fileInfo& getFileInfo(); - -private: - - void setData(const string& filename); - - fileInfo m_fileInfo; - - void generatePart(bodyPart& part) const; -}; - - -} // vmime - - -#endif // VMIME_FILEATTACHMENT_HPP_INCLUDED |