Implement AIM presence based on ICQ presence.
[kdenetwork.git] / kopete / protocols / oscar / icq / icqaccount.h
blob641d3493744e415ace6762de67f24a75f1133ba4
1 /*
2 icqaccount.h - ICQ Account Class Header
4 Copyright (c) 2002 by Chris TenHarmsel <tenharmsel@staticmethod.net>
5 Copyright (c) 2004 by Richard Smith <kde@metafoo.co.uk>
6 Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
8 *************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 *************************************************************************
19 #ifndef ICQACCOUNT_H
20 #define ICQACCOUNT_H
22 #include "oscaraccount.h"
23 #include "oscarmyselfcontact.h"
25 #include "icqpresence.h"
26 #include "oscartypeclasses.h"
28 class KAction;
29 namespace Kopete { class AwayAction; class StatusMessage; }
30 class ICQProtocol;
31 class ICQAccount;
32 class ICQUserInfoWidget;
33 class ICQContact;
35 class ICQMyselfContact : public OscarMyselfContact
37 Q_OBJECT
38 public:
39 ICQMyselfContact( ICQAccount *acct );
40 void userInfoUpdated();
42 public slots:
43 void receivedShortInfo( const QString& );
44 void fetchShortInfo();
48 class ICQAccount : public OscarAccount
50 Q_OBJECT
52 public:
53 ICQAccount( Kopete::Protocol *parent, QString accountID );
54 virtual ~ICQAccount();
56 ICQProtocol *protocol();
58 // Accessor method for the action menu
59 virtual KActionMenu* actionMenu();
61 /** Reimplementation from Kopete::Account */
62 void setOnlineStatus( const Kopete::OnlineStatus&, const Kopete::StatusMessage &reason = Kopete::StatusMessage() );
63 void setStatusMessage( const Kopete::StatusMessage& );
65 void connectWithPassword( const QString &password );
67 void setUserProfile( const QString &profile );
69 protected:
70 virtual OscarContact *createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const OContact& ssiItem );
72 protected slots:
73 virtual void disconnected( DisconnectReason reason );
76 private:
77 ICQ::Presence presence();
79 void setInvisible( ICQ::Presence::Visibility );
80 void setPresenceType( ICQ::Presence::Type, const QString &awayMessage = QString::null );
81 void setPresenceTarget( const ICQ::Presence &presence, const QString &message = QString::null );
83 //const unsigned long fullStatus( const unsigned long plainStatus );
85 private slots:
86 void slotToggleInvisible();
88 void slotUserInfo();
89 void storeUserInfoDialog();
90 void closeUserInfoDialog();
92 void userReadsStatusMessage( const QString& contact );
94 private:
95 bool mWebAware;
96 bool mHideIP;
97 QString mInitialStatusMessage;
98 ICQUserInfoWidget* mInfoWidget;
99 ICQContact* mInfoContact;
102 #endif
103 //kate: indent-mode csands;