Files
pilotclient/samples/blackmiscdbus/servicetool.h
Klaus Basan f2e49987e0 refs #875, adjusted servicetool (DBus samples)
* use functions from blackcore/test
* show signatures
2017-02-24 15:21:05 +00:00

56 lines
1.6 KiB
C++

/* Copyright (C) 2013
* swift Project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
//! \file
//! \ingroup sampleblackmiscdbus
#ifndef BLACKSAMPLE_SERVICETOOL_H
#define BLACKSAMPLE_SERVICETOOL_H
#include <QCoreApplication>
#include <QDBusArgument>
#include <QString>
#include <QStringList>
#include <QtGlobal>
class QDBusConnection;
class QObject;
class QProcess;
namespace BlackMisc { class CDBusServer; }
namespace BlackSample
{
class Testservice; // forward declaration
/*!
* Supporting / helper functions for running the tests
*/
class ServiceTool
{
public:
//! Client side of data transfer test
static void dataTransferTestClient(const QString &address);
//! Server side of data transfer test
static void dataTransferTestServer(BlackMisc::CDBusServer *dBusServer, bool verbose);
//! Start a new process
static QProcess *startNewProcess(const QString &executable, const QStringList &arguments = QStringList(), QObject *parent = 0);
//! Loop to send data to test service (slots on server)
static void sendDataToTestservice(const QDBusConnection &connection);
private:
//! No constructor
ServiceTool() = delete;
};
} // namespace
#endif // guard