2
irccontact.h - IRC Contact
4
Copyright (c) 2002 by Nick Betcher <nbetcher@kde.org>
5
Copyright (c) 2003 by Jason Keirstead <jason@keirstead.org>
6
Copyright (c) 2003-2007 by Michel Hermier <michel.hermier@gmail.com>
8
Kopete (c) 2002-2007 by the Kopete developers <kopete-devel@kde.org>
10
*************************************************************************
12
* This program is free software; you can redistribute it and/or modify *
13
* it under the terms of the GNU General Public License as published by *
14
* the Free Software Foundation; either version 2 of the License, or *
15
* (at your option) any later version. *
17
*************************************************************************
25
#include "kircglobal.h"
27
#include "kopetecontact.h"
28
#include "kopetemessage.h"
49
* @author Jason Keirstead <jason@keirstead.org>
50
* @author Michel Hermier <michel.hermier@gmail.com>
53
: public Kopete::Contact
58
typedef QList<IRCContact *> List;
60
IRCContact(IRCAccount *account, const KIrc::EntityPtr &entity,
61
Kopete::MetaContact *metac = 0, const QString& icon = QString());
64
IRCAccount *ircAccount() const;
65
KIrc::ClientSocket *kircClient() const;
67
QString caption() const;
69
KIrc::EntityPtr entity() const;
72
* This function attempts to find the nickname specified within the current chat
73
* session. Returns a pointer to that IRCUserContact, or 0L if the user does not
74
* exist in this session. More useful for channels. Calling IRCChannelContact::locateUser()
75
* for example tells you if a user is in a certain channel.
77
Kopete::Contact *locateUser(const QString &nickName);
82
* return true if the contact is in a chat. false if the contact is in no chats
83
* that loop over all manager, and checks the presence of the user
85
bool isChatting( Kopete::ChatSession *avoid = 0L ) const;
87
Kopete::ChatSession *manager(CanCreateFlags cancreate = CannotCreate);
88
Kopete::ChatSession *chatSession(IRC::ChatSessionType type = IRC::SERVER, CanCreateFlags cancreate = CannotCreate);
90
void appendMessage(Kopete::Message &);
95
* We serialise the contactId and the server group in 'contactId'
96
* so that other IRC programs reading this from KAddressBook have a chance of figuring
97
* which server the contact relates to
99
void serialize( QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData );
102
void destroyed(IRCContact *self);
107
void setCodec(QTextCodec *codec);
110
void entityUpdated();
112
void slotSendMsg(Kopete::Message &message, Kopete::ChatSession *chatSession);
113
QString sendMessage( const QString &msg );
115
void chatSessionDestroyed(Kopete::ChatSession *chatSession);
117
void deleteContact();
120
Q_DISABLE_COPY(IRCContact)