This repository has been archived by the owner on Apr 29, 2020. It is now read-only.
/
dbusnotify.h
142 lines (128 loc) · 5.05 KB
/
dbusnotify.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/*
* Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* This file was generated by qdbusxml2cpp version 0.8
* Command line was: qdbusxml2cpp -c DBusNotify -p dbusnotify org.freedesktop.Notifications.xml
*
* qdbusxml2cpp is Copyright (C) 2016 The Qt Company Ltd.
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*/
#ifndef DBUSNOTIFY_H
#define DBUSNOTIFY_H
#include <QtCore/QObject>
#include <QtCore/QByteArray>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QVariant>
#include <QtDBus/QtDBus>
/*
* Proxy class for interface org.freedesktop.Notifications
*/
class DBusNotify: public QDBusAbstractInterface
{
Q_OBJECT
Q_SLOT void __propertyChanged__(const QDBusMessage& msg)
{
QList<QVariant> arguments = msg.arguments();
if (3 != arguments.count())
return;
QString interfaceName = msg.arguments().at(0).toString();
if (interfaceName !="org.freedesktop.Notifications")
return;
QVariantMap changedProps = qdbus_cast<QVariantMap>(arguments.at(1).value<QDBusArgument>());
QStringList keys = changedProps.keys();
foreach(const QString &prop, keys) {
const QMetaObject* self = metaObject();
for (int i=self->propertyOffset(); i < self->propertyCount(); ++i) {
QMetaProperty p = self->property(i);
if (p.name() == prop) {
Q_EMIT p.notifySignal().invoke(this);
}
}
}
}
public:
static inline const char *staticInterfaceName()
{ return "org.freedesktop.Notifications"; }
public:
DBusNotify(QObject *parent = 0);
~DBusNotify();
public Q_SLOTS: // METHODS
inline QDBusPendingReply<> ClearRecords()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QStringLiteral("ClearRecords"), argumentList);
}
inline QDBusPendingReply<> CloseNotification(uint in0)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(in0);
return asyncCallWithArgumentList(QStringLiteral("CloseNotification"), argumentList);
}
inline QDBusPendingReply<QString> GetAllRecords()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QStringLiteral("GetAllRecords"), argumentList);
}
inline QDBusPendingReply<QStringList> GetCapbilities()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QStringLiteral("GetCapbilities"), argumentList);
}
inline QDBusPendingReply<QString, QString, QString, QString> GetServerInformation()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QStringLiteral("GetServerInformation"), argumentList);
}
inline QDBusReply<QString> GetServerInformation(QString &out1, QString &out2, QString &out3)
{
QList<QVariant> argumentList;
QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetServerInformation"), argumentList);
if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 4) {
out1 = qdbus_cast<QString>(reply.arguments().at(1));
out2 = qdbus_cast<QString>(reply.arguments().at(2));
out3 = qdbus_cast<QString>(reply.arguments().at(3));
}
return reply;
}
inline QDBusPendingReply<uint> Notify(const QString &in0, uint in1, const QString &in2, const QString &in3, const QString &in4, const QStringList &in5, const QVariantMap &in6, int in7)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(in0) << QVariant::fromValue(in1) << QVariant::fromValue(in2) << QVariant::fromValue(in3) << QVariant::fromValue(in4) << QVariant::fromValue(in5) << QVariant::fromValue(in6) << QVariant::fromValue(in7);
return asyncCallWithArgumentList(QStringLiteral("Notify"), argumentList);
}
inline QDBusPendingReply<> RemoveRecord(const QString &in0)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(in0);
return asyncCallWithArgumentList(QStringLiteral("RemoveRecord"), argumentList);
}
Q_SIGNALS: // SIGNALS
void ActionInvoked(uint in0, const QString &in1);
void NotificationClosed(uint in0, uint in1);
void RecordAdded(const QString &in0);
};
namespace org {
namespace freedesktop {
typedef ::DBusNotify Notifications;
}
}
#endif