kioslaves/imap4
mailaddress.h00001 #ifndef _MAILADDRESS_H
00002 #define _MAILADDRESS_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <qptrlist.h>
00027 #include <qstring.h>
00028 #include <qcstring.h>
00029 #include "rfcdecoder.h"
00030
00031 class mailAddress
00032 {
00033 public:
00034 mailAddress ();
00035 ~mailAddress ();
00036 mailAddress (char *aCStr);
00037 mailAddress (const mailAddress &);
00038 mailAddress & operator = (const mailAddress &);
00039
00040 void setUser (const QCString & aUser)
00041 {
00042 user = aUser;
00043 }
00044 const QCString & getUser () const
00045 {
00046 return user;
00047 }
00048 void setHost (const QCString & aHost)
00049 {
00050 host = aHost;
00051 }
00052 const QCString & getHost () const
00053 {
00054 return host;
00055 }
00056
00057 void setFullName (const QString & aFull);
00058 const QString getFullName () const;
00059
00060 void setComment (const QString & aComment);
00061 void setCommentRaw (const QCString &);
00062 const QString getComment () const;
00063 const QCString & getCommentRaw () const;
00064
00065 int parseAddress (char *);
00066 const QCString getStr ();
00067 bool isEmpty () const;
00068
00069 static QString emailAddrAsAnchor (const mailAddress &, bool);
00070 static QString emailAddrAsAnchor (const QPtrList < mailAddress > &, bool);
00071
00072 void clear();
00073
00074 private:
00075 QCString user;
00076 QCString host;
00077 QCString rawFullName;
00078 QCString rawComment;
00079 };
00080
00081 #endif
|