summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/dbus/qdbusperformance/server/server.cpp
blob: 5bf4ac1ec3a4e2f147369624420482b6c7385de3 (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
25
26
27
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtCore/QtCore>


#include "../serverobject.h"

static const char serviceName[] = "org.qtproject.autotests.performance";
static const char objectPath[] = "/";

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

    QDBusConnection con = QDBusConnection::sessionBus();
    if (!con.isConnected())
        exit(1);

    if (!con.registerService(serviceName))
        exit(2);

    ServerObject obj(objectPath, con);
    printf("ready.\n");
    fflush(stdout);
    return app.exec();
}