libemailfunctions
KPIM Namespace Reference
Detailed Description
KPIM holds all kinds of functions specific to KDE PIM.The KPIM namespace hides away functions, enums, and other things that are KDE PIM specific and that we don't want to have polluting the global namespace.
Classes | |
class | IdMapper |
An Id Mapper maps Ids. More... | |
class | NetworkStatus |
This is a class for monitoring network status -- basically, the machine KDE is running on going from "online" mode to offline. More... | |
Enumerations | |
enum | EmailParseResult { AddressOk, AddressEmpty, UnexpectedEnd, UnbalancedParens, MissingDomainPart, UnclosedAngleAddr, UnopenedAngleAddr, TooManyAts, UnexpectedComma, TooFewAts, MissingLocalPart, UnbalancedQuote, NoAddressSpec, DisallowedChar, InvalidDisplayName } |
Functions | |
QStringList | splitEmailAddrList (const QString &aStr) |
KPIM::EmailParseResult | splitAddress (const QCString &address, QCString &displayName, QCString &addrSpec, QCString &comment) |
KPIM::EmailParseResult | splitAddress (const QString &address, QString &displayName, QString &addrSpec, QString &comment) |
KPIM::EmailParseResult | isValidEmailAddress (const QString &aStr) |
QString | emailParseResultToString (EmailParseResult errorCode) |
bool | isValidSimpleEmailAddress (const QString &aStr) |
QString | simpleEmailAddressErrorMsg () |
QCString | getEmailAddress (const QCString &address) |
QString | getEmailAddress (const QString &address) |
QCString | getFirstEmailAddress (const QCString &addresses) |
QString | getFirstEmailAddress (const QString &addresses) |
bool | getNameAndMail (const QString &aStr, QString &name, QString &mail) |
bool | compareEmail (const QString &email1, const QString &email2, bool matchName) |
QString | normalizedAddress (const QString &displayName, const QString &addrSpec, const QString &comment) |
QString | decodeIDN (const QString &addrSpec) |
QString | encodeIDN (const QString &addrSpec) |
QString | normalizeAddressesAndDecodeIDNs (const QString &addresses) |
QString | normalizeAddressesAndEncodeIDNs (const QString &str) |
QString | quoteNameIfNecessary (const QString &str) |
static unsigned char | ASCIIToLower (unsigned char ch) |
char * | kAsciiToLower (char *str) |
static unsigned char | ASCIIToUpper (unsigned char ch) |
char * | kAsciiToUpper (char *str) |
Enumeration Type Documentation
|
Result type for splitAddress, isValidEmailAddress.
|
Function Documentation
|
Compare two email addresses. If matchName is false, it just checks the email address, and returns true if this matches. If matchName is true, both the name and the email must be the same. |
|
Decodes the punycode domain part of the given addr-spec if it's an IDN.
|
|
Translate the enum errorcodes from emailParseResult into i18n'd strings that can be used for msg boxes.
|
|
Encodes the domain part of the given addr-spec in punycode if it's an IDN.
|
|
This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Returns the pure email address (addr-spec in RFC2822) of the given address (mailbox in RFC2822).
|
|
Returns the pure email address (addr-spec in RFC2822) of the given address (mailbox in RFC2822).
|
|
This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Returns the pure email address (addr-spec in RFC2822) of the first email address of a list of addresses.
|
|
Returns the pure email address (addr-spec in RFC2822) of the first email address of a list of addresses.
|
|
Return email address and name from string. Examples: "Stefan Taferner <taferner@example.org>" returns "taferner@example.org" and "Stefan Taferner". "joe@example.com" returns "joe@example.com" and "". Note that this only returns the first address. Also note that the return value is TRUE if both the name and the mail are not empty: this does NOT tell you if mail contains a valid email address or just some rubbish. |
|
Validates an email address in the form of "Joe User" <joe@example.org>. Returns AddressOk if no error was encountered. Otherwise an appropriate error code is returned.
|
|
Validates an email address in the form of joe@example.org. Returns true if no error was encountered. This method should be used when the input field should not allow a "full" email address with comments and other special cases that normally are valid in an email address.
|
|
Locale-independent function to convert ASCII strings to lower case ASCII strings. This means that it affects only the ASCII characters A-Z.
Definition at line 36 of file kasciistringtools.cpp. |
|
Locale-independent function to convert ASCII strings to upper case ASCII strings. This means that it affects only the ASCII characters a-z.
Definition at line 53 of file kasciistringtools.cpp. |
|
Normalizes all email addresses in the given list and decodes all IDNs.
|
|
Normalizes all email addresses in the given list and encodes all IDNs in punycode.
|
|
Returns a normalized address built from the given parts. The normalized address is of one the following forms:
|
|
Add quote characters around the given string if it contains a character that makes that necessary, in an email name, such as ",".
|
|
Returns a i18n string to be used in msgboxes this allows for error messages to be the same across the board.
|
|
This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Splits the given address into display name, email address and comment. Returns AddressOk if no error was encountered. Otherwise an appropriate error code is returned. In case of an error the values of displayName, addrSpec and comment are undefined.
|
|
Splits the given address into display name, email address and comment. Returns AddressOk if no error was encountered. Otherwise an appropriate error code is returned. In case of an error the values of displayName, addrSpec and comment are undefined.
|
|
Split a comma separated list of email addresses.
|