/*
 * This file was generated by qdbusxml2cpp version 0.8
 * Source file was org.kde.kmtp.storage.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 STORAGEINTERFACE_H
#define STORAGEINTERFACE_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 "kmtpfile.h"

/*
 * Proxy class for interface org.kde.kmtp.Storage
 */
class OrgKdeKmtpStorageInterface: public QDBusAbstractInterface
{
    Q_OBJECT
public:
    static inline const char *staticInterfaceName()
    { return "org.kde.kmtp.Storage"; }

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

    ~OrgKdeKmtpStorageInterface();

    Q_PROPERTY(QString description READ description)
    inline QString description() const
    { return qvariant_cast< QString >(property("description")); }

    Q_PROPERTY(qulonglong freeSpaceInBytes READ freeSpaceInBytes)
    inline qulonglong freeSpaceInBytes() const
    { return qvariant_cast< qulonglong >(property("freeSpaceInBytes")); }

    Q_PROPERTY(qulonglong maxCapacity READ maxCapacity)
    inline qulonglong maxCapacity() const
    { return qvariant_cast< qulonglong >(property("maxCapacity")); }

public Q_SLOTS: // METHODS
    inline QDBusPendingReply<uint> createFolder(const QString &path)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(path);
        return asyncCallWithArgumentList(QStringLiteral("createFolder"), argumentList);
    }

    inline QDBusPendingReply<int> deleteObject(const QString &path)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(path);
        return asyncCallWithArgumentList(QStringLiteral("deleteObject"), argumentList);
    }

    inline QDBusPendingReply<KMTPFile> getFileMetadata(const QString &path)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(path);
        return asyncCallWithArgumentList(QStringLiteral("getFileMetadata"), argumentList);
    }

    inline QDBusPendingReply<int> getFileToFileDescriptor(const QDBusUnixFileDescriptor &descriptor, const QString &sourcePath)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(descriptor) << QVariant::fromValue(sourcePath);
        return asyncCallWithArgumentList(QStringLiteral("getFileToFileDescriptor"), argumentList);
    }

    inline QDBusPendingReply<int> getFileToHandler(const QString &path)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(path);
        return asyncCallWithArgumentList(QStringLiteral("getFileToHandler"), argumentList);
    }

    inline QDBusPendingReply<KMTPFileList, int> getFilesAndFolders(const QString &path)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(path);
        return asyncCallWithArgumentList(QStringLiteral("getFilesAndFolders"), argumentList);
    }
    inline QDBusReply<KMTPFileList> getFilesAndFolders(const QString &path, int &exists)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(path);
        QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("getFilesAndFolders"), argumentList);
        if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().size() == 2) {
            exists = qdbus_cast<int>(reply.arguments().at(1));
        }
        return reply;
    }

    inline QDBusPendingReply<QDBusObjectPath> getFilesAndFolders2(const QString &path)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(path);
        return asyncCallWithArgumentList(QStringLiteral("getFilesAndFolders2"), argumentList);
    }

    inline QDBusPendingReply<int> sendFileFromFileDescriptor(const QDBusUnixFileDescriptor &descriptor, const QString &destinationPath)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(descriptor) << QVariant::fromValue(destinationPath);
        return asyncCallWithArgumentList(QStringLiteral("sendFileFromFileDescriptor"), argumentList);
    }

    inline QDBusPendingReply<int> setFileName(const QString &path, const QString &newName)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(path) << QVariant::fromValue(newName);
        return asyncCallWithArgumentList(QStringLiteral("setFileName"), argumentList);
    }

Q_SIGNALS: // SIGNALS
    void copyFinished(int result);
    void copyProgress(qulonglong transferredBytes, qulonglong totalBytes);
    void dataReady(const QByteArray &data);
};

namespace org {
  namespace kde {
    namespace kmtp {
      using Storage = ::OrgKdeKmtpStorageInterface;
    }
  }
}

#endif
