libemailfunctions
email.hGo to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef EMAIL_H
00023 #define EMAIL_H
00024
00025 #include <qstringlist.h>
00026 #include <qcstring.h>
00027
00028 #include <kdepimmacros.h>
00029
00039 namespace KPIM {
00040
00044 enum EmailParseResult { AddressOk, AddressEmpty, UnexpectedEnd,
00045 UnbalancedParens, MissingDomainPart,
00046 UnclosedAngleAddr, UnopenedAngleAddr,
00047 TooManyAts, UnexpectedComma,
00048 TooFewAts, MissingLocalPart,
00049 UnbalancedQuote, NoAddressSpec,
00050 DisallowedChar, InvalidDisplayName };
00051
00052
00054 KDE_EXPORT QStringList splitEmailAddrList(const QString& aStr);
00055
00075 KDE_EXPORT EmailParseResult splitAddress( const QCString & address,
00076 QCString & displayName,
00077 QCString & addrSpec,
00078 QCString & comment );
00079
00102 KDE_EXPORT EmailParseResult splitAddress( const QString & address,
00103 QString & displayName,
00104 QString & addrSpec,
00105 QString & comment );
00106
00116 KDE_EXPORT EmailParseResult isValidEmailAddress( const QString& aStr );
00117
00125 KDE_EXPORT QString emailParseResultToString( EmailParseResult errorCode );
00126
00137 KDE_EXPORT bool isValidSimpleEmailAddress( const QString& aStr );
00138
00146 KDE_EXPORT QString simpleEmailAddressErrorMsg();
00147
00155 KDE_EXPORT QCString getEmailAddress( const QCString & address );
00156
00167 KDE_EXPORT QString getEmailAddress( const QString & address );
00168
00176 KDE_EXPORT QCString getFirstEmailAddress( const QCString & addresses );
00177
00188 KDE_EXPORT QString getFirstEmailAddress( const QString & addresses );
00189
00198 KDE_EXPORT bool getNameAndMail(const QString& aStr, QString& name, QString& mail);
00199
00205 KDE_EXPORT bool compareEmail( const QString& email1, const QString& email2,
00206 bool matchName );
00207
00220 KDE_EXPORT QString normalizedAddress( const QString & displayName,
00221 const QString & addrSpec,
00222 const QString & comment );
00223
00229 KDE_EXPORT QString decodeIDN( const QString & addrSpec );
00230
00237 KDE_EXPORT QString encodeIDN( const QString & addrSpec );
00238
00245 KDE_EXPORT QString normalizeAddressesAndDecodeIDNs( const QString & addresses );
00246
00250 KDE_EXPORT QString normalizeAddressesAndEncodeIDNs( const QString & str );
00251
00255 KDE_EXPORT QString quoteNameIfNecessary( const QString& str );
00256
00257 }
00258
00259 #endif
00260
|