1 /***************************************************************************
2 wpcontact.h - description
4 begin : Fri Apr 12 2002
5 copyright : (C) 2002 by Gav Wood
6 email : gav@indigoarchive.net
7 ***************************************************************************/
9 /***************************************************************************
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. *
16 ***************************************************************************/
25 #include <qdatetime.h>
28 #include <qstringlist.h>
31 #include "kopetecontact.h"
32 #include "kopetecontactlist.h"
33 #include "kopetechatsessionmanager.h"
34 #include "kopetechatsession.h"
35 #include "kopetemessage.h"
38 #include "wpprotocol.h"
39 #include "wpuserinfo.h"
44 namespace Kopete
{ class MetaContact
; }
46 class WPContact
: public Kopete::Contact
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
);
60 virtual void slotUserInfo();
61 void slotCheckStatus(); // the call back for the checkStatus timer
62 void slotNewMessage(const QString
&Body
, const QDateTime
&Arrival
);
65 void slotChatSessionDestroyed();
66 void slotSendMessage(Kopete::Message
&message
);
67 void slotCloseUserInfoDialog(); // Called when the userinfo dialog is getting closed
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
;
82 // vim: set noet ts=4 sts=4 sw=4:
83 // kate: tab-width 4; indent-width 4; replace-trailing-space-save on;