/*
 * This file was generated by qdbusxml2cpp version 0.8
 * Command line was: qdbusxml2cpp -c GroupDownloadAdaptor -a group_download_adaptor.h:group_download_adaptor.cpp -i metatypes.h com.lomiri.applications.group_download.xml
 *
 * qdbusxml2cpp is Copyright (C) 2013 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 <QtCore/QMetaObject>
#include <QtCore/QByteArray>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QVariant>
#include "group_download.h"
#include "group_download_adaptor.h"

namespace Lomiri {

namespace DownloadManager {

namespace Daemon {

/*
 * Implementation of adaptor class GroupDownloadAdaptor
 */

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

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

void GroupDownloadAdaptor::allowGSMDownload(bool allowed)
{
    // handle method call com.lomiri.applications.GroupDownload.allowGSMDownload
    QMetaObject::invokeMethod(parent(), "allowGSMDownload", Q_ARG(bool, allowed));
}

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

bool GroupDownloadAdaptor::isGSMDownloadAllowed()
{
    // handle method call com.lomiri.applications.GroupDownload.isGSMDownloadAllowed
    bool allowed;
    QMetaObject::invokeMethod(parent(), "isGSMDownloadAllowed", Q_RETURN_ARG(bool, allowed));
    return allowed;
}

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

void GroupDownloadAdaptor::pause()
{
    // handle method call com.lomiri.applications.GroupDownload.pause
    QMetaObject::invokeMethod(parent(), "pause");
}

qulonglong GroupDownloadAdaptor::progress(qulonglong &started, qulonglong &paused, qulonglong &finished)
{
    // handle method call com.lomiri.applications.GroupDownload.progress
    return static_cast<GroupDownload*>(parent())->progress(started, paused, finished);
}

void GroupDownloadAdaptor::resume()
{
    // handle method call com.lomiri.applications.GroupDownload.resume
    QMetaObject::invokeMethod(parent(), "resume");
}

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

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

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

qulonglong GroupDownloadAdaptor::totalSize()
{
    // handle method call com.lomiri.applications.GroupDownload.totalSize
    qulonglong total;
    QMetaObject::invokeMethod(parent(), "totalSize", Q_RETURN_ARG(qulonglong, total));
    return total;
}

}  // Daemon

}  // DownloadManager

}  // Lomiri
