/*
 * This file was generated by qdbusxml2cpp version 0.8
 * Command line was: qdbusxml2cpp -c UploadAdaptor -a upload_adaptor.h:upload_adaptor.cpp com.lomiri.applications.upload.xml
 *
 * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
 *
 * This is an auto-generated file.
 * Do not edit! All changes made to it will be lost.
 */

#include "upload_adaptor.h"
#include <QtCore/QMetaObject>
#include <QtCore/QByteArray>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QVariant>

namespace Lomiri {

using namespace Transfers::Errors;

namespace UploadManager {

/*
 * Implementation of adaptor class UploadAdaptor
 */

UploadAdaptor::UploadAdaptor(QObject *parent)
    : QDBusAbstractAdaptor(parent)
{
    // constructor
    setAutoRelaySignals(true);
}

UploadAdaptor::~UploadAdaptor()
{
    // destructor
}

void UploadAdaptor::allowMobileUpload(bool allowed)
{
    // handle method call com.lomiri.applications.Upload.allowMobileUpload
    QMetaObject::invokeMethod(parent(), "allowMobileUpload", Q_ARG(bool, allowed));
}

void UploadAdaptor::cancel()
{
    // handle method call com.lomiri.applications.Upload.cancel
    QMetaObject::invokeMethod(parent(), "cancel");
}

bool UploadAdaptor::isMobileUploadAllowed()
{
    // handle method call com.lomiri.applications.Upload.isMobileUploadAllowed
    bool allowed;
    QMetaObject::invokeMethod(parent(), "isMobileUploadAllowed", Q_RETURN_ARG(bool, allowed));
    return allowed;
}

QVariantMap UploadAdaptor::metadata()
{
    // handle method call com.lomiri.applications.Upload.metadata
    QVariantMap data;
    QMetaObject::invokeMethod(parent(), "metadata", Q_RETURN_ARG(QVariantMap, data));
    return data;
}

qulonglong UploadAdaptor::progress()
{
    // handle method call com.lomiri.applications.Upload.progress
    qulonglong uploaded;
    QMetaObject::invokeMethod(parent(), "progress", Q_RETURN_ARG(qulonglong, uploaded));
    return uploaded;
}

void UploadAdaptor::setThrottle(qulonglong speed)
{
    // handle method call com.lomiri.applications.Upload.setThrottle
    QMetaObject::invokeMethod(parent(), "setThrottle", Q_ARG(qulonglong, speed));
}

void UploadAdaptor::start()
{
    // handle method call com.lomiri.applications.Upload.start
    QMetaObject::invokeMethod(parent(), "start");
}

qulonglong UploadAdaptor::throttle()
{
    // handle method call com.lomiri.applications.Upload.throttle
    qulonglong speed;
    QMetaObject::invokeMethod(parent(), "throttle", Q_RETURN_ARG(qulonglong, speed));
    return speed;
}

}  // UploadManager

}  // Lomiri
