summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/irc/ircservercontact.h
blob: 97f99d887d574742248a182da9774bfd2a132c3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
    ircservercontact.h - IRC User Contact

    Copyright (c) 2003      by Michel Hermier <michel.hermier@wanadoo.fr>

    Kopete    (c) 2003      by the Kopete developers <kopete-devel@kde.org>

    *************************************************************************
    *                                                                       *
    * This program is free software; you can redistribute it and/or modify  *
    * it under the terms of the GNU General Public License as published by  *
    * the Free Software Foundation; either version 2 of the License, or     *
    * (at your option) any later version.                                   *
    *                                                                       *
    *************************************************************************
*/

#ifndef IRCSERVERCONTACT_H
#define IRCSERVERCONTACT_H

#include "irccontact.h"

#include "kircengine.h"

#include "kopetechatsessionmanager.h"

#include <tqvaluelist.h>
#include <tqstringlist.h>

class KActionCollection;
class KAction;
class KActionMenu;
class KopeteView;

class IRCContactManager;
class IRCChannelContact;

/**
 * @author Michel Hermier <michel.hermier@wanadoo.fr>
 *
 * This class is the @ref Kopete::Contact object representing IRC Servers.
 * It is derrived from @ref IRCContact where much of its functionality is shared with @ref IRCChannelContact and @ref IRCUserContact.
 */
class IRCServerContact
	: public IRCContact
{
	Q_OBJECT
  

	public:
		// This class provides a Kopete::Contact for each server of a given IRC connection.
		IRCServerContact(IRCContactManager *, const TQString &servername, Kopete::MetaContact *mc);

		virtual const TQString caption() const;

		virtual void appendMessage(Kopete::Message &);
                void appendMessage( const TQString &message );

	protected slots:
		void engineInternalError(KIRC::Engine::Error error, KIRC::Message &ircmsg);
		virtual void slotSendMsg(Kopete::Message &message, Kopete::ChatSession *);

	private slots:
		virtual void updateStatus();
		void slotViewCreated( KopeteView* );
		void slotDumpMessages();

		void slotIncomingUnknown( const TQString &message );
		void slotIncomingConnect( const TQString &message );
		void slotIncomingMotd( const TQString &motd );
		void slotIncomingNotice( const TQString &orig, const TQString &notice );
		void slotCannotSendToChannel( const TQString &channel, const TQString &msg );

	private:
		TQValueList<Kopete::Message> mMsgBuffer;
};

#endif

// vim: set noet ts=4 sts=4 tw=4: