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

ContactBase Class Reference
[contact]

#include <contactbase.h>

Inheritance diagram for ContactBase:

Contact InvitedContact

List of all members.


Detailed Description

Base class of a contact, used for polymorphism with invited contacts.

This class only stores the generic properties such as account handle, and friendly name. The remaining information is available in the Contact or InvitedContact class. The online state is determined with the getStatus() method, which is implemented in both derived classes.

For proper handling of the peer-to-peer invitations, this class also stores the MsnSwitchboardConnection sessions the contact is active in. The ApplicationList contains all application invitations started with the contact. These classes are controlled from the ChatMaster class.

Author:
Mike K. Bennett

Definition at line 48 of file contactbase.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...

Signals

void changedFriendlyName ()
void changedPicture ()
void changedStatus ()
void leftAllChats (ContactBase *contact)

Public Member Functions

void addEmoticonDefinition (const QString &emoticonCode, const QString &msnObjectDataHash)
void addEmoticonFile (const QString &msnObjectDataHash, const QString &filename)
void addSwitchboardConnection (const MsnSwitchboardConnection *connection)
ApplicationListcreateApplicationList ()
void detectClientName (uint capabilities, const MsnObject *msnObject)
ApplicationListgetApplicationList () const
uint getCapabilities () const
const QString & getClientName (bool getFullNameIfAvailable=true) const
QString getContactDefaultPicturePath () const
virtual const QString getContactPicturePath () const =0
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
virtual const QString & getFriendlyName (FormattingMode mode=STRING_CLEANED) const
const QString & getHandle () const
const QRegExp & getPendingEmoticonPattern () const
virtual Status getStatus () const =0
const QList< const
MsnSwitchboardConnection * > 
getSwitchboardConnections () const
bool hasApplicationList () const
bool hasCapability (MsnClientCapabilities flag) const
bool hasP2PSupport (MsnClientCapabilities minimalVersion=MSN_CAP_MSN60) const
bool isOffline () const
bool isOnline () const
bool manageEmoticonBlackList (bool add, const QString &emoticonCode)
void removeSwitchboardConnection (const MsnSwitchboardConnection *connection, bool userInitiated=false)
void setCapabilities (uint capabilities)
void setClientFullName (const QString &clientFullName)

Protected Member Functions

 ContactBase (const QString &handle, const QString &friendlyName, uint capabilities=0)
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_
QString status_

Private Slots

void slotApplicationListAborted ()

Private Member Functions

void regeneratePendingEmoticonPattern ()

Private Attributes

ApplicationListapplicationList_
QList< const
MsnSwitchboardConnection * > 
chatSessions_

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

Generated by  Doxygen 1.6.0   Back to index