mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 16:07:23 -06:00
Move GUI-related sources into gui subdir.
This commit is contained in:
26
src/gui/qtnotify/notifications.cpp
Normal file
26
src/gui/qtnotify/notifications.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* This file was generated by qdbusxml2cpp version 0.7
|
||||
* Command line was: qdbusxml2cpp -p notifications.h:notifications.cpp notifications.xml
|
||||
*
|
||||
* qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
*
|
||||
* This is an auto-generated file.
|
||||
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||
* before re-generating it.
|
||||
*/
|
||||
|
||||
#include "notifications.h"
|
||||
|
||||
/*
|
||||
* Implementation of interface class OrgFreedesktopNotificationsInterface
|
||||
*/
|
||||
|
||||
OrgFreedesktopNotificationsInterface::OrgFreedesktopNotificationsInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
|
||||
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||
{
|
||||
}
|
||||
|
||||
OrgFreedesktopNotificationsInterface::~OrgFreedesktopNotificationsInterface()
|
||||
{
|
||||
}
|
||||
|
||||
84
src/gui/qtnotify/notifications.h
Normal file
84
src/gui/qtnotify/notifications.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* This file was generated by qdbusxml2cpp version 0.7
|
||||
* Command line was: qdbusxml2cpp -p notifications.h:notifications.cpp notifications.xml
|
||||
*
|
||||
* qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
*
|
||||
* This is an auto-generated file.
|
||||
* Do not edit! All changes made to it will be lost.
|
||||
*/
|
||||
|
||||
#ifndef NOTIFICATIONS_H_1301681398
|
||||
#define NOTIFICATIONS_H_1301681398
|
||||
|
||||
#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 OrgFreedesktopNotificationsInterface: public QDBusAbstractInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static inline const char *staticInterfaceName()
|
||||
{ return "org.freedesktop.Notifications"; }
|
||||
|
||||
public:
|
||||
OrgFreedesktopNotificationsInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
|
||||
|
||||
~OrgFreedesktopNotificationsInterface();
|
||||
|
||||
public Q_SLOTS: // METHODS
|
||||
inline QDBusPendingReply<> CloseNotification(uint id)
|
||||
{
|
||||
QList<QVariant> argumentList;
|
||||
argumentList << qVariantFromValue(id);
|
||||
return asyncCallWithArgumentList(QLatin1String("CloseNotification"), argumentList);
|
||||
}
|
||||
|
||||
inline QDBusPendingReply<QStringList> GetCapabilities()
|
||||
{
|
||||
QList<QVariant> argumentList;
|
||||
return asyncCallWithArgumentList(QLatin1String("GetCapabilities"), argumentList);
|
||||
}
|
||||
|
||||
inline QDBusPendingReply<QString, QString, QString, QString> GetServerInformation()
|
||||
{
|
||||
QList<QVariant> argumentList;
|
||||
return asyncCallWithArgumentList(QLatin1String("GetServerInformation"), argumentList);
|
||||
}
|
||||
inline QDBusReply<QString> GetServerInformation(QString &return_vendor, QString &return_version, QString &return_spec_version)
|
||||
{
|
||||
QList<QVariant> argumentList;
|
||||
QDBusMessage reply = callWithArgumentList(QDBus::Block, QLatin1String("GetServerInformation"), argumentList);
|
||||
if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 4) {
|
||||
return_vendor = qdbus_cast<QString>(reply.arguments().at(1));
|
||||
return_version = qdbus_cast<QString>(reply.arguments().at(2));
|
||||
return_spec_version = qdbus_cast<QString>(reply.arguments().at(3));
|
||||
}
|
||||
return reply;
|
||||
}
|
||||
|
||||
inline QDBusPendingReply<uint> Notify(const QString &app_name, uint id, const QString &icon, const QString &summary, const QString &body, const QStringList &actions, const QVariantMap &hints, int timeout)
|
||||
{
|
||||
QList<QVariant> argumentList;
|
||||
argumentList << qVariantFromValue(app_name) << qVariantFromValue(id) << qVariantFromValue(icon) << qVariantFromValue(summary) << qVariantFromValue(body) << qVariantFromValue(actions) << qVariantFromValue(hints) << qVariantFromValue(timeout);
|
||||
return asyncCallWithArgumentList(QLatin1String("Notify"), argumentList);
|
||||
}
|
||||
|
||||
Q_SIGNALS: // SIGNALS
|
||||
};
|
||||
|
||||
namespace org {
|
||||
namespace freedesktop {
|
||||
typedef ::OrgFreedesktopNotificationsInterface Notifications;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
31
src/gui/qtnotify/notifications.xml
Normal file
31
src/gui/qtnotify/notifications.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="org.freedesktop.Notifications">
|
||||
<method name="GetServerInformation">
|
||||
<arg name="return_name" type="s" direction="out"/>
|
||||
<arg name="return_vendor" type="s" direction="out"/>
|
||||
<arg name="return_version" type="s" direction="out"/>
|
||||
<arg name="return_spec_version" type="s" direction="out"/>
|
||||
</method>
|
||||
<method name="GetCapabilities">
|
||||
<arg name="return_caps" type="as" direction="out"/>
|
||||
</method>
|
||||
<method name="CloseNotification">
|
||||
<arg name="id" type="u" direction="in"/>
|
||||
</method>
|
||||
<method name="Notify">
|
||||
<arg name="app_name" type="s" direction="in"/>
|
||||
<arg name="id" type="u" direction="in"/>
|
||||
<arg name="icon" type="s" direction="in"/>
|
||||
<arg name="summary" type="s" direction="in"/>
|
||||
<arg name="body" type="s" direction="in"/>
|
||||
<arg name="actions" type="as" direction="in"/>
|
||||
<arg name="hints" type="a{sv}" direction="in"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In6" value="QVariantMap"/>
|
||||
<arg name="timeout" type="i" direction="in"/>
|
||||
<arg name="return_id" type="u" direction="out"/>
|
||||
</method>
|
||||
</interface>
|
||||
</node>
|
||||
|
||||
5
src/gui/qtnotify/qtnotify.pri
Normal file
5
src/gui/qtnotify/qtnotify.pri
Normal file
@@ -0,0 +1,5 @@
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
HEADERS += $$PWD/notifications.h
|
||||
|
||||
SOURCES += $$PWD/notifications.cpp
|
||||
Reference in New Issue
Block a user