summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/lib/manager.h
authorzecke <zecke>2002-06-15 20:06:04 (UTC)
committer zecke <zecke>2002-06-15 20:06:04 (UTC)
commitb15f8a613d83a2f3957fef515e20981f636b908b (patch) (unidiff)
tree6d2e6743ceb4c3cb299944efc4b2925e5f40412d /noncore/net/opietooth/lib/manager.h
parentef75752efaef84e4b7350f9768f3cb3c4fd744af (diff)
downloadopie-b15f8a613d83a2f3957fef515e20981f636b908b.zip
opie-b15f8a613d83a2f3957fef515e20981f636b908b.tar.gz
opie-b15f8a613d83a2f3957fef515e20981f636b908b.tar.bz2
isCOnnected, add and remove Service + first bits of service browsing done
Diffstat (limited to 'noncore/net/opietooth/lib/manager.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/manager.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/noncore/net/opietooth/lib/manager.h b/noncore/net/opietooth/lib/manager.h
index 6c5e27f..03375c5 100644
--- a/noncore/net/opietooth/lib/manager.h
+++ b/noncore/net/opietooth/lib/manager.h
@@ -4,17 +4,19 @@
4 4
5#include <qobject.h> 5#include <qobject.h>
6#include <qstring.h> 6#include <qstring.h>
7#include <qmap.h>
7#include <qvaluelist.h> 8#include <qvaluelist.h>
8 9
9#include "remotedevice.h" 10#include "remotedevice.h"
10#include "services.h" 11#include "services.h"
11 12
13class OProcess;
12namespace OpieTooth { 14namespace OpieTooth {
13 class Device; 15 class Device;
14 /** Manager manages a blueZ device (hci0 for example) 16 /** Manager manages a blueZ device (hci0 for example)
15 * with Manager you can control the things you 17 * with Manager you can control the things you
16 * could do from command line in a OO and asynchronus 18 * could do from command line in a OO and asynchronus
17 * way. 19 * way.
18 */ 20 */
19 class Manager : public QObject { 21 class Manager : public QObject {
20Q_OBJECT 22Q_OBJECT
@@ -27,7 +29,7 @@ Q_OBJECT
27 /** c'tor 29 /** c'tor
28 * @param dev The Device to be managed 30 * @param dev The Device to be managed
29 * We don't care of Device so you need to delete it 31 * We don't care of Device so you need to delete it
30 */ 32 */
31 Manager( Device* dev ); 33 Manager( Device* dev );
32 /** 34 /**
33 * c'tor 35 * c'tor
@@ -48,7 +50,8 @@ Q_OBJECT
48 * is asynchron 50 * is asynchron
49 * If device is empty it will take the currently managed 51 * If device is empty it will take the currently managed
50 * device and see if it's up 52 * device and see if it's up
51 * for Remote devices it will ping and see 53 * for Remote devices it will ping and see.
54 * @param either mac or hciX
52 */ 55 */
53 void isConnected(const QString& device= QString::null ); 56 void isConnected(const QString& device= QString::null );
54 /** 57 /**
@@ -56,8 +59,8 @@ Q_OBJECT
56 */ 59 */
57 void isConnected(Device *dev ); 60 void isConnected(Device *dev );
58 61
59 /** this search for devices reachable from the 62 /** this searchs for devices reachable from the
60 * currently managed device 63 * currently managed device
61 * or from device if @param device is not empty 64 * or from device if @param device is not empty
62 */ 65 */
63 void searchDevices(const QString& device= QString::null ); 66 void searchDevices(const QString& device= QString::null );
@@ -89,7 +92,7 @@ Q_OBJECT
89 92
90 /** 93 /**
91 * search for services on a remote device 94 * search for services on a remote device
92 * 95 *
93 */ 96 */
94 void searchServices( const QString& remDevice ); 97 void searchServices( const QString& remDevice );
95 /** 98 /**
@@ -103,10 +106,20 @@ Q_OBJECT
103 // device either mac or dev name 106 // device either mac or dev name
104 // the first device is the device which you access 107 // the first device is the device which you access
105 void connected( const QString& device, bool connected ); 108 void connected( const QString& device, bool connected );
106 void addedService( const QString& device, const QString& service, bool added ); 109 void addedService( const QString& service, bool added );
107 void removedService( const QString& device, const QString& service, bool removed ); 110 void removedService( const QString& service, bool removed );
108 void foundServices( const QString& device, Services::ValueList ); 111 void foundServices( const QString& device, Services::ValueList );
109 void foundDevices( const QString& device, RemoteDevices::ValueList ); 112 void foundDevices( const QString& device, RemoteDevices::ValueList );
113 void foundNothing( const QString& device );
114private slots:
115 void slotProcessExited(OProcess* );
116 void slotSDPExited(OProcess*);
117 void slotSDPOut(OProcess*, char*, int);
118 private:
119 OProcess *m_hcitool;
120 OProcess *m_sdp; // not only one
121 QString m_device;
122 QMap<QString, QString> m_out;
110 }; 123 };
111}; 124};
112 125