summaryrefslogtreecommitdiffstats
path: root/src/nfc/qnx/qnxnfceventfilter_p.h
blob: ca023320a6ef7fcd1672f9f740c4b0633d09063b (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
28
29
30
31
32
33
34
#ifndef QNXNFCEVENTFILTER_H
#define QNXNFCEVENTFILTER_H

#include <QAbstractNativeEventFilter>
#include <QAbstractEventDispatcher>
//#include "qnxnfcmanager_p.h"
#include <bps/navigator.h>
#include "bps/bps.h"
#include "bps/navigator_invoke.h"
#include "../qnfcglobal.h"
#include "../qndefmessage.h"

QTNFC_BEGIN_NAMESPACE

class QNXNFCEventFilter : public QObject, public QAbstractNativeEventFilter
{
    Q_OBJECT
public:
    QNXNFCEventFilter();

    void installOnEventDispatcher(QAbstractEventDispatcher *dispatcher);
    void uninstallEventFilter();
private:
    bool nativeEventFilter(const QByteArray &eventType, void *message, long *result);

    QAbstractNativeEventFilter *prevFilter;

Q_SIGNALS:
    void ndefEvent(const QNdefMessage &msg);
};

QTNFC_END_NAMESPACE

#endif // QNXNFCEVENTFILTER_H