diff options
Diffstat (limited to '')
-rw-r--r-- | src/relay.hpp (renamed from src/relayField.hpp) | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/src/relayField.hpp b/src/relay.hpp index f24be873..8559bccd 100644 --- a/src/relayField.hpp +++ b/src/relay.hpp @@ -17,14 +17,13 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#ifndef VMIME_RELAYFIELD_HPP_INCLUDED -#define VMIME_RELAYFIELD_HPP_INCLUDED +#ifndef VMIME_RELAY_HPP_INCLUDED +#define VMIME_RELAY_HPP_INCLUDED #include "base.hpp" #include "component.hpp" -#include "headerFieldFactory.hpp" #include "dateTime.hpp" @@ -32,40 +31,44 @@ namespace vmime { -class relayField : public headerField -{ - friend class headerFieldFactory::registerer <relayField>; +/** Trace information about a relay (basic type). + */ -protected: +class relay : public component +{ +public: - relayField(); + relay(); + relay(const relay& r); public: - void copyFrom(const headerField& field); + relay* clone() const; + void copyFrom(const component& other); + relay& operator=(const relay& other); - const string& from() const { return (m_from); } - string& from() { return (m_from); } + const string& getFrom() const; + void setFrom(const string& from); - const string& via() const { return (m_via); } - string& via() { return (m_via); } + const string& getVia() const; + void setVia(const string& via); - const string& by() const { return (m_by); } - string& by() { return (m_by); } + const string& getBy() const; + void setBy(const string& by); - const string& id() const { return (m_id); } - string& id() { return (m_id); } + const string& getId() const; + void setId(const string& id); - const string& for_() const { return (m_for); } - string& for_() { return (m_for); } + const string& getFor() const; + void setFor(const string& for_); - const datetime& date() const { return (m_date); } - datetime& date() { return (m_date); } + const datetime& getDate() const; + void setDate(const datetime& date); - const std::vector <string>& with() const { return (m_with); } - std::vector <string>& with() { return (m_with); } + const std::vector <string>& getWithList() const; + std::vector <string>& getWithList(); -protected: +private: string m_from; string m_via; @@ -78,10 +81,9 @@ protected: public: - using headerField::parse; - using headerField::generate; + using component::parse; + using component::generate; - // Component parsing & assembling void parse(const string& buffer, const string::size_type position, const string::size_type end, string::size_type* newPosition = NULL); void generate(utility::outputStream& os, const string::size_type maxLineLength = lineLengthLimits::infinite, const string::size_type curLinePos = 0, string::size_type* newLinePos = NULL) const; }; @@ -90,4 +92,4 @@ public: } // vmime -#endif // VMIME_RELAYFIELD_HPP_INCLUDED +#endif // VMIME_RELAY_HPP_INCLUDED |