summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/opietooth2/Opietooth.h
blob: 1f164a5729b63866d5de8a185d1db2ca8eaa19bd (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
#ifndef OPIETOOTH_H
#define OPIETOOTH_H

#include "OTIcons.h"

class MyProcess;

namespace Opie { 

  namespace Ui { 

    class OLedBox;

  }

}

#include "OTSniffGUI.h"
namespace Opietooth2 {

class OTGateway;
class OTDriver;
class OTInquiry;
class OTPeer;
class PeerLVI;

class OTSniffing : public OTSniffGUI {

      Q_OBJECT

public :

      OTSniffing( QWidget * parent );
      ~OTSniffing();

private slots :

      void SLOT_Trace( bool );
      void SLOT_ClearLog( void );
      void SLOT_Load( void );
      void SLOT_Save( void );
      void SLOT_ProcessExited( MyProcess * );
      void SLOT_Show( const QString & );

signals :

protected :

private :

      OTGateway *       OT;
      MyProcess *       HciDump;
};
}

#include "OTPairingGUI.h"

namespace Opietooth2 {
class OTPairing : public OTPairingGUI {

      Q_OBJECT

public :

      OTPairing( QWidget * parent, 
                 OTIcons * _Ic = 0 );
      ~OTPairing();

private slots :

      void SLOT_Unpair( void );

signals :

protected :

private :

      bool              MyIcons;
      OTIcons *         Icons;
      OTGateway *       OT;
};
}

#include "OTScanGUI.h"

namespace Opietooth2 {

class OTGateway;
class OTDriver;
class OTInquiry;
class OTPeer;

class OTScan : public OTScanGUI {

      Q_OBJECT

public :

      OTScan( QWidget * parent, 
              OTIcons * _Ic = 0 );
      ~OTScan();

      // static function to return a device and a channel
      static int getDevice( OTPeer *& Peer, 
                            int & Channel,
                            OTGateway * OT,
                            const UUIDVector & Filter = 0,
                            QWidget* Parent = 0);

      // show only services that match any of the filter
      void setScanFilter( const UUIDVector & Filter );
      void resetScanFilter( void );

      inline OTPeer * selectedPeer( void )
        { return SelectedPeer; }
      inline int selectedChannel( void )
        { return SelectedChannel; }

public slots :

private slots :

      void SLOT_DoScan( bool );
      void SLOT_NewPeer( OTPeer *, bool );
      void SLOT_FinishedDetecting();
      void SLOT_Show( QListViewItem *);
      void SLOT_RefreshServices( void );
      void SLOT_RefreshState( void );
      void SLOT_CleanupOld( void );
      void SLOT_UpdateStrength( void );
      void SLOT_PeerState( OTPeer * );
      void SLOT_Selected( QListViewItem * );

signals :

      void selected( void );

protected :

private :

      void refreshState( PeerLVI *, bool );
      void scanMode( bool );

      // load scanned devices

      bool              MyIcons;
      OTIcons *         Icons;
      OTGateway *       OT;
      OTInquiry *       Scanning;
      UUIDVector        Filter;

      Opie::Ui::OLedBox *         Paired_Led;
      QTimer *          StrengthTimer;
      PeerLVI *         Current;

      OTPeer *          SelectedPeer;
      int               SelectedChannel;
};
}

#include "OTManageGUI.h"
namespace Opietooth2 {

class OTManage : public OTManageGUI {

      Q_OBJECT

public :

      OTManage( QWidget * parent,
                OTIcons * _IC = 0 );
      ~OTManage();

public slots :

private slots :

      void SLOT_ShowDriver( QListViewItem * );
      void SLOT_UpDriver( bool );
      void SLOT_StateChange( OTDriver * , bool );
      void SLOT_DriverListChanged();
      void SLOT_SetRefreshTimer( int );

signals :

protected :

private :

      // load scanned devices

      bool              MyIcons;
      OTIcons *         Icons;
      OTGateway *       OT;
      OTInquiry *       Scanning;
};
}

#include "OTMainGUI.h"

namespace Opietooth2 {
class OTMain : public OTMainGUI {

      Q_OBJECT

public :

      OTMain( QWidget * parent );
      ~OTMain();

public slots :

private slots :

      void SLOT_Pairing( void );
      void SLOT_Manage( void );
      void SLOT_Sniffing( void );
      void SLOT_Scan( void );
      void SLOT_EnableBluetooth( bool );
      void SLOT_DriverListChanged();
      void SLOT_DeviceIsEnabled( bool );
      void SLOT_StateChange( OTDriver * , bool );

signals :

protected :

private :

      // load scanned devices
      OTIcons *         Icons;
      OTGateway *       OT;
      QDialog *         SnifWindow;
};
}
#endif