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

KPeople

  • frameworks
  • kpeople
  • src
  • backends
allcontactsmonitor.cpp
1 /*
2  * <one line to give the library's name and an idea of what it does.>
3  * Copyright 2013 David Edmundson <d.edmundson@lboro.ac.uk>
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of
8  * the License or (at your option) version 3 or any later version
9  * accepted by the membership of KDE e.V. (or its successor approved
10  * by the membership of KDE e.V.), which shall act as a proxy
11  * defined in Section 14 of version 3 of the license.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #include "allcontactsmonitor.h"
24 
25 using namespace KPeople;
26 
27 class KPeople::AllContactsMonitorPrivate
28 {
29 public:
30  AllContactsMonitorPrivate():
31  m_initialFetchDone(false),
32  m_initialFetchSucccess(false)
33  {
34  }
35 
36  bool m_initialFetchDone;
37  bool m_initialFetchSucccess;
38 };
39 
40 AllContactsMonitor::AllContactsMonitor():
41  QObject(),
42  d_ptr(new AllContactsMonitorPrivate)
43 {
44 
45 }
46 AllContactsMonitor::~AllContactsMonitor()
47 {
48  delete d_ptr;
49 }
50 
51 QMap<QString, AbstractContact::Ptr> AllContactsMonitor::contacts()
52 {
53  return QMap<QString, AbstractContact::Ptr>();
54 }
55 
56 bool AllContactsMonitor::isInitialFetchComplete() const
57 {
58  return d_ptr->m_initialFetchDone;
59 }
60 
61 bool AllContactsMonitor::initialFetchSuccess() const
62 {
63  return d_ptr->m_initialFetchSucccess;
64 }
65 
66 void AllContactsMonitor::emitInitialFetchComplete(bool success)
67 {
68  d_ptr->m_initialFetchDone = true;
69  d_ptr->m_initialFetchSucccess = success;
70  Q_EMIT initialFetchComplete(success);
71 }
72 
73 #include "allcontactsmonitor.moc"
KPeople
The KPeople namespace contains all the classes for Libkpeople.
KPeople::AllContactsMonitor::initialFetchComplete
void initialFetchComplete(bool success)
Notifies that the DataSource has completed it's initial fetch.
KPeople::AllContactsMonitor::contacts
virtual QMap< QString, AbstractContact::Ptr > contacts()
Returns all currently loaded contacts.
Definition: allcontactsmonitor.cpp:51
KPeople::AllContactsMonitor::emitInitialFetchComplete
void emitInitialFetchComplete(bool success)
DataSources should call this once they have finished initial retrieval of all contacts from their sto...
Definition: allcontactsmonitor.cpp:66
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