/*
 * This file contains D-Bus client proxy classes generated by qt4-client-gen.py.
 *
 * This file can be distributed under the same terms as the specification from
 * which it was generated.
 */

#ifndef IN_TELEPATHY_QT4_HEADER
#error IN_TELEPATHY_QT4_HEADER
#endif

#include <TelepathyQt4/Types>

#include <QtGlobal>

#include <QString>
#include <QObject>
#include <QVariant>

#include <QDBusPendingReply>

#include <TelepathyQt4/AbstractInterface>
#include <TelepathyQt4/DBusProxy>
#include <TelepathyQt4/Global>

// basically the same as GLib's G_GNUC_DEPRECATED
#ifndef TELEPATHY_GNUC_DEPRECATED
#   if defined(Q_CC_GNUC) && __GNUC__ >= 4
#       define TELEPATHY_GNUC_DEPRECATED __attribute__((__deprecated__))
#   else
#       define TELEPATHY_GNUC_DEPRECATED
#   endif
#endif
namespace Tp
{
namespace Client
{
namespace DBus
{

/**
 * \class DBusDaemonInterface
 * \headerfile TelepathyQt4/dbus.h <TelepathyQt4/DBus>
 * \ingroup clientdbus
 *
 * Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.DBus."
 */
class TELEPATHY_QT4_EXPORT DBusDaemonInterface : public Tp::AbstractInterface
{
    Q_OBJECT

public:
    /**
     * Returns the name of the interface "org.freedesktop.DBus", which this class
     * represents.
     *
     * \return The D-Bus interface name.
     */
    static inline const char *staticInterfaceName()
    {
        return "org.freedesktop.DBus";
    }

    /**
     * Creates a DBusDaemonInterface associated with the given object on the session bus.
     *
     * \param busName Name of the service the object is on.
     * \param objectPath Path to the object on the service.
     * \param parent Passed to the parent class constructor.
     */
    DBusDaemonInterface(
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a DBusDaemonInterface associated with the given object on the given bus.
     *
     * \param connection The bus via which the object can be reached.
     * \param busName Name of the service the object is on.
     * \param objectPath Path to the object on the service.
     * \param parent Passed to the parent class constructor.
     */
    DBusDaemonInterface(
        const QDBusConnection& connection,
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a DBusDaemonInterface associated with the same object as the given proxy.
     *
     * \param proxy The proxy to use. It will also be the QObject::parent()
     *               for this object.
     */
    DBusDaemonInterface(Tp::DBusProxy *proxy);

    /**
     * Creates a DBusDaemonInterface associated with the same object as the given proxy.
     * Additionally, the created proxy will have the same parent as the given
     * proxy.
     *
     * \param mainInterface The proxy to use.
     */
    explicit DBusDaemonInterface(const Tp::AbstractInterface& mainInterface);

    /**
     * Creates a DBusDaemonInterface associated with the same object as the given proxy.
     * However, a different parent object can be specified.
     *
     * \param mainInterface The proxy to use.
     * \param parent Passed to the parent class constructor.
     */
    DBusDaemonInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);

public Q_SLOTS:
    /**
     * Begins a call to the D-Bus method "Hello" on the remote object.
     */
    inline QDBusPendingReply<QString> Hello()
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QString>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        return asyncCall(QLatin1String("Hello"));
    }

    /**
     * Begins a call to the D-Bus method "RequestName" on the remote object.
     */
    inline QDBusPendingReply<uint> RequestName(const QString& name, uint flags)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<uint>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(name) << QVariant::fromValue(flags);
        return asyncCallWithArgumentList(QLatin1String("RequestName"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "ReleaseName" on the remote object.
     */
    inline QDBusPendingReply<uint> ReleaseName(const QString& name)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<uint>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(name);
        return asyncCallWithArgumentList(QLatin1String("ReleaseName"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "StartServiceByName" on the remote object.
     */
    inline QDBusPendingReply<uint> StartServiceByName(const QString& service, uint flags)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<uint>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(service) << QVariant::fromValue(flags);
        return asyncCallWithArgumentList(QLatin1String("StartServiceByName"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "NameHasOwner" on the remote object.
     */
    inline QDBusPendingReply<bool> NameHasOwner(const QString& nameToCheck)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<bool>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(nameToCheck);
        return asyncCallWithArgumentList(QLatin1String("NameHasOwner"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "ListNames" on the remote object.
     */
    inline QDBusPendingReply<QStringList> ListNames()
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QStringList>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        return asyncCall(QLatin1String("ListNames"));
    }

    /**
     * Begins a call to the D-Bus method "ListActivatableNames" on the remote object.
     */
    inline QDBusPendingReply<QStringList> ListActivatableNames()
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QStringList>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        return asyncCall(QLatin1String("ListActivatableNames"));
    }

    /**
     * Begins a call to the D-Bus method "AddMatch" on the remote object.
     */
    inline QDBusPendingReply<> AddMatch(const QString& rule)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(rule);
        return asyncCallWithArgumentList(QLatin1String("AddMatch"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "RemoveMatch" on the remote object.
     */
    inline QDBusPendingReply<> RemoveMatch(const QString& rule)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(rule);
        return asyncCallWithArgumentList(QLatin1String("RemoveMatch"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "GetNameOwner" on the remote object.
     */
    inline QDBusPendingReply<QString> GetNameOwner(const QString& name)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QString>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(name);
        return asyncCallWithArgumentList(QLatin1String("GetNameOwner"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "ListQueuedOwners" on the remote object.
     */
    inline QDBusPendingReply<QStringList> ListQueuedOwners(const QString& name)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QStringList>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(name);
        return asyncCallWithArgumentList(QLatin1String("ListQueuedOwners"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "GetConnectionUnixUser" on the remote object.
     */
    inline QDBusPendingReply<uint> GetConnectionUnixUser(const QString& connectionName)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<uint>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(connectionName);
        return asyncCallWithArgumentList(QLatin1String("GetConnectionUnixUser"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "GetConnectionUnixProcessID" on the remote object.
     */
    inline QDBusPendingReply<uint> GetConnectionUnixProcessID(const QString& connectionName)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<uint>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(connectionName);
        return asyncCallWithArgumentList(QLatin1String("GetConnectionUnixProcessID"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "GetConnectionSELinuxSecurityContext" on the remote object.
     */
    inline QDBusPendingReply<QByteArray> GetConnectionSELinuxSecurityContext(const QString& connectionName)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QByteArray>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(connectionName);
        return asyncCallWithArgumentList(QLatin1String("GetConnectionSELinuxSecurityContext"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "ReloadConfig" on the remote object.
     */
    inline QDBusPendingReply<> ReloadConfig()
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        return asyncCall(QLatin1String("ReloadConfig"));
    }

    /**
     * Begins a call to the D-Bus method "GetId" on the remote object.
     */
    inline QDBusPendingReply<QString> GetId()
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QString>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        return asyncCall(QLatin1String("GetId"));
    }

Q_SIGNALS:
    /**
     * Represents the signal "NameOwnerChanged" on the remote object.
     */
    void NameOwnerChanged(const QString& name, const QString& oldOwner, const QString& newOwner);

    /**
     * Represents the signal "NameLost" on the remote object.
     */
    void NameLost(const QString& name);

    /**
     * Represents the signal "NameAcquired" on the remote object.
     */
    void NameAcquired(const QString& name);

protected:
    virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
};

/**
 * \class IntrospectableInterface
 * \headerfile TelepathyQt4/dbus.h <TelepathyQt4/DBus>
 * \ingroup clientdbus
 *
 * Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.DBus.Introspectable."
 */
class TELEPATHY_QT4_EXPORT IntrospectableInterface : public Tp::AbstractInterface
{
    Q_OBJECT

public:
    /**
     * Returns the name of the interface "org.freedesktop.DBus.Introspectable", which this class
     * represents.
     *
     * \return The D-Bus interface name.
     */
    static inline const char *staticInterfaceName()
    {
        return "org.freedesktop.DBus.Introspectable";
    }

    /**
     * Creates a IntrospectableInterface associated with the given object on the session bus.
     *
     * \param busName Name of the service the object is on.
     * \param objectPath Path to the object on the service.
     * \param parent Passed to the parent class constructor.
     */
    IntrospectableInterface(
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a IntrospectableInterface associated with the given object on the given bus.
     *
     * \param connection The bus via which the object can be reached.
     * \param busName Name of the service the object is on.
     * \param objectPath Path to the object on the service.
     * \param parent Passed to the parent class constructor.
     */
    IntrospectableInterface(
        const QDBusConnection& connection,
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a IntrospectableInterface associated with the same object as the given proxy.
     *
     * \param proxy The proxy to use. It will also be the QObject::parent()
     *               for this object.
     */
    IntrospectableInterface(Tp::DBusProxy *proxy);

    /**
     * Creates a IntrospectableInterface associated with the same object as the given proxy.
     * Additionally, the created proxy will have the same parent as the given
     * proxy.
     *
     * \param mainInterface The proxy to use.
     */
    explicit IntrospectableInterface(const Tp::AbstractInterface& mainInterface);

    /**
     * Creates a IntrospectableInterface associated with the same object as the given proxy.
     * However, a different parent object can be specified.
     *
     * \param mainInterface The proxy to use.
     * \param parent Passed to the parent class constructor.
     */
    IntrospectableInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);

public Q_SLOTS:
    /**
     * Begins a call to the D-Bus method "Introspect" on the remote object.
     */
    inline QDBusPendingReply<QString> Introspect()
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QString>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        return asyncCall(QLatin1String("Introspect"));
    }

protected:
    virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
};

/**
 * \class PeerInterface
 * \headerfile TelepathyQt4/dbus.h <TelepathyQt4/DBus>
 * \ingroup clientdbus
 *
 * Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.DBus.Peer."
 */
class TELEPATHY_QT4_EXPORT PeerInterface : public Tp::AbstractInterface
{
    Q_OBJECT

public:
    /**
     * Returns the name of the interface "org.freedesktop.DBus.Peer", which this class
     * represents.
     *
     * \return The D-Bus interface name.
     */
    static inline const char *staticInterfaceName()
    {
        return "org.freedesktop.DBus.Peer";
    }

    /**
     * Creates a PeerInterface associated with the given object on the session bus.
     *
     * \param busName Name of the service the object is on.
     * \param objectPath Path to the object on the service.
     * \param parent Passed to the parent class constructor.
     */
    PeerInterface(
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a PeerInterface associated with the given object on the given bus.
     *
     * \param connection The bus via which the object can be reached.
     * \param busName Name of the service the object is on.
     * \param objectPath Path to the object on the service.
     * \param parent Passed to the parent class constructor.
     */
    PeerInterface(
        const QDBusConnection& connection,
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a PeerInterface associated with the same object as the given proxy.
     *
     * \param proxy The proxy to use. It will also be the QObject::parent()
     *               for this object.
     */
    PeerInterface(Tp::DBusProxy *proxy);

    /**
     * Creates a PeerInterface associated with the same object as the given proxy.
     * Additionally, the created proxy will have the same parent as the given
     * proxy.
     *
     * \param mainInterface The proxy to use.
     */
    explicit PeerInterface(const Tp::AbstractInterface& mainInterface);

    /**
     * Creates a PeerInterface associated with the same object as the given proxy.
     * However, a different parent object can be specified.
     *
     * \param mainInterface The proxy to use.
     * \param parent Passed to the parent class constructor.
     */
    PeerInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);

public Q_SLOTS:
    /**
     * Begins a call to the D-Bus method "Ping" on the remote object.
     */
    inline QDBusPendingReply<> Ping()
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        return asyncCall(QLatin1String("Ping"));
    }

    /**
     * Begins a call to the D-Bus method "GetMachineId" on the remote object.
     */
    inline QDBusPendingReply<QString> GetMachineId()
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QString>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        return asyncCall(QLatin1String("GetMachineId"));
    }

protected:
    virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
};

/**
 * \class PropertiesInterface
 * \headerfile TelepathyQt4/dbus.h <TelepathyQt4/DBus>
 * \ingroup clientdbus
 *
 * Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.DBus.Properties."
 */
class TELEPATHY_QT4_EXPORT PropertiesInterface : public Tp::AbstractInterface
{
    Q_OBJECT

public:
    /**
     * Returns the name of the interface "org.freedesktop.DBus.Properties", which this class
     * represents.
     *
     * \return The D-Bus interface name.
     */
    static inline const char *staticInterfaceName()
    {
        return "org.freedesktop.DBus.Properties";
    }

    /**
     * Creates a PropertiesInterface associated with the given object on the session bus.
     *
     * \param busName Name of the service the object is on.
     * \param objectPath Path to the object on the service.
     * \param parent Passed to the parent class constructor.
     */
    PropertiesInterface(
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a PropertiesInterface associated with the given object on the given bus.
     *
     * \param connection The bus via which the object can be reached.
     * \param busName Name of the service the object is on.
     * \param objectPath Path to the object on the service.
     * \param parent Passed to the parent class constructor.
     */
    PropertiesInterface(
        const QDBusConnection& connection,
        const QString& busName,
        const QString& objectPath,
        QObject* parent = 0
    );

    /**
     * Creates a PropertiesInterface associated with the same object as the given proxy.
     *
     * \param proxy The proxy to use. It will also be the QObject::parent()
     *               for this object.
     */
    PropertiesInterface(Tp::DBusProxy *proxy);

    /**
     * Creates a PropertiesInterface associated with the same object as the given proxy.
     * Additionally, the created proxy will have the same parent as the given
     * proxy.
     *
     * \param mainInterface The proxy to use.
     */
    explicit PropertiesInterface(const Tp::AbstractInterface& mainInterface);

    /**
     * Creates a PropertiesInterface associated with the same object as the given proxy.
     * However, a different parent object can be specified.
     *
     * \param mainInterface The proxy to use.
     * \param parent Passed to the parent class constructor.
     */
    PropertiesInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);

public Q_SLOTS:
    /**
     * Begins a call to the D-Bus method "Get" on the remote object.
     */
    inline QDBusPendingReply<QDBusVariant> Get(const QString& interfaceName, const QString& propertyName)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QDBusVariant>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(interfaceName) << QVariant::fromValue(propertyName);
        return asyncCallWithArgumentList(QLatin1String("Get"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "Set" on the remote object.
     */
    inline QDBusPendingReply<> Set(const QString& interfaceName, const QString& propertyName, const QDBusVariant& value)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(interfaceName) << QVariant::fromValue(propertyName) << QVariant::fromValue(value);
        return asyncCallWithArgumentList(QLatin1String("Set"), argumentList);
    }

    /**
     * Begins a call to the D-Bus method "GetAll" on the remote object.
     */
    inline QDBusPendingReply<QVariantMap> GetAll(const QString& interfaceName)
    {
        if (!invalidationReason().isEmpty()) {
            return QDBusPendingReply<QVariantMap>(QDBusMessage::createError(
                invalidationReason(),
                invalidationMessage()
            ));
        }


        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(interfaceName);
        return asyncCallWithArgumentList(QLatin1String("GetAll"), argumentList);
    }

protected:
    virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
};
}
}
}
