Logo Search packages:      
Sourcecode: kmess version File versions  Download package

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. Contacts are organized in the following lists:

The main contact list window (KMess class, KMessView widget) 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.

When properties change, the representive signals are fired so the user interface can update (a Model-View-Controller design). The controller is the MsnNotificationConnection, the view is the ContactListViewItem class.

Users can also specify additional properties for their contacts. Those settings are saved in the ContactExtension class, and not part of the server-side contact properties. This class strictly stores the data from the MSN Messenger servers only.

Author:
Mike K. Bennett

Definition at line 62 of file contact.h.


Public Types

enum  MsnClientCapabilities {
  MSN_CAP_WIN_MOBILE = 0x1, MSN_CAP_MSN8_USER = 0x2, MSN_CAP_INK_GIF = 0x4, MSN_CAP_INK_ISF = 0x8,
  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_MCE_CLIENT = 0x2000,
  MSN_CAP_DIRECT_IM = 0x4000, MSN_CAP_WINKS = 0x8000, MSN_CAP_SHARED_SEARCH = 0x10000, MSN_CAP_BOT = 0x20000,
  MSN_CAP_VOICE_CLIPS = 0x40000, MSN_CAP_SCHANNEL = 0x80000, MSN_CAP_SIP_INVITE = 0x100000, MSN_CAP_UNKN_2009 = 0x200000,
  MSN_CAP_FOLDER_SHARING = 0x400000, MSN_CAP_ONECARE = 0x1000000, MSN_CAP_P2P_TURN = 0x2000000, MSN_CAP_P2P_UUN = 0x4000000,
  MSN_CAP_MSN60 = 0x10000000, MSN_CAP_MSN61 = 0x20000000, MSN_CAP_MSN62 = 0x30000000, MSN_CAP_MSN70 = 0x40000000,
  MSN_CAP_MSN75 = 0x50000000, MSN_CAP_MSN80 = 0x60000000, MSN_CAP_MSN81 = 0x70000000, MSN_CAP_MSN85 = 0x80000000,
  MSN_CAP_MSN90beta = 0x90000000, MSN_CAP_MSN2009 = 0xa0000000
}
 The values for the bitwise client capabilities flag returned by getCapabilities(). More...
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)
 Contact (const QString &handle, const QString &friendlyName, int lists, const QStringList &groupIds, const QString &guid)
ApplicationListcreateApplicationList ()
void detectClientName (uint capabilities, const MsnObject *msnObject)
ApplicationListgetApplicationList () const
uint getCapabilities () const
const QString & getClientName (bool getFullNameIfAvailable=true) const
QString getContactDefaultPicturePath () const
const QString getContactPicturePath () const
const QString & getCurrentMediaString () const
const QString & getCurrentMediaType () const
const QStringList & getEmoticonBlackList () const
QString getEmoticonCode (const QString &msnObjectDataHash) const
const QHash< QString, QString > & getEmoticonHashes () const
const QRegExp & getEmoticonPattern () const
const QHash< QString, QString > & getEmoticonReplacements () const
ContactExtensiongetExtension () const
const QString & getFriendlyName (FormattingMode mode=STRING_CLEANED) const
const QStringList & getGroupIds () const
const QString & getGuid () const
const QString & getHandle () const
const QVariant getInformation (const QString &information) const
Status getLastStatus () const
const MsnObjectgetMsnObject () const
const QRegExp & getPendingEmoticonPattern () const
const QString & getPersonalMessage (FormattingMode mode=STRING_CLEANED) const
QPixmap & getScaledDisplayPicture ()
Status getStatus () const
const QList< const
MsnSwitchboardConnection * > 
getSwitchboardConnections () const
const QString & getTrueFriendlyName (FormattingMode mode=STRING_CLEANED) const
bool hasApplicationList () const
bool hasCapability (MsnClientCapabilities flag) 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)
bool manageEmoticonBlackList (bool add, const QString &emoticonCode)
void readProperties (const KConfigGroup &config)
void removeGroupId (const QString &groupId)
void removeSwitchboardConnection (const MsnSwitchboardConnection *connection, bool userInitiated=false)
void saveProperties (KConfigGroup &config)
void setAllowed (bool allowed)
void setBlocked (bool blocked)
void setCapabilities (uint capabilities)
void setClientFullName (const QString &clientFullName)
void setFriend (bool isFriend)
void setFriendlyName (QString newName)
void setGuid (const QString &guid)
void setInformations (const QHash< QString, QVariant > &informations)
void setPending (bool isPending)
void setPersonalStatus (const QString &message, const QString &mediaType=QString::null, const QString &mediaString=QString::null)
void setReverse (bool reverse)
void setStatus (const Status newStatus, bool showBaloon=true)

Protected Member Functions

const QString & getClientFullName () const
void setClientName (const QString &clientName)

Protected Attributes

uint capabilities_
QString clientFullName_
QString clientName_
QHash< QString, QString > customEmoticons_
QHash< QString, QString > customHashes_
QStringList emoticonBlackList_
QRegExp emoticonRegExp_
FormattedString friendlyName_
QString handle_
QHash< QString, QString > pendingEmoticons_
QRegExp pendingRegExp_

Private Slots

void slotChangedPicture ()
void slotEmoticonSettingsChanged ()

Private Attributes

bool allowed_
bool blocked_
QString currentMediaString_
QString currentMediaType_
ContactExtensionextension_
bool friend_
QStringList groupIds_
QString guid_
QHash< QString, QVariant > informations_
Status lastStatus_
QString movingFrom_
MsnObjectmsnObject_
bool pending_
FormattedString personalMessage_
bool reverse_
QPixmap scaledDisplayPicture_
int scaledDPSize_
Status status_

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

Generated by  Doxygen 1.6.0   Back to index