summaryrefslogtreecommitdiff
path: root/libopie2/opiebluez/obluetooth.h
authormickeyl <mickeyl>2005-07-15 19:50:35 (UTC)
committer mickeyl <mickeyl>2005-07-15 19:50:35 (UTC)
commit637271751ea243456c9c00319e59675f47dcc022 (patch) (unidiff)
treeb17c488a688da6aa004991206d1b2b0aae2f40c7 /libopie2/opiebluez/obluetooth.h
parent72224480ec012cf8d68608aea5a1b035f4d16895 (diff)
downloadopie-637271751ea243456c9c00319e59675f47dcc022.zip
opie-637271751ea243456c9c00319e59675f47dcc022.tar.gz
opie-637271751ea243456c9c00319e59675f47dcc022.tar.bz2
opiebluez: add scanning.
Ok, guys, everything until now was easy. It gets very ugly to go from here - even to just get the name of a remote device, you have to setup some filters on the bluez socket, fill in some random flags to generate a PDU that calls 'get name' and then afterwards poll until the result comes in. Nasty :/ The BlueZ kernel interface seems to be very badly (if at all) documented. All people are assuming that you use libbluetooth to talk to that stack. However since libbluetooth is GPL, we can't do that :/ Guess, we are stuck here until someone finds time and/or motivation to look into that and create some easy-to-understand examples for how to talk directly to the BlueZ kernel interface.
Diffstat (limited to 'libopie2/opiebluez/obluetooth.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiebluez/obluetooth.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/libopie2/opiebluez/obluetooth.h b/libopie2/opiebluez/obluetooth.h
index ee4a90d..fa3d2c1 100644
--- a/libopie2/opiebluez/obluetooth.h
+++ b/libopie2/opiebluez/obluetooth.h
@@ -121,37 +121,37 @@ class OBluetoothInterface : public QObject
121 121
122 public: 122 public:
123 /** 123 /**
124 * Constructor. Normally you don't create @ref OBluetoothInterface objects yourself, 124 * Constructor. Normally you don't create @ref OBluetoothInterface objects yourself,
125 * but access them via @ref OBluetooth::interface(). 125 * but access them via @ref OBluetooth::interface().
126 */ 126 */
127 OBluetoothInterface( QObject* parent, const char* name, void* devinfo, int ctlfd ); 127 OBluetoothInterface( QObject* parent, const char* name, void* devinfo, int ctlfd );
128 /** 128 /**
129 * Destructor. 129 * Destructor.
130 */ 130 */
131 virtual ~OBluetoothInterface(); 131 virtual ~OBluetoothInterface();
132 /** 132 /**
133 * @return the MAC address of the interfaces 133 * @return the MAC address of the interface.
134 */ 134 */
135 QString macAddress() const; 135 QString macAddress() const;
136 /** 136 /**
137 * Setting an interface to up enables it to receive packets. 137 * Setting an interface to up enables it to receive packets.
138 */ 138 */
139 bool setUp( bool ); 139 bool setUp( bool );
140 /** 140 /**
141 * @returns true if the interface is up. 141 * @returns true if the interface is up.
142 */ 142 */
143 bool isUp() const; 143 bool isUp() const;
144 /** 144 /**
145 * @returns an iterator usable for iterating through the devices in range 145 * @returns an iterator usable for iterating through the devices in range.
146 */ 146 */
147 DeviceIterator neighbourhood(); 147 DeviceIterator neighbourhood();
148 148
149 private: 149 private:
150 DeviceMap _devices; 150 DeviceMap _devices;
151 class Private; 151 class Private;
152 Private *d; 152 Private *d;
153}; 153};
154 154
155/*====================================================================================== 155/*======================================================================================
156 * OBluetoothDevice 156 * OBluetoothDevice
157 *======================================================================================*/ 157 *======================================================================================*/
@@ -161,27 +161,39 @@ class OBluetoothInterface : public QObject
161 * 161 *
162 * This class resembles a (remote) bluetooth device. 162 * This class resembles a (remote) bluetooth device.
163 * @author Michael 'Mickey' Lauer <mickey@vanille.de> 163 * @author Michael 'Mickey' Lauer <mickey@vanille.de>
164 */ 164 */
165class OBluetoothDevice : public QObject 165class OBluetoothDevice : public QObject
166{ 166{
167 Q_OBJECT 167 Q_OBJECT
168 168
169 public: 169 public:
170 /** 170 /**
171 * Constructor. 171 * Constructor.
172 */ 172 */
173 OBluetoothDevice( QObject* parent, const char* name ); 173 OBluetoothDevice( QObject* parent, const char* name, void* inqinfo );
174 /** 174 /**
175 * Destructor. 175 * Destructor.
176 */ 176 */
177 virtual ~OBluetoothDevice(); 177 virtual ~OBluetoothDevice();
178 /** 178 /**
179 * @returns the MAC address of the device's interface 179 * @returns the MAC address of the device's interface.
180 */ 180 */
181 QString macAddress() const; 181 QString macAddress() const;
182 /**
183 * @returns the class of device.
184 */
185 QString deviceClass() const;
186 /**
187 * @returns the device name.
188 */
189 QString getName();
190
191 private:
192 class Private;
193 Private *d;
182}; 194};
183 195
184} 196}
185} 197}
186#endif 198#endif
187 199