Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 107 lines (81 sloc) 2.73 kb
9a780fa Adding licenses to all source files and adding COPYING/LICENSE disclaime...
cpscotti authored
1 /*
2 * Copyright (c) 2011 Nokia Corporation
3 *
4 * This file is part of the Push Snowboarding Project, More info at:
5 * www.pushsnowboading.com
6 *
7 * Author: Clovis Scotti <scotti@ieee.org>
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 *
26 */
27
dfaf02e (cpscott) "Importing" PushBurton2
cpscotti authored
28 #ifndef PUSHN8BTDEVICE_H
29 #define PUSHN8BTDEVICE_H
30
31 #include <QObject>
32 #include <QDebug>
aa93184 Adding ClassDiagram.txt
cpscotti authored
33
34 #ifdef Q_OS_SYMBIAN
dfaf02e (cpscott) "Importing" PushBurton2
cpscotti authored
35 #include <QBluetooth/QBtDevice.h>
36 #include <QBluetooth/QBtService.h>
37 #include <QBluetooth/QBtConstants.h>
38 #include <QBluetooth/QBluetooth.h>
39 #include <QBluetooth/QBtDeviceDiscoverer.h>
40 #include <QBluetooth/QBtServiceDiscoverer.h>
41 #include <QBluetooth/QBtSerialPortClient.h>
42 #include <QBluetooth/QBtLocalDevice.h>
aa93184 Adding ClassDiagram.txt
cpscotti authored
43 #endif
dfaf02e (cpscott) "Importing" PushBurton2
cpscotti authored
44
45 #include <QRegExp>
46
47 #include "pushburtongenericdevice.h"
48 #include "npushlogtick.h"
49
50 class PushN8BtDevice : public PushBurtonGenericDevice
51 {
aa93184 Adding ClassDiagram.txt
cpscotti authored
52 #ifdef Q_OS_SYMBIAN
dfaf02e (cpscott) "Importing" PushBurton2
cpscotti authored
53 Q_OBJECT
54 public:
55 explicit PushN8BtDevice(QBtDevice a_device, QObject *parent = 0);
56 ~PushN8BtDevice();
57
58 QString getDeviceName();
59
60 QString getDetails();
61
1855376 completing getName transition down the hierarchy; (was left in a state s...
Clovis Scotti authored
62 virtual QString getName();
dfaf02e (cpscott) "Importing" PushBurton2
cpscotti authored
63
64 bool is_online();
65
66 QString dataBuffer;
67
68 virtual void disconnect_from_backend();
69
70 protected:
71 QBtDevice device;
72 QBtSerialPortClient * SPPClient;
73
74 QString packetStart;
75 QString packetEnd;
76 int packetLen;
77
78 QStringList getPackage(QString data);
79
80 bool getPackage(QString data, QStringList& result);
81
82 private:
83 QBtServiceDiscoverer * serviceDisc;
84 QBtService service;
85
86
87 protected:
88 virtual void timerEvent(QTimerEvent *);
89
90 signals:
91
92 public slots:
93
94 void serviceFound(QBtDevice,QBtService);
95 void gotDataReceived(QString);
96 void gotError(QBtSerialPortClient::ErrorCode);
97
98 void gotDisconnected();
99 void connectionResetByPeer();
1453585 QBluetooth detects loss of signal to stop commns and detects when the de...
cpscotti authored
100 void lost_signal();
101 void regained_signal();
dfaf02e (cpscott) "Importing" PushBurton2
cpscotti authored
102
aa93184 Adding ClassDiagram.txt
cpscotti authored
103 #endif
dfaf02e (cpscott) "Importing" PushBurton2
cpscotti authored
104 };
105
106 #endif // PUSHN8BTDEVICE_H
Something went wrong with that request. Please try again.