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

akonadi

  • sources
  • kde-4.14
  • kdepimlibs
  • akonadi
notificationsource.cpp
1 /*
2  Copyright (c) 2014 Daniel Vrátil <dvratil@redhat.com>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #include "notificationsource_p.h"
21 
22 using namespace Akonadi;
23 
24 NotificationSource::NotificationSource(QObject *source)
25  : QObject(source)
26 {
27  Q_ASSERT(source);
28 
29  connect(source, SIGNAL(notifyV3(Akonadi::NotificationMessageV3::List)),
30  this, SIGNAL(notifyV3(Akonadi::NotificationMessageV3::List)));
31 }
32 
33 NotificationSource::~NotificationSource()
34 {
35 }
36 
37 void NotificationSource::setAllMonitored(bool allMonitored)
38 {
39  const bool ok = QMetaObject::invokeMethod(parent(), "setAllMonitored",
40  Q_ARG(bool, allMonitored));
41  Q_ASSERT(ok);
42  Q_UNUSED(ok);
43 }
44 
45 void NotificationSource::setMonitoredCollection(Entity::Id id, bool monitored)
46 {
47  const bool ok = QMetaObject::invokeMethod(parent(), "setMonitoredCollection",
48  Q_ARG(qlonglong, id),
49  Q_ARG(bool, monitored));
50  Q_ASSERT(ok);
51  Q_UNUSED(ok);
52 }
53 
54 void NotificationSource::setMonitoredItem(Entity::Id id, bool monitored)
55 {
56  const bool ok = QMetaObject::invokeMethod(parent(), "setMonitoredItem",
57  Q_ARG(qlonglong, id),
58  Q_ARG(bool, monitored));
59  Q_ASSERT(ok);
60  Q_UNUSED(ok);
61 }
62 
63 void NotificationSource::setMonitoredResource(const QByteArray &resource, bool monitored)
64 {
65  const bool ok = QMetaObject::invokeMethod(parent(), "setMonitoredResource",
66  Q_ARG(QByteArray, resource),
67  Q_ARG(bool, monitored));
68  Q_ASSERT(ok);
69  Q_UNUSED(ok);
70 }
71 
72 void NotificationSource::setMonitoredMimeType(const QString &mimeType, bool monitored)
73 {
74  const bool ok = QMetaObject::invokeMethod(parent(), "setMonitoredMimeType",
75  Q_ARG(QString, mimeType),
76  Q_ARG(bool, monitored));
77  Q_ASSERT(ok);
78  Q_UNUSED(ok);
79 }
80 
81 void NotificationSource::setIgnoredSession(const QByteArray &session, bool ignored)
82 {
83  const bool ok = QMetaObject::invokeMethod(parent(), "setIgnoredSession",
84  Q_ARG(QByteArray, session),
85  Q_ARG(bool, ignored));
86  Q_ASSERT(ok);
87  Q_UNUSED(ok);
88 }
89 
90 void NotificationSource::setMonitoredTag(Tag::Id id, bool monitored)
91 {
92  const bool ok = QMetaObject::invokeMethod(parent(), "setMonitoredTag",
93  Q_ARG(qlonglong, id),
94  Q_ARG(bool, monitored));
95  Q_ASSERT(ok);
96  Q_UNUSED(ok);
97 }
98 
99 void NotificationSource::setMonitoredType(NotificationMessageV2::Type type, bool monitored)
100 {
101  const bool ok = QMetaObject::invokeMethod(parent(), "setMonitoredType",
102  Q_ARG(Akonadi::NotificationMessageV2::Type, type),
103  Q_ARG(bool, monitored));
104  Q_ASSERT(ok);
105  Q_UNUSED(ok);
106 }
107 
108 QObject *NotificationSource::source() const
109 {
110  return parent();
111 }
QByteArray
Akonadi::Entity::Id
qint64 Id
Describes the unique id type.
Definition: entity.h:65
QObject
QString
QMetaObject::invokeMethod
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2

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