summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/io_bt.h
blob: 156632b9433560c87faae983492d5684846e584e (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef OPIE_IO_BT
#define OPIE_IO_BT

#include <opie2/oprocess.h>
#include "io_serial.h"

/* Default values to be used if the profile information is incomplete */
#define BT_DEFAULT_DEVICE       "/dev/ttyU0"
#define BT_DEFAULT_BAUD         9600
#define BT_DEFAULT_PARITY       0
#define BT_DEFAULT_DBITS        8
#define BT_DEFAULT_SBITS        1
#define BT_DEFAULT_FLOW         0
#define BT_DEFAULT_MAC          0


/* IOSerial implements a RS232 IO Layer */

class IOBt : public IOSerial {

    Q_OBJECT

public:

    IOBt(const Profile &);
    ~IOBt();

    virtual QString identifier() const;
    virtual QString name() const;

signals:
    void received(const QByteArray &);
    void error(int, const QString &);

public slots:
    virtual bool open();
    virtual void close();
    virtual void reload(const Profile &);

private:
    Opie::Core::OProcess *m_attach;
    QString m_mac;
private slots:
    void slotExited(Opie::Core::OProcess* proc);

};

#endif /* OPIE_IO_IRDA */