~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to plasma/generic/applets/notifications/protocols/notifications/dbusnotificationprotocol.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   dbusnotificationprotocol.h                                            *
 
3
 *                                                                         *
 
4
 *   Copyright (C) 2008 Jason Stubbs <jasonbstubbs@gmail.com>              *
 
5
 *   Copyright (C) 2008 Dmitry Suzdalev <dimsuz@gmail.com>                 *
 
6
 *                                                                         *
 
7
 *   This program is free software; you can redistribute it and/or modify  *
 
8
 *   it under the terms of the GNU General Public License as published by  *
 
9
 *   the Free Software Foundation; either version 2 of the License, or     *
 
10
 *   (at your option) any later version.                                   *
 
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, write to the                         *
 
19
 *   Free Software Foundation, Inc.,                                       *
 
20
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
 
21
 ***************************************************************************/
 
22
 
 
23
#ifndef DBUSNOTIFICATIONPROTOCOL_H
 
24
#define DBUSNOTIFICATIONPROTOCOL_H
 
25
 
 
26
#include "../../core/protocol.h"
 
27
#include "../../core/notificationsmanager.h"
 
28
 
 
29
#include <QHash>
 
30
 
 
31
#include <Plasma/DataEngine>
 
32
 
 
33
 
 
34
class DBusNotification;
 
35
 
 
36
class DBusNotificationProtocol : public Protocol
 
37
{
 
38
    Q_OBJECT
 
39
 
 
40
public:
 
41
    DBusNotificationProtocol(Manager *parent);
 
42
    ~DBusNotificationProtocol();
 
43
    void init();
 
44
 
 
45
private slots:
 
46
    void prepareNotification(const QString &source);
 
47
    void dataUpdated(const QString &source, const Plasma::DataEngine::Data &data);
 
48
    void removeNotification(const QString &source);
 
49
    void notificationDeleted(const QString &source);
 
50
    void relayAction(const QString &source, const QString &actionId);
 
51
    void unregisterNotification(const QString&);
 
52
    void hideNotification(const QString &source);
 
53
 
 
54
private:
 
55
    Manager *m_manager;
 
56
    Plasma::DataEngine *m_engine;
 
57
    QHash<QString, DBusNotification*> m_notifications;
 
58
};
 
59
 
 
60
 
 
61
 
 
62
#endif