• Skip to content
  • Skip to link menu
KDE API Documentation - allcontactsmonitor.h Source File (KPeople)
  • KDE Home
  • Contact Us
 

KPeople

  • frameworks
  • kpeople
  • src
  • backends
allcontactsmonitor.h
1 /*
2  * Copyright 2013 David Edmundson <d.edmundson@lboro.ac.uk>
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of
7  * the License or (at your option) version 3 or any later version
8  * accepted by the membership of KDE e.V. (or its successor approved
9  * by the membership of KDE e.V.), which shall act as a proxy
10  * defined in Section 14 of version 3 of the license.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef ALLCONTACTSMONITOR_H
23 #define ALLCONTACTSMONITOR_H
24 
25 #include <QObject>
26 #include <QSharedPointer>
27 
28 #include <kpeople/kpeople_export.h>
29 #include <kpeoplebackend/abstractcontact.h>
30 
31 namespace KPeople
32 {
33 
34 class AllContactsMonitorPrivate;
35 
43 class KPEOPLE_EXPORT AllContactsMonitor : public QObject
44 {
45  Q_OBJECT
46 public:
47  explicit AllContactsMonitor(); //TODO make protected? this isn't useful unless subclassed
48  virtual ~AllContactsMonitor();
49 
53  virtual QMap<QString, AbstractContact::Ptr> contacts();
54 
55  //TODO redo as a state enum - InitialLoad, Fail, Loaded
56  bool isInitialFetchComplete() const;
57 
58  bool initialFetchSuccess() const;
59 
60 Q_SIGNALS:
64  void contactChanged(const QString &contactUri, const AbstractContact::Ptr &contact);
65 
69  void contactAdded(const QString &contactUri, const AbstractContact::Ptr &contact);
70 
74  void contactRemoved(const QString &contactUri);
75 
84  void initialFetchComplete(bool success);
85 
86 protected Q_SLOTS:
95  void emitInitialFetchComplete(bool success);
96 
97 private:
98  Q_DISABLE_COPY(AllContactsMonitor)
99  Q_DECLARE_PRIVATE(AllContactsMonitor)
100  AllContactsMonitorPrivate *d_ptr;
101 };
102 
103 }
104 typedef QSharedPointer<KPeople::AllContactsMonitor> AllContactsMonitorPtr;
105 
106 #endif // ALLCONTACTSMONITOR_H
KPeople
The KPeople namespace contains all the classes for Libkpeople.
KPeople::AllContactsMonitor
This class should be subclassed by each datasource and return a list of all contacts that the datasou...
Definition: allcontactsmonitor.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2015 The KDE developers.
Generated on Fri Feb 13 2015 15:16:39 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KPeople

Skip menu "KPeople"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List

Class Picker

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