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 | |
KDE_EXPORT TQStringList | splitEmailAddrList (const TQString &aStr) |
KDE_EXPORT EmailParseResult | splitAddress (const TQCString &address, TQCString &displayName, TQCString &addrSpec, TQCString &comment) |
KDE_EXPORT EmailParseResult | splitAddress (const TQString &address, TQString &displayName, TQString &addrSpec, TQString &comment) |
KDE_EXPORT EmailParseResult | isValidEmailAddress (const TQString &aStr) |
KDE_EXPORT TQString | emailParseResultToString (EmailParseResult errorCode) |
KDE_EXPORT bool | isValidSimpleEmailAddress (const TQString &aStr) |
KDE_EXPORT TQString | simpleEmailAddressErrorMsg () |
KDE_EXPORT TQCString | getEmailAddress (const TQCString &address) |
KDE_EXPORT TQString | getEmailAddress (const TQString &address) |
KDE_EXPORT TQCString | getFirstEmailAddress (const TQCString &addresses) |
KDE_EXPORT TQString | getFirstEmailAddress (const TQString &addresses) |
KDE_EXPORT bool | getNameAndMail (const TQString &aStr, TQString &name, TQString &mail) |
KDE_EXPORT bool | compareEmail (const TQString &email1, const TQString &email2, bool matchName) |
KDE_EXPORT TQString | normalizedAddress (const TQString &displayName, const TQString &addrSpec, const TQString &comment) |
KDE_EXPORT TQString | decodeIDN (const TQString &addrSpec) |
KDE_EXPORT TQString | encodeIDN (const TQString &addrSpec) |
KDE_EXPORT TQString | normalizeAddressesAndDecodeIDNs (const TQString &addresses) |
KDE_EXPORT TQString | normalizeAddressesAndEncodeIDNs (const TQString &str) |
KDE_EXPORT TQString | quoteNameIfNecessary (const TQString &str) |
static unsigned char | ASCIIToLower (unsigned char ch) |
char * | kAsciiToLower (char *str) |
static unsigned char | ASCIIToUpper (unsigned char ch) |
char * | kAsciiToUpper (char *str) |
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.
Enumeration Type Documentation
Function Documentation
bool KPIM::compareEmail | ( | const TQString & | email1, |
const TQString & | email2, | ||
bool | matchName | ||
) |
TQString KPIM::decodeIDN | ( | const TQString & | addrSpec | ) |
TQString KPIM::emailParseResultToString | ( | EmailParseResult | errorCode | ) |
TQString KPIM::encodeIDN | ( | const TQString & | addrSpec | ) |
TQCString KPIM::getEmailAddress | ( | const TQCString & | address | ) |
TQString KPIM::getEmailAddress | ( | const TQString & | address | ) |
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).
- Parameters
-
address an email address, e.g. "Joe User <joe.user@example.org>"
- Returns
- the addr-spec of address, i.e. joe.u in the example ser@ examp le.o rg
TQCString KPIM::getFirstEmailAddress | ( | const TQCString & | addresses | ) |
Returns the pure email address (addr-spec in RFC2822) of the first email address of a list of addresses.
- Parameters
-
addresses an email address, e.g. "Joe User <joe.user@example.org>"
- Returns
- the addr-spec of addresses, i.e. joe.u in the example ser@ examp le.o rg
TQString KPIM::getFirstEmailAddress | ( | const TQString & | addresses | ) |
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.
- Parameters
-
addresses an email address, e.g. "Joe User <joe.user@example.org>"
- Returns
- the addr-spec of addresses, i.e. joe.u in the example ser@ examp le.o rg
bool KPIM::getNameAndMail | ( | const TQString & | aStr, |
TQString & | name, | ||
TQString & | |||
) |
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.
KPIM::EmailParseResult KPIM::isValidEmailAddress | ( | const TQString & | aStr | ) |
Validates an email address in the form of "Joe User" joe@e. xamp le.or g
Returns AddressOk if no error was encountered. Otherwise an appropriate error code is returned.
- Parameters
-
aStr a single email address, example: Joe User (comment1) joe.u ser@ examp le.o rg
- Returns
- AddressOk if no error was encountered. Otherwise an appropriate error code is returned.
bool KPIM::isValidSimpleEmailAddress | ( | const TQString & | aStr | ) |
Validates an email address in the form of joe@e. xamp le.or g
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.
- Parameters
-
aStr a single email address, example: joe.u ser@ examp le.o rg
- Returns
- true if no error was encountered.
char * KPIM::kAsciiToLower | ( | char * | str | ) |
Locale-independent function to convert ASCII strings to lower case ASCII strings.
This means that it affects only the ASCII characters A-Z.
- Parameters
-
str pointer to the string which should be converted to lower case
- Returns
- pointer to the converted string (same as str)
Definition at line 36 of file kasciistringtools.cpp.
char * KPIM::kAsciiToUpper | ( | char * | str | ) |
Locale-independent function to convert ASCII strings to upper case ASCII strings.
This means that it affects only the ASCII characters a-z.
- Parameters
-
str pointer to the string which should be converted to upper case
- Returns
- pointer to the converted string (same as str)
Definition at line 53 of file kasciistringtools.cpp.
TQString KPIM::normalizeAddressesAndDecodeIDNs | ( | const TQString & | addresses | ) |
TQString KPIM::normalizeAddressesAndEncodeIDNs | ( | const TQString & | str | ) |
TQString KPIM::normalizedAddress | ( | const TQString & | displayName, |
const TQString & | addrSpec, | ||
const TQString & | comment | ||
) |
Returns a normalized address built from the given parts.
The normalized address is of one the following forms:
- displayName (comment) <addrSpec>
- displayName <addrSpec>
- comment <addrSpec>
- addrSpec
- Parameters
-
displayName the display name of the address addrSpec the actual email address (addr-spec in RFC 2822) comment a comment
- Returns
- a normalized address built from the given parts
TQString KPIM::quoteNameIfNecessary | ( | const TQString & | str | ) |
TQString KPIM::simpleEmailAddressErrorMsg | ( | ) |
KPIM::EmailParseResult KPIM::splitAddress | ( | const TQCString & | address, |
TQCString & | displayName, | ||
TQCString & | addrSpec, | ||
TQCString & | comment | ||
) |
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.
- Parameters
-
address a single email address, example: Joe User (comment1) joe.u (comment2) ser@ examp le.o rg displayName only out: the display-name of the email address, i.e. "Joe User" in the example; in case of an error the return value is undefined addrSpec only out: the addr-spec, i.e. "joe.user@example.org" in the example; in case of an error the return value is undefined comment only out: the space-separated comments, i.e. "comment1 comment2" in the example; in case of an error the return value is undefined
- Returns
- AddressOk if no error was encountered. Otherwise an appropriate error code is returned.
KPIM::EmailParseResult KPIM::splitAddress | ( | const TQString & | address, |
TQString & | displayName, | ||
TQString & | addrSpec, | ||
TQString & | comment | ||
) |
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.
- Parameters
-
address a single email address, example: Joe User (comment1) joe.u (comment2) ser@ examp le.o rg displayName only out: the display-name of the email address, i.e. "Joe User" in the example; in case of an error the return value is undefined addrSpec only out: the addr-spec, i.e. "joe.user@example.org" in the example; in case of an error the return value is undefined comment only out: the space-separated comments, i.e. "comment1 comment2" in the example; in case of an error the return value is undefined
- Returns
- AddressOk if no error was encountered. Otherwise an appropriate error code is returned.