summaryrefslogtreecommitdiff
path: root/healthd.cpp
blob: c7a0e85797125a6318114e812ab495ba5099df58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <QCoreApplication>
#include <QDBusConnection>
#include <QDebug>
#include "sensors.h"

int main(int argc, char **argv)
{
    QCoreApplication qcoreapp(argc, argv);
    if (!QDBusConnection::systemBus().isConnected()) {
        fprintf(stderr, "Cannot connect to the D-Bus system bus.\n");
        return 3;
    }
    if (!QDBusConnection::sessionBus().isConnected()) {
        fprintf(stderr, "Cannot connect to the D-Bus session bus.\n");
        return 2;
    }
    Logger sensorsLogger;
    QCoreApplication::setOrganizationName("asteroid");
    QCoreApplication::setOrganizationDomain("asteroidos.org");
    QCoreApplication::setApplicationName("healthd");
    qDebug() << "healthd started";
    qcoreapp.exec();
    return 0;
}