author | zecke <zecke> | 2002-06-15 20:06:04 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-15 20:06:04 (UTC) |
commit | b15f8a613d83a2f3957fef515e20981f636b908b (patch) (side-by-side diff) | |
tree | 6d2e6743ceb4c3cb299944efc4b2925e5f40412d /noncore/net/opietooth/lib/manager.h | |
parent | ef75752efaef84e4b7350f9768f3cb3c4fd744af (diff) | |
download | opie-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.h | 29 |
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 @@ -1,36 +1,38 @@ #ifndef OpieToothManager_H #define OpieToothManager_H #include <qobject.h> #include <qstring.h> +#include <qmap.h> #include <qvaluelist.h> #include "remotedevice.h" #include "services.h" +class OProcess; namespace OpieTooth { class Device; /** Manager manages a blueZ device (hci0 for example) * with Manager you can control the things you * could do from command line in a OO and asynchronus - * way. + * way. */ class Manager : public QObject { Q_OBJECT public: /** c'tor whichs create a new Manager * @param device is the device to use. Either a mac or blueZ device name * */ Manager( const QString &device ); /** c'tor * @param dev The Device to be managed * We don't care of Device so you need to delete it - */ + */ Manager( Device* dev ); /** * c'tor */ Manager(); ~Manager(); @@ -45,22 +47,23 @@ Q_OBJECT void setDevice( Device *dev ); /** * Wether or not a device is connected. The function * is asynchron * If device is empty it will take the currently managed * device and see if it's up - * for Remote devices it will ping and see + * for Remote devices it will ping and see. + * @param either mac or hciX */ void isConnected(const QString& device= QString::null ); /** * same as above */ void isConnected(Device *dev ); - /** this search for devices reachable from the - * currently managed device + /** this searchs for devices reachable from the + * currently managed device * or from device if @param device is not empty */ void searchDevices(const QString& device= QString::null ); /** same as above * */ @@ -86,13 +89,13 @@ Q_OBJECT * Removes a list from the sdpd */ void removeServices(const QStringList& ); /** * search for services on a remote device - * + * */ void searchServices( const QString& remDevice ); /** * search for services on a remote device */ void searchServices( const RemoteDevices& ); @@ -100,14 +103,24 @@ Q_OBJECT /*static*/ QString toMac( const QString &device ); signals: // device either mac or dev name // the first device is the device which you access void connected( const QString& device, bool connected ); - void addedService( const QString& device, const QString& service, bool added ); - void removedService( const QString& device, const QString& service, bool removed ); + void addedService( const QString& service, bool added ); + void removedService( const QString& service, bool removed ); void foundServices( const QString& device, Services::ValueList ); void foundDevices( const QString& device, RemoteDevices::ValueList ); + void foundNothing( const QString& device ); +private slots: + void slotProcessExited(OProcess* ); + void slotSDPExited(OProcess*); + void slotSDPOut(OProcess*, char*, int); + private: + OProcess *m_hcitool; + OProcess *m_sdp; // not only one + QString m_device; + QMap<QString, QString> m_out; }; }; #endif |