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

Nepomuk-Core

  • KTp
global-contact-manager.h
Go to the documentation of this file.
1 /*
2  * This file is part of telepathy-common-internals
3  *
4  * Copyright (C) 2012 David Edmundson <kde@davidedmundson.co.uk>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef GLOBALCONTACTMANAGER_H
22 #define GLOBALCONTACTMANAGER_H
23 
24 #include <QObject>
25 
26 #include <TelepathyQt/Types>
27 #include <TelepathyQt/ContactManager>
28 
29 #include <KTp/ktp-export.h>
30 
31 namespace KTp {
32 
33 class GlobalContactManagerPrivate;
34 
35 class KTP_EXPORT GlobalContactManager : public QObject
36 {
37  Q_OBJECT
38 public:
39  explicit GlobalContactManager(const Tp::AccountManagerPtr &accountManager, QObject *parent = 0);
40  virtual ~GlobalContactManager();
41 
42  Tp::Contacts allKnownContacts() const;
43  Tp::AccountPtr accountForConnection(const Tp::ConnectionPtr &connection) const;
44  Tp::AccountPtr accountForContact(const Tp::ContactPtr &contact) const;
45  Tp::AccountPtr accountForAccountId(const QString &accountId) const;
46 
47 Q_SIGNALS:
48  void allKnownContactsChanged(const Tp::Contacts &contactsAdded, const Tp::Contacts &contactsRemoved);
49  void presencePublicationRequested(const Tp::Contacts);
50 
51 private Q_SLOTS:
52  void onAccountManagerReady(Tp::PendingOperation *op);
53  void onNewAccount(const Tp::AccountPtr &account);
54  void onConnectionChanged(const Tp::ConnectionPtr &connection);
55  void onContactManagerStateChanged(Tp::ContactListState state);
56 
57 private:
58  void onContactManagerStateChanged(const Tp::ContactManagerPtr &contactManager, Tp::ContactListState state);
59 
60  GlobalContactManagerPrivate *d;
61 };
62 }
63 
64 #endif // GLOBALCONTACTLIST_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Fri Mar 22 2013 10:58:52 by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ktp-common-internals API Reference

Skip menu "ktp-common-internals API Reference"
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