File: example-qt.h

package info (click to toggle)
hiredis 1.2.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,080 kB
  • sloc: ansic: 9,338; makefile: 308; cpp: 143; sh: 112
file content (32 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (16)
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
#ifndef __HIREDIS_EXAMPLE_QT_H
#define __HIREDIS_EXAMPLE_QT_H

#include <adapters/qt.h>

class ExampleQt : public QObject {

    Q_OBJECT

    public:
        ExampleQt(const char * value, QObject * parent = 0)
            : QObject(parent), m_value(value) {}

    signals:
        void finished();

    public slots:
        void run();

    private:
        void finish() { emit finished(); }

    private:
        const char * m_value;
        redisAsyncContext * m_ctx;
        RedisQtAdapter m_adapter;

    friend
    void getCallback(redisAsyncContext *, void *, void *);
};

#endif /* !__HIREDIS_EXAMPLE_QT_H */