A class for friend information storage. More...
#include <friend.h>
Public Member Functions | |
| Friend () | |
| An empty constructor. | |
| Friend (const Friend &) | |
| A copy constructor. | |
| ~Friend () | |
| A destructor. | |
| void | setFirstName (const QString &val) |
| Sets first name of a friend. | |
| QString | firstName () const |
| Gets first name of a friend. | |
| void | setNickName (const QString &val) |
| Sets nick name of a friend. | |
| QString | nickName () const |
| Gets nick name of a friend. | |
| void | setLastName (const QString &val) |
| Sets last name of a friend. | |
| QString | lastName () const |
| Gets last name of a friend. | |
| void | setOnline (const bool val) |
| Sets status of a friend. | |
| bool | online () const |
| Gets status of a friend. | |
| void | setGender (const QString &val) |
| Sets gender of a friend. | |
| QString | gender () const |
| Gets gender of a friend. | |
| void | setBirthday (const QString &val) |
| Sets birthday of a friend. | |
| QString | birthday () const |
| Gets birthday of a friend. | |
| void | setMobilePhone (const QString &val) |
| Sets mobile phone number of a friend. | |
| QString | mobilePhone () const |
| Gets mobile phone number of a friend. | |
| void | setHomePhone (const QString &val) |
| Sets home phone number of a friend. | |
| QString | homePhone () const |
| Gets home phone number of a friend. | |
| void | setCity (const QString &val) |
| Sets city of a friend. | |
| QString | city () const |
| Gets city of a friend. | |
| void | setCountry (const QString &val) |
| Sets country of a friend. | |
| QString | country () const |
| Gets country of a friend. | |
| void | setIcon_url (const QString &val) |
| Sets URL of friend's avatar. | |
| QString | icon_url () const |
| Gets URL of friend's avatar. | |
| void | setIcon (const QString &icon) |
| Sets path to friend's avatar. | |
| QString | icon () const |
| Gets path to friend's avatar. | |
| bool | isMetaProfile () const |
| Checks that profile is a meta profile (contains more than one record). | |
| bool | hasFullProfile () const |
| Checks that full profile is downloaded. | |
| FriendList | getProfileList () const |
| Gets list of profiles from meta profile. | |
| void | addProfile (const Friend &fr, const bool isMainProfile) |
| Add profile for friend. | |
| bool | hasProfile (const Friend &fr) const |
| Check existence of profile for friend. | |
| bool | hasProfile (const QString &serviceId, const QString &ownerId) const |
| Check existence of profile for friend. | |
| QString | name () const |
| Gets friend name as a combination of first, last and nick names. | |
| AlbumList | getAlbumList () const |
| Loads album list from cache file. | |
| Friend & | operator= (const Friend &) |
| Overloads assignment operator for Friend classes. | |
| bool | operator< (const Friend &fr1) const |
| compare names of two friends. | |
| bool | operator== (const Friend &fr1) const |
| compare names of two friends. | |
| void | storeData () |
| Stores friend data to local cache. | |
| bool | isEmpty () const |
Static Public Member Functions | |
| static FriendList | mergeLists (FriendList src1, FriendList src2) |
| static void | setAlbumList (const AlbumList &list, const QString &accountId, const QString &friendId) |
| Sets album list and store it to cache file. | |
| static QDomElement | toQDomElement (QDomDocument &doc, const Friend &src, const bool addOptionalInfo) |
| Store friends data to XML format. | |
| static Friend | fromQDomElement (const QDomElement &fr, const QString &accountId, const QString &serviceId) |
| Loads friend from XML struct. | |
| static void | copyData (Friend *dst, const Friend *src) |
| Copies data from one Friend class to another. | |
| static Friend | loadData (const QString &serviceId, const QString &accountId, const QString &ownerId) |
| Loads friend data from local cache. | |
Public Attributes | |
| QString | ownerId |
| QString | accountId |
| QString | serviceId |
A class for friend information storage.
| Friend::Friend | ( | const Friend & | src | ) |
| void Friend::addProfile | ( | const Friend & | fr, | |
| const bool | isMainProfile | |||
| ) |
Add profile for friend.
| fr | new profile for friend | |
| isMainProfile | true if this profile is main, otherwise - false |
| QString Friend::birthday | ( | ) | const |
Gets birthday of a friend.
| QString Friend::city | ( | ) | const |
Gets city of a friend.
| QString Friend::country | ( | ) | const |
Gets country of a friend.
| QString Friend::firstName | ( | ) | const |
Gets first name of a friend.
| Friend Friend::fromQDomElement | ( | const QDomElement & | fr, | |
| const QString & | accountId, | |||
| const QString & | serviceId | |||
| ) | [static] |
Loads friend from XML struct.
| fr | XML struct with friend data | |
| accountId | ID of account to which friend belongs | |
| serviceId | ID of service |
| QString Friend::gender | ( | ) | const |
Gets gender of a friend.
| AlbumList Friend::getAlbumList | ( | ) | const |
Loads album list from cache file.
| FriendList Friend::getProfileList | ( | ) | const |
Gets list of profiles from meta profile.
| bool Friend::hasFullProfile | ( | ) | const |
Checks that full profile is downloaded.
| bool Friend::hasProfile | ( | const QString & | serviceId, | |
| const QString & | ownerId | |||
| ) | const |
Check existence of profile for friend.
| serviceId | ID of service | |
| ownerId | ID of friend |
| bool Friend::hasProfile | ( | const Friend & | fr | ) | const |
Check existence of profile for friend.
| fr | friend source profile |
| QString Friend::homePhone | ( | ) | const |
Gets home phone number of a friend.
| QString Friend::icon | ( | ) | const |
Gets path to friend's avatar.
| QString Friend::icon_url | ( | ) | const |
Gets URL of friend's avatar.
| bool Friend::isMetaProfile | ( | ) | const |
Checks that profile is a meta profile (contains more than one record).
| QString Friend::lastName | ( | ) | const |
Gets last name of a friend.
| Friend Friend::loadData | ( | const QString & | serviceId, | |
| const QString & | accountId, | |||
| const QString & | ownerId | |||
| ) | [static] |
Loads friend data from local cache.
| serviceId | ID of service | |
| accountId | ID of account to which friend belongs | |
| ownerId | ID of friend |
| FriendList Friend::mergeLists | ( | FriendList | src1, | |
| FriendList | src2 | |||
| ) | [static] |
Merges two lists, creates metaprofiles for duplicate items.
| src1 | The first list | |
| src2 | The second list |
| QString Friend::mobilePhone | ( | ) | const |
Gets mobile phone number of a friend.
| QString Friend::name | ( | ) | const |
Gets friend name as a combination of first, last and nick names.
| QString Friend::nickName | ( | ) | const |
Gets nick name of a friend.
| bool Friend::online | ( | ) | const |
Gets status of a friend.
| void Friend::setAlbumList | ( | const AlbumList & | list, | |
| const QString & | accountId, | |||
| const QString & | friendId | |||
| ) | [static] |
Sets album list and store it to cache file.
| list | album list | |
| accountId | ID of account to which friend belongs | |
| friendId | ID of album master friend |
| void Friend::setBirthday | ( | const QString & | val | ) |
Sets birthday of a friend.
| val | birthday of a friend |
| void Friend::setCity | ( | const QString & | val | ) |
Sets city of a friend.
| val | city of a friend |
| void Friend::setCountry | ( | const QString & | val | ) |
Sets country of a friend.
| val | country of a friend |
| void Friend::setFirstName | ( | const QString & | val | ) |
Sets first name of a friend.
| val | first name of a friend |
| void Friend::setGender | ( | const QString & | val | ) |
Sets gender of a friend.
| val | gender of a friend |
| void Friend::setHomePhone | ( | const QString & | val | ) |
Sets home phone number of a friend.
| val | home phone number of a friend |
| void Friend::setIcon | ( | const QString & | icon | ) |
Sets path to friend's avatar.
| icon | path to friend's avatar |
| void Friend::setIcon_url | ( | const QString & | val | ) |
Sets URL of friend's avatar.
| val | URL of a friend's avatar |
| void Friend::setLastName | ( | const QString & | val | ) |
Sets last name of a friend.
| val | last name of a friend |
| void Friend::setMobilePhone | ( | const QString & | val | ) |
Sets mobile phone number of a friend.
| val | mobile phone number of a friend |
| void Friend::setNickName | ( | const QString & | val | ) |
Sets nick name of a friend.
| val | nick of a friend |
| void Friend::setOnline | ( | const bool | val | ) |
Sets status of a friend.
| val | status of a friend |
| QDomElement Friend::toQDomElement | ( | QDomDocument & | doc, | |
| const Friend & | src, | |||
| const bool | addOptionalInfo | |||
| ) | [static] |
Store friends data to XML format.
| doc | root XML document | |
| src | source Friend entity | |
| addOptionalInfo | true if proceed XML file should contain additional fields; otherwise - false |
| QString Friend::accountId |
a name of account for this friend (not stored in cache)
| QString Friend::ownerId |
friend ID from service
| QString Friend::serviceId |
ID of service
1.6.3