2 * Copyright (C) 2008 Dmitry Suzdalev <dimsuz@gmail.com>
4 * This program is free software you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
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
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
21 #ifndef NOTIFICATIONSENGINE_H
22 #define NOTIFICATIONSENGINE_H
24 #include <Plasma/DataEngine>
30 * Engine which provides data sources for notifications.
31 * Each notification is represented by one source.
33 class NotificationsEngine
: public Plasma::DataEngine
38 NotificationsEngine( QObject
* parent
, const QVariantList
& args
);
39 ~NotificationsEngine();
44 * This function implements part of Notifications DBus interface.
45 * Once called, will add notification source to the engine
47 uint
Notify(const QString
&app_name
, uint replaces_id
, const QString
&event_id
, const QString
&app_icon
, const QString
&summary
, const QString
&body
, const QStringList
&actions
, const QVariantMap
&hints
, int timeout
);
49 void CloseNotification( uint id
);
51 Plasma::Service
* serviceForSource(const QString
& source
);
54 void NotificationClosed( uint id
, uint reason
);
55 void ActionInvoked( uint id
, const QString
& actionKey
);
59 * Holds the id that will be assigned to the next notification source
60 * that will be created
64 friend class NotificationAction
;