Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdbusmenuregistrarproxy_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 Dmitry Shachnev <mitya57@gmail.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4/*
5 * This file was originally created by qdbusxml2cpp version 0.8
6 * Command line was: qdbusxml2cpp -p qdbusmenuregistrarproxy ../../3rdparty/dbus-ifaces/com.canonical.AppMenu.Registrar.xml
7 *
8 * However it is maintained manually.
9 */
10
11#ifndef QDBUSMENUREGISTRARPROXY_P_H
12#define QDBUSMENUREGISTRARPROXY_P_H
13
14//
15// W A R N I N G
16// -------------
17//
18// This file is not part of the Qt API. It exists purely as an
19// implementation detail. This header file may change from version to
20// version without notice, or even be removed.
21//
22// We mean it.
23//
24
25#include <QtCore/QObject>
26#include <QtCore/QByteArray>
27#include <QtCore/QList>
28#include <QtCore/QString>
29#include <QtCore/QVariant>
30#include <QtDBus/QDBusAbstractInterface>
31#include <QtDBus/QDBusConnection>
32#include <QtDBus/QDBusReply>
33#include <QtCore/private/qglobal_p.h>
34
36
37/*
38 * Proxy class for interface com.canonical.AppMenu.Registrar
39 */
41{
43public:
44 static inline const char *staticInterfaceName()
45 {
46 return "com.canonical.AppMenu.Registrar";
47 }
48
49public:
51 const QString &path,
53 QObject *parent = nullptr);
54
56
57public Q_SLOTS: // METHODS
58 QDBusPendingReply<QString, QDBusObjectPath> GetMenuForWindow(uint windowId)
59 {
60 return asyncCall(QStringLiteral("GetMenuForWindow"), windowId);
61 }
62 QDBusReply<QString> GetMenuForWindow(uint windowId, QDBusObjectPath &menuObjectPath)
63 {
64 QDBusMessage reply = call(QDBus::Block, QStringLiteral("GetMenuForWindow"), windowId);
65 QList<QVariant> arguments = reply.arguments();
66 if (reply.type() == QDBusMessage::ReplyMessage && arguments.size() == 2)
67 menuObjectPath = qdbus_cast<QDBusObjectPath>(arguments.at(1));
68 return reply;
69 }
70
71 QDBusPendingReply<> RegisterWindow(uint windowId, const QDBusObjectPath &menuObjectPath)
72 {
73 return asyncCall(QStringLiteral("RegisterWindow"), windowId, menuObjectPath);
74 }
75
77 {
78 return asyncCall(QStringLiteral("UnregisterWindow"), windowId);
79 }
80};
81
83
84#endif // QDBUSMENUREGISTRARPROXY_P_H
QString service() const
Returns the name of the service this interface is associated with.
QDBusMessage call(const QString &method)
QDBusPendingCall asyncCall(const QString &method)
QDBusConnection connection() const
Returns the connection this interface is associated with.
\inmodule QtDBus
static const char * staticInterfaceName()
QDBusPendingReply RegisterWindow(uint windowId, const QDBusObjectPath &menuObjectPath)
QDBusReply< QString > GetMenuForWindow(uint windowId, QDBusObjectPath &menuObjectPath)
QDBusMenuRegistrarInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent=nullptr)
QDBusPendingReply UnregisterWindow(uint windowId)
QDBusPendingReply< QString, QDBusObjectPath > GetMenuForWindow(uint windowId)
\inmodule QtDBus
\inmodule QtDBus
qsizetype size() const noexcept
Definition qlist.h:397
const_reference at(qsizetype i) const noexcept
Definition qlist.h:446
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QList< QVariant > arguments
Combined button and popup list for selecting options.
GLsizei const GLchar *const * path
#define QStringLiteral(str)
#define Q_OBJECT
#define Q_SLOTS
unsigned int uint
Definition qtypes.h:34
QNetworkReply * reply