• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kopete/libkopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • libkopete
kopeteaccountmanager.h
Go to the documentation of this file.
1 /*
2  kopeteaccountmanager.h - Kopete Account Manager
3 
4  Copyright (c) 2002-2003 by Martijn Klingens <klingens@kde.org>
5  Copyright (c) 2003-2005 by Olivier Goffart <ogoffart@kde.org>
6 
7  Kopete (c) 2002-2007 by the Kopete developers <kopete-devel@kde.org>
8 
9  *************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Lesser General Public *
13  * License as published by the Free Software Foundation; either *
14  * version 2 of the License, or (at your option) any later version. *
15  * *
16  *************************************************************************
17 */
18 
19 #ifndef KOPETEACCOUNTMANAGER_H
20 #define KOPETEACCOUNTMANAGER_H
21 
22 #include <QtCore/QObject>
23 #include <QtGui/QColor>
24 
25 #include "kopete_export.h"
26 
27 #include "kopetestatusmessage.h"
28 
29 namespace Kopete {
30 
31 class Account;
32 class Plugin;
33 class Protocol;
34 class Contact;
35 class OnlineStatus;
36 class StatusMessage;
37 
47 class KOPETE_EXPORT AccountManager : public QObject
48 {
49  Q_OBJECT
50 
51 public:
61  static AccountManager* self();
62 
63  ~AccountManager();
64 
69  const QList<Account *> & accounts() const;
70 
79  QList<Account*> accounts( Kopete::Protocol* protocol ) const;
80 
87  Account* findAccount( const QString &protocolId, const QString &accountId );
88 
94  void removeAccount( Account *account );
95 
102  QColor guessColor( Protocol *protocol ) const ;
103 
112  Account *registerAccount( Account *account );
113 
118  bool isAnyAccountConnected() const;
119 
125  enum SetOnlineStatusFlag { ConnectIfOffline=0x01 };
126 
127 
128 public slots:
141  void setOnlineStatus( /*Kopete::OnlineStatusManager::Categories*/ uint category,
142  const Kopete::StatusMessage &statusMessage,
143  uint flags,
144  bool forced );
145 
146  void setOnlineStatus( /*Kopete::OnlineStatusManager::Categories*/ uint category,
147  const Kopete::StatusMessage &statusMessage = Kopete::StatusMessage(),
148  uint flags = 0 );
149 
155  void setStatusMessage(const QString &message);
156 
160  void suspend();
161 
166  bool resume();
167 
172  void save();
173 
178  void load();
179 
180 
181 
182 signals:
186  void accountRegistered( Kopete::Account *account );
187 
193  void accountUnregistered( const Kopete::Account *account );
194 
202  void accountOnlineStatusChanged(Kopete::Account *account,
203  const Kopete::OnlineStatus &oldStatus, const Kopete::OnlineStatus &newStatus);
204 
205 private:
209  AccountManager();
210 
211 private slots:
215  void networkConnected();
219  void networkDisconnected();
220 
221  void slotPluginLoaded( Kopete::Plugin *plugin );
222  void slotAccountOnlineStatusChanged(Kopete::Contact *c,
223  const Kopete::OnlineStatus &oldStatus, const Kopete::OnlineStatus &newStatus);
224 
229  void unregisterAccount( const Kopete::Account *account );
230 
231  void removeAccountConnectedChanged();
232 
236  void removeAccountInternal();
237 
238 private:
239  static AccountManager *s_self;
240  class Private;
241  Private * const d;
242 };
243 
244 } //END namespace Kopete
245 
246 
247 #endif
248 
249 
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
Kopete::OnlineStatus
Definition: kopeteonlinestatus.h:68
Kopete::StatusMessage
This class encapsulate a status message.
Definition: kopetestatusmessage.h:48
Kopete::Protocol
base class of every protocol.
Definition: kopeteprotocol.h:62
QObject
kopetestatusmessage.h
Kopete::AccountManager
AccountManager manages all defined accounts in Kopete.
Definition: kopeteaccountmanager.h:47
kopete_export.h
Kopete::AccountManager::SetOnlineStatusFlag
SetOnlineStatusFlag
Flag to be used in setOnlineStatus.
Definition: kopeteaccountmanager.h:125
QString
QList
QColor
Kopete::Contact
Definition: kopetecontact.h:58
Kopete::Plugin
Base class for all plugins or protocols.
Definition: kopeteplugin.h:84
Kopete::Account
The Kopete::Account class handles one account.
Definition: kopeteaccount.h:72
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal