#include <QCoreApplication>
#include <QDebug>

#include "input_device_manager.h"
#include "manager_adaptor.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    InputDeviceManager *manager = new InputDeviceManager(nullptr);

    new ManagerAdaptor(manager);

    //QDBusConnection conn = QDBusConnection::sessionBus();
    QDBusConnection conn = QDBusConnection::systemBus();

    if (!conn.registerService("com.kylin.inputdevice.manager")) {
        qDebug() << conn.lastError().message();
    }

    conn.registerObject("/", manager);
    return a.exec();
}
