Improved support for org.freedesktop.Notifications.
[quassel.git] / src / client / desktopnotifications.h
1 /*
2  * This file was generated by dbusxml2cpp version 0.6
3  * Command line was: dbusxml2cpp -p desktopnotifications org.freedesktop.Notifications.xml
4  *
5  * dbusxml2cpp is Copyright (C) 2006 Trolltech ASA. All rights reserved.
6  *
7  * This is an auto-generated file.
8  * Do not edit! All changes made to it will be lost.
9  */
10
11 #ifndef DESKTOPNOTIFICATIONS_H_1211193208
12 #define DESKTOPNOTIFICATIONS_H_1211193208
13
14 #include <QtCore/QObject>
15 #include <QtCore/QByteArray>
16 #include <QtCore/QList>
17 #include <QtCore/QMap>
18 #include <QtCore/QString>
19 #include <QtCore/QStringList>
20 #include <QtCore/QVariant>
21 #include <QtDBus/QtDBus>
22
23 /*
24  * Proxy class for interface org.freedesktop.Notifications
25  */
26 class OrgFreedesktopNotificationsInterface: public QDBusAbstractInterface
27 {
28     Q_OBJECT
29 public:
30     static inline const char *staticInterfaceName()
31     { return "org.freedesktop.Notifications"; }
32
33 public:
34     OrgFreedesktopNotificationsInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
35
36     ~OrgFreedesktopNotificationsInterface();
37
38 public Q_SLOTS: // METHODS
39     inline QDBusReply<void> CloseNotification(uint id)
40     {
41         QList<QVariant> argumentList;
42         argumentList << qVariantFromValue(id);
43         return callWithArgumentList(QDBus::Block, QLatin1String("CloseNotification"), argumentList);
44     }
45
46     inline QDBusReply<QStringList> GetCapabilities()
47     {
48         QList<QVariant> argumentList;
49         return callWithArgumentList(QDBus::Block, QLatin1String("GetCapabilities"), argumentList);
50     }
51
52     inline QDBusReply<QString> GetServerInformation(QString &vendor, QString &version)
53     {
54         QList<QVariant> argumentList;
55         QDBusMessage reply = callWithArgumentList(QDBus::Block, QLatin1String("GetServerInformation"), argumentList);
56         if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 3) {
57             vendor = qdbus_cast<QString>(reply.arguments().at(1));
58             version = qdbus_cast<QString>(reply.arguments().at(2));
59         }
60         return reply;
61     }
62
63     inline QDBusReply<uint> Notify(const QString &app_name, uint replaces_id, const QString &app_icon, const QString &summary, const QString &body, const QStringList &actions, const QVariantMap &hints, int expire_timeout)
64     {
65         QList<QVariant> argumentList;
66         argumentList << qVariantFromValue(app_name) << qVariantFromValue(replaces_id) << qVariantFromValue(app_icon) << qVariantFromValue(summary) << qVariantFromValue(body) << qVariantFromValue(actions) << qVariantFromValue(hints) << qVariantFromValue(expire_timeout);
67         return callWithArgumentList(QDBus::Block, QLatin1String("Notify"), argumentList);
68     }
69
70 Q_SIGNALS: // SIGNALS
71     void ActionInvoked(uint id, const QString &action);
72     void NotificationClosed(uint id, uint reason);
73 };
74
75 namespace org {
76   namespace freedesktop {
77     typedef ::OrgFreedesktopNotificationsInterface Notifications;
78   }
79 }
80 #endif