1 /***************************************************************************
2 wpaccount.h - Base class for the Kopete WP account
4 begin : Fri Apr 26 2002
5 copyright : (C) 2002 by Gav Wood
6 email : gav@indigoarchive.net
8 Based on code from : (C) 2002 by Duncan Mac-Vicar Prett
10 ***************************************************************************/
12 /***************************************************************************
14 * This program is free software; you can redistribute it and/or modify *
15 * it under the terms of the GNU General Public License as published by *
16 * the Free Software Foundation; either version 2 of the License, or *
17 * (at your option) any later version. *
19 ***************************************************************************/
31 #include "kopetemetacontact.h"
32 #include "kopeteaccount.h"
33 #include "kopeteonlinestatus.h"
36 #include "wpcontact.h"
37 #include "wpaddcontact.h"
48 * The actual Account class used by Kopete.
50 class WPAccount
: public Kopete::Account
54 // Kopete::Account overloading
56 WPAccount(WPProtocol
*parent
, const QString
& accountID
);
59 virtual void fillActionMenu( KActionMenu
*actionMenu
); // Per-protocol actions for the systray and the status bar
60 virtual bool hasCustomStatusMenu() const; //Has custom status menu
61 virtual void setAway(bool status
, const QString
&); // Set user away
64 virtual void connect(const Kopete::OnlineStatus
&); // Connect to server
65 virtual void disconnect(); // Disconnect from server
67 void goAvailable() { setAway(false, QString()); } // Two convenience slots
68 void goAway() { setAway(true, QString()); } // for available and away
70 // Stuff used internally & by colleague classes
72 const QStringList
getGroups();
73 const QStringList
getHosts(const QString
&Group
);
75 // Stuff used by WPContact
78 * Returns whether or not the named host is online.
80 bool checkHost(const QString
&Name
);
84 * Dispatches said message to the destination.
86 void slotSendMessage(const QString
&Body
, const QString
&Destination
);
89 * Called when a new message arrives with the message's data.
91 void slotGotNewMessage(const QString
&Body
, const QDateTime
&Arrival
, const QString
&From
);
93 /* Reimplemented from Kopete::Account */
94 void setOnlineStatus( const Kopete::OnlineStatus
&status
, const Kopete::StatusMessage
&reason
= Kopete::StatusMessage());
95 void setStatusMessage(const Kopete::StatusMessage
& statusMessage
);
98 virtual bool createContact(const QString
&contactId
, Kopete::MetaContact
*parentContact
);
101 // void updateAccountId();
104 WPProtocol
*mProtocol
;
105 QString theAwayMessage
; // The message to give when the user is away
110 // vim: set noet ts=4 sts=4 sw=4:
111 // kate: tab-width 4; indent-width 4; replace-trailing-space-save on;