00001
00002
00003
00004
00005
00006
00007 #ifndef _MIMETIC_RFC822_ADDRESS_H_
00008 #define _MIMETIC_RFC822_ADDRESS_H_
00009 #include <string>
00010 #include <mimetic/rfc822/mailbox.h>
00011 #include <mimetic/rfc822/group.h>
00012 #include <mimetic/rfc822/fieldvalue.h>
00013
00014 namespace mimetic
00015 {
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 struct Address: public FieldValue
00033 {
00034 Address();
00035 Address(const char*);
00036 Address(const std::string&);
00037 bool isGroup() const;
00038 Mailbox& mailbox();
00039 const Mailbox& mailbox() const;
00040 Group& group();
00041 const Group& group() const;
00042 void set(const std::string&);
00043 std::string str() const;
00044 bool operator==(const Address&) const;
00045 bool operator!=(const Address&) const;
00046 private:
00047 FieldValue* clone() const;
00048 Mailbox m_mbx;
00049 Group m_group;
00050 bool m_isGroup;
00051 };
00052
00053
00054 }
00055
00056 #endif
00057