/*
 * This file was generated by qdbusxml2cpp version 0.8
 * Source file was org.freedesktop.NetworkManager.xml
 *
 * qdbusxml2cpp is Copyright (C) The Qt Company Ltd. and other contributors.
 *
 * This is an auto-generated file.
 * Do not edit! All changes made to it will be lost.
 */

#ifndef DBUS_NM_BACKEND_H
#define DBUS_NM_BACKEND_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>
#include "/build/quickshell/src/quickshell/src/network/nm/dbus_types.hpp"

/*
 * Proxy class for interface org.freedesktop.NetworkManager
 */
class DBusNetworkManagerProxy: public QDBusAbstractInterface
{
    Q_OBJECT
public:
    static inline const char *staticInterfaceName()
    { return "org.freedesktop.NetworkManager"; }

public:
    DBusNetworkManagerProxy(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);

    ~DBusNetworkManagerProxy();

public Q_SLOTS: // METHODS
    inline QDBusPendingReply<QDBusObjectPath> ActivateConnection(const QDBusObjectPath &connection, const QDBusObjectPath &device, const QDBusObjectPath &specific_object)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(connection) << QVariant::fromValue(device) << QVariant::fromValue(specific_object);
        return asyncCallWithArgumentList(QStringLiteral("ActivateConnection"), argumentList);
    }

    inline QDBusPendingReply<QDBusObjectPath, QDBusObjectPath> AddAndActivateConnection(qs::network::NMSettingsMap connection, const QDBusObjectPath &device, const QDBusObjectPath &specific_object)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(connection) << QVariant::fromValue(device) << QVariant::fromValue(specific_object);
        return asyncCallWithArgumentList(QStringLiteral("AddAndActivateConnection"), argumentList);
    }
    inline QDBusReply<QDBusObjectPath> AddAndActivateConnection(qs::network::NMSettingsMap connection, const QDBusObjectPath &device, const QDBusObjectPath &specific_object, QDBusObjectPath &active_connection)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(connection) << QVariant::fromValue(device) << QVariant::fromValue(specific_object);
        QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("AddAndActivateConnection"), argumentList);
        if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().size() == 2) {
            active_connection = qdbus_cast<QDBusObjectPath>(reply.arguments().at(1));
        }
        return reply;
    }

    inline QDBusPendingReply<uint> CheckConnectivity()
    {
        QList<QVariant> argumentList;
        return asyncCallWithArgumentList(QStringLiteral("CheckConnectivity"), argumentList);
    }

    inline QDBusPendingReply<QList<QDBusObjectPath> > GetAllDevices()
    {
        QList<QVariant> argumentList;
        return asyncCallWithArgumentList(QStringLiteral("GetAllDevices"), argumentList);
    }

Q_SIGNALS: // SIGNALS
    void DeviceAdded(const QDBusObjectPath &device_path);
    void DeviceRemoved(const QDBusObjectPath &device_path);
};

#endif
