qmlFrontend/hwengine.h
author unc0rr
Sun, 21 Sep 2014 00:37:50 +0400
branchqmlfrontend
changeset 10418 091d2c0216c3
parent 10416 1c301054694d
child 10420 02c573d19224
permissions -rw-r--r--
Move away from passing shortstrings into C code, now IPC works
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10402
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
     1
#ifndef HWENGINE_H
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
     2
#define HWENGINE_H
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
     3
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
     4
#include <QObject>
10416
1c301054694d - Remove --port command
unc0rr
parents: 10402
diff changeset
     5
#include <QByteArray>
1c301054694d - Remove --port command
unc0rr
parents: 10402
diff changeset
     6
#include <QVector>
1c301054694d - Remove --port command
unc0rr
parents: 10402
diff changeset
     7
1c301054694d - Remove --port command
unc0rr
parents: 10402
diff changeset
     8
#include "flib.h"
10402
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
     9
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    10
class HWEngine : public QObject
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    11
{
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    12
    Q_OBJECT
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    13
public:
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    14
    explicit HWEngine(QObject *parent = 0);
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    15
    ~HWEngine();
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    16
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    17
    static void exposeToQML();
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    18
    Q_INVOKABLE void run();
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    19
    
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    20
signals:
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    21
    
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    22
public slots:
10416
1c301054694d - Remove --port command
unc0rr
parents: 10402
diff changeset
    23
1c301054694d - Remove --port command
unc0rr
parents: 10402
diff changeset
    24
private:
1c301054694d - Remove --port command
unc0rr
parents: 10402
diff changeset
    25
    QList<QByteArray> m_argsList;
10418
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10416
diff changeset
    26
    QVector<const char *> m_args;
10416
1c301054694d - Remove --port command
unc0rr
parents: 10402
diff changeset
    27
10418
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10416
diff changeset
    28
    static void engineMessageCallback(void *context, quint8 len, const char * msg);
10416
1c301054694d - Remove --port command
unc0rr
parents: 10402
diff changeset
    29
    void sendIPC(const QByteArray &b);
10402
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    30
};
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    31
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    32
#endif // HWENGINE_H
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    33