/*
 * This file was generated by qdbusxml2cpp version 0.8
 * Source file was org.kde.Solid.PowerManagement.PolicyAgent.xml
 *
 * qdbusxml2cpp is Copyright (C) The Qt Company Ltd. and other contributors.
 *
 * This is an auto-generated file.
 * This file may have been hand-edited. Look for HAND-EDIT comments
 * before re-generating it.
 */

#ifndef POWERMANAGEMENTPOLICYAGENTADAPTOR_H
#define POWERMANAGEMENTPOLICYAGENTADAPTOR_H

#include <QtCore/QObject>
#include <QtDBus/QtDBus>
#include "powerdevilpolicyagent.h"
#include <QtCore/qcontainerfwd.h>

/*
 * Adaptor class for interface org.kde.Solid.PowerManagement.PolicyAgent
 */
class PowerManagementPolicyAgentAdaptor: public QDBusAbstractAdaptor
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", "org.kde.Solid.PowerManagement.PolicyAgent")
    Q_CLASSINFO("D-Bus Introspection", ""
"  <interface name=\"org.kde.Solid.PowerManagement.PolicyAgent\">\n"
"    <property access=\"read\" type=\"a(ssssu)\" name=\"RequestedInhibitions\">\n"
"      <annotation value=\"QList&lt;PolicyAgentInhibition&gt;\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"
"    </property>\n"
"    <property access=\"read\" type=\"a(ssssu)\" name=\"ActiveInhibitions\">\n"
"      <annotation value=\"QList&lt;PolicyAgentInhibition&gt;\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"
"    </property>\n"
"    <method name=\"AddInhibition\">\n"
"      <arg direction=\"in\" type=\"u\" name=\"types\"/>\n"
"      <arg direction=\"in\" type=\"s\" name=\"app_name\"/>\n"
"      <arg direction=\"in\" type=\"s\" name=\"reason\"/>\n"
"      <arg direction=\"out\" type=\"u\" name=\"cookie\"/>\n"
"    </method>\n"
"    <method name=\"ReleaseInhibition\">\n"
"      <arg direction=\"in\" type=\"u\" name=\"cookie\"/>\n"
"    </method>\n"
"    <method name=\"HasInhibition\">\n"
"      <arg direction=\"in\" type=\"u\" name=\"types\"/>\n"
"      <arg direction=\"out\" type=\"b\" name=\"has_inhibition\"/>\n"
"    </method>\n"
"    <method name=\"SetInhibitionAllowed\">\n"
"      <arg direction=\"in\" type=\"s\" name=\"who\"/>\n"
"      <arg direction=\"in\" type=\"s\" name=\"why\"/>\n"
"      <arg direction=\"in\" type=\"b\" name=\"allowed\"/>\n"
"    </method>\n"
"    <method name=\"ListInhibitions\">\n"
"      <annotation value=\"true\" name=\"org.freedesktop.DBus.Deprecated\"/>\n"
"      <annotation value=\"QList&lt;QStringList&gt;\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"
"      <arg direction=\"out\" type=\"a{ss}\" name=\"inhibited\"/>\n"
"    </method>\n"
"    <signal name=\"InhibitionsChanged\">\n"
"      <annotation value=\"true\" name=\"org.freedesktop.DBus.Deprecated\"/>\n"
"      <annotation value=\"QList&lt;QStringList&gt;\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"
"      <arg type=\"a{ss}\" name=\"added\"/>\n"
"      <arg type=\"as\" name=\"removed\"/>\n"
"    </signal>\n"
"  </interface>\n"
        "")
public:
    PowerManagementPolicyAgentAdaptor(PowerDevil::PolicyAgent *parent);
    ~PowerManagementPolicyAgentAdaptor() override;

    inline PowerDevil::PolicyAgent *parent() const
    { return static_cast<PowerDevil::PolicyAgent *>(QObject::parent()); }

public: // PROPERTIES
    Q_PROPERTY(QList<PolicyAgentInhibition> ActiveInhibitions READ activeInhibitions)
    QList<PolicyAgentInhibition> activeInhibitions() const;

    Q_PROPERTY(QList<PolicyAgentInhibition> RequestedInhibitions READ requestedInhibitions)
    QList<PolicyAgentInhibition> requestedInhibitions() const;

public Q_SLOTS: // METHODS
    uint AddInhibition(uint types, const QString &app_name, const QString &reason);
    bool HasInhibition(uint types);
    QList<QStringList> ListInhibitions();
    void ReleaseInhibition(uint cookie);
    void SetInhibitionAllowed(const QString &who, const QString &why, bool allowed);
Q_SIGNALS: // SIGNALS
    void InhibitionsChanged(const QList<QStringList> &added, const QStringList &removed);
};

#endif
