Logo Search packages:      
Sourcecode: kmess version File versions

Contact Class Reference
[contact]

#include <contact.h>

Inheritance diagram for Contact:

ContactBase

List of all members.


Detailed Description

Data class for contact information.

Each contact of the ContactList is represented by a Contact object. It stores the data received from the MSN Messenger servers, and maintains the state of the contact. When properties change, the representive signals are fired so the user interface can update (hence the Model-view-controller model). In the contact list view, this class is represented by the ContactListViewItem class.

Users can also specify additional properties for their contacts. Those settings are saved in the ContactExtension class. This class strictly stores the data from the MSN Messenger servers only.

The contact may appear in multiple lists:

The main window only displays contacts who are in the Friends List (this can be configured). The contacts in the Friends List can be added to multiple groups. Note the difference here between the terms "lists" and "groups"; groups are only filled with contacts of the Friends List.

Author:
Mike K. Bennett

Definition at line 56 of file contact.h.


Public Types

enum  MsnClientCapabilities {
  MSN_CAP_WIN_MOBILE = 0x01, MSN_CAP_INK_GIF = 0x04, MSN_CAP_INK_ISF = 0x08, MSN_CAP_VIDEO_CHAT = 0x10,
  MSN_CAP_MULTI_PACKET = 0x20, MSN_CAP_MSN_MOBILE = 0x40, MSN_CAP_MSN_DIRECT = 0x80, MSN_CAP_WEB_CLIENT = 0x200,
  MSN_CAP_MSO_CLIENT = 0x800, MSN_CAP_LIVE_SPACE = 0x1000, MSN_CAP_DIRECT_IM = 0x4000, MSN_CAP_WINKS = 0x8000,
  MSN_CAP_SEARCH = 0x10000, MSN_CAP_BOT = 0x20000, MSN_CAP_VOICE_IM = 0x40000, MSN_CAP_SECURE_IM = 0x80000,
  MSN_CAP_SIP_INVITE = 0x100000, MSN_CAP_FOLDER_SHARING = 0x400000, MSN_CAP_MSN60 = 0x10000000, MSN_CAP_MSN61 = 0x20000000,
  MSN_CAP_MSN62 = 0x30000000, MSN_CAP_MSN70 = 0x40000000, MSN_CAP_MSN75 = 0x50000000, MSN_CAP_MSN90 = 0x60000000
}
enum  MsnContactLists {
  MSN_LIST_FRIEND = 1, MSN_LIST_ALLOWED = 2, MSN_LIST_BLOCKED = 4, MSN_LIST_REVERSE = 8,
  MSN_LIST_PENDING = 16
}

Signals

void changedFriendlyName ()
void changedGroup (Contact *contact)
void changedList (Contact *contact)
void changedMsnObject (Contact *contact)
void changedPersonalMessage (Contact *contact)
void changedPicture ()
void changedStatus ()
void contactOffline (Contact *contact, bool showBaloon)
void contactOnline (Contact *contact, bool showBaloon)
void leftAllChats (ContactBase *contact)

Public Member Functions

void addEmoticonDefinition (const QString &emoticonCode, const QString &msnObjectDataHash)
void addEmoticonFile (const QString &msnObjectDataHash, const QString &filename)
void addGroupId (const QString &groupId)
void addSwitchboardConnection (const MsnSwitchboardConnection *connection)
bool checkIfContactAddedUser ()
 Contact (QString handle, QString friendlyName, int lists, QString groupIds, QString guid)
ApplicationListcreateApplicationList ()
ApplicationListgetApplicationList () const
uint getCapabilities () const
QString getContactDefaultPicturePath () const
QString getContactPicturePath () const
const QString & getCurrentMediaString () const
const QString & getCurrentMediaType () const
const QString & getEmoticonCode (const QString &msnObjectDataHash) const
const QRegExp & getEmoticonPattern () const
const QMap< QString, QString > & getEmoticonReplacements () const
ContactExtensiongetExtension () const
QString getFriendlyName () const
QStringList getGroupIds () const
const QString & getGuid () const
QString getHandle () const
const MsnObjectgetMsnObject () const
const QRegExp & getPendingEmoticonPattern () const
const QString & getPersonalMessage () const
QString getStatus () const
const QPtrList
< MsnSwitchboardConnection
getSwitchboardConnections () const
QString getTrueFriendlyName () const
bool hasApplicationList () const
bool hasP2PSupport (MsnClientCapabilities minimalVersion=MSN_CAP_MSN60) const
bool isAllowed () const
bool isBlocked () const
bool isFriend () const
bool isOffline () const
bool isOnline () const
bool isPending () const
bool isReverse () const
void loadMsnObject (QString msnObject)
void removeGroupId (const QString &groupId)
void removeSwitchboardConnection (const MsnSwitchboardConnection *connection, bool userInitiated=false)
void setAllowed (bool allowed)
void setBlocked (bool blocked)
void setCapabilities (uint capabilities)
void setFriend (bool isFriend)
void setFriendlyName (QString newName)
void setGuid (const QString &guid)
void setList (const QString list, bool isMember)
void setPersonalStatus (const QString &message, const QString &mediaType=QString::null, const QString &mediaString=QString::null)
void setReverse (bool reverse)
void setStatus (const QString status, bool showBaloon=true)

Protected Attributes

uint capabilities_
QMap< QString, QString > customEmoticons_
QRegExp emoticonRegExp_
QString friendlyName_
QString handle_
QMap< QString, QString > pendingEmoticons_
QRegExp pendingRegExp_

Private Slots

void emitChangedFriendlyName ()
void forwardChangedPicture ()

Private Attributes

bool allowed_
bool blocked_
QString currentMediaString_
QString currentMediaType_
ContactExtensionextension_
bool friend_
QStringList groupIds_
QString guid_
MsnObjectmsnObject_
bool pending_
QString personalMessage_
bool reverse_
QString status_

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index