samples and tests for all kbatclist branch changes

refs #81
This commit is contained in:
Klaus Basan
2014-01-02 02:22:13 +00:00
committed by Mathew Sutcliffe
parent 1f2a88e502
commit ab17dabd5b
58 changed files with 6084 additions and 880 deletions

51
samples/blackcore/tool.h Normal file
View File

@@ -0,0 +1,51 @@
#ifndef BLACKMISCTEST_Tool_H
#define BLACKMISCTEST_Tool_H
#include "blackcore/coreruntime.h"
#include <QCoreApplication>
#include <QProcess>
#include <QDBusConnection>
namespace BlackMiscTest
{
/*!
* \brief Supporting functions for running the tests
*/
class Tool
{
private:
/*!
* \brief Constructor
*/
Tool() {}
public:
/*!
* \brief Get process id
* \return
*/
static qint64 getPid()
{
return QCoreApplication::applicationPid();
}
/*!
* \brief Start a new process
* \param executable
* \param arguments
* \param parent
* \return
*/
static QProcess *startNewProcess(const QString &executable, const QStringList &arguments = QStringList(), QObject *parent = 0);
/*!
* \brief Server loop
* \param core
*/
static void serverLoop(const BlackCore::CCoreRuntime *core);
};
} // namespace
#endif // guard