/*
 * This file was generated by qdbusxml2cpp version 0.8
 * Command line was: qdbusxml2cpp -c DBusPower -p dbuspower com.deepin.daemon.Power.xml
 *
 * qdbusxml2cpp is Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
 *
 * This is an auto-generated file.
 * This file may have been hand-edited. Look for HAND-EDIT comments
 * before re-generating it.
 */

#include "dbuspower.h"

/*
 * Implementation of interface class DBusPower
 */

DBusPower::DBusPower(QObject *parent)
    : QDBusAbstractInterface("com.deepin.daemon.Power", "/com/deepin/daemon/Power", staticInterfaceName(), QDBusConnection::sessionBus(), parent)
{
    qRegisterMetaType<BatteryStateMap>("BatteryStateMap");
    qDBusRegisterMetaType<BatteryStateMap>();
    qRegisterMetaType<BatteryPercentageMap>("BatteryPercentageMap");
    qDBusRegisterMetaType<BatteryPercentageMap>();

    QDBusConnection::sessionBus().connect(this->service(), this->path(), "org.freedesktop.DBus.Properties",  "PropertiesChanged","sa{sv}as", this, SLOT(__propertyChanged__(QDBusMessage)));
    QDBusConnection::systemBus().connect("org.freedesktop.UPower", "/org/freedesktop/UPower", "org.freedesktop.DBus.Properties", "PropertiesChanged", this, SLOT(__propertyChanged__(QDBusMessage)));
}

DBusPower::~DBusPower()
{
    QDBusConnection::sessionBus().disconnect(service(), path(), "org.freedesktop.DBus.Properties",  "PropertiesChanged",  "sa{sv}as", this, SLOT(propertyChanged(QDBusMessage)));
    QDBusConnection::systemBus().disconnect("org.freedesktop.UPower", "/org/freedesktop/UPower", "org.freedesktop.DBus.Properties",  "PropertiesChanged", this, SLOT(propertyChanged(QDBusMessage)));
}

