Port things from MSN to WLM plugin:
[kdenetwork.git] / kopete / protocols / winpopup / wpcontact.h
blob10dd2fdbdfb959f3fb31ce14f91d5a905727e9d1
1 /***************************************************************************
2 wpcontact.h - description
3 -------------------
4 begin : Fri Apr 12 2002
5 copyright : (C) 2002 by Gav Wood
6 email : gav@indigoarchive.net
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #ifndef WPCONTACT_H
19 #define WPCONTACT_H
21 // KDE Includes
22 #include <kaction.h>
24 // Qt Includes
25 #include <qdatetime.h>
26 #include <QList>
27 #include <qtimer.h>
28 #include <qstringlist.h>
30 // Kopete Includes
31 #include "kopetecontact.h"
32 #include "kopetecontactlist.h"
33 #include "kopetechatsessionmanager.h"
34 #include "kopetechatsession.h"
35 #include "kopetemessage.h"
37 // Local Includes
38 #include "wpprotocol.h"
39 #include "wpuserinfo.h"
41 class QTimer;
42 class Q3ListView;
43 class KAction;
44 namespace Kopete { class MetaContact; }
46 class WPContact: public Kopete::Contact
48 Q_OBJECT
50 public:
51 WPContact(Kopete::Account *account, const QString &userId, const QString &fullName, Kopete::MetaContact *metaContact);
53 // virtual bool isOnline() const;
54 virtual bool isReachable();
55 virtual QList<KAction*> *customContextMenuActions();
56 virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags = Kopete::Contact::CannotCreate);
57 virtual void serialize(QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData);
59 public slots:
60 virtual void slotUserInfo();
61 void slotCheckStatus(); // the call back for the checkStatus timer
62 void slotNewMessage(const QString &Body, const QDateTime &Arrival);
64 private slots:
65 void slotChatSessionDestroyed();
66 void slotSendMessage(Kopete::Message &message);
67 void slotCloseUserInfoDialog(); // Called when the userinfo dialog is getting closed
69 private:
70 bool myWasConnected; // true if protocol connected at last check
72 QTimer checkStatus; // checks the status of this contact every second or so
73 // KActionCollection *myActionCollection;
74 // holds all the protocol specific actions (not many!)
75 Kopete::ChatSession *m_manager;
76 // holds the two message managers - one for email and one for chat
77 WPUserInfo *m_infoDialog;
80 #endif
82 // vim: set noet ts=4 sts=4 sw=4:
83 // kate: tab-width 4; indent-width 4; replace-trailing-space-save on;