author | zecke <zecke> | 2002-05-30 18:06:48 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-05-30 18:06:48 (UTC) |
commit | f117abbfaf2c17c5af700433d181266b4c8d5a7b (patch) (side-by-side diff) | |
tree | 8fb6d6beb166ffb582f3ef6207fdda56a744a7f9 /noncore/net/opietooth/lib/manager.h | |
parent | 738c08d921cc12c9f6f7846e80889908dce06cc8 (diff) | |
download | opie-f117abbfaf2c17c5af700433d181266b4c8d5a7b.zip opie-f117abbfaf2c17c5af700433d181266b4c8d5a7b.tar.gz opie-f117abbfaf2c17c5af700433d181266b4c8d5a7b.tar.bz2 |
Ok here are some bits of a lib and interfaces
Diffstat (limited to 'noncore/net/opietooth/lib/manager.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/lib/manager.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/noncore/net/opietooth/lib/manager.h b/noncore/net/opietooth/lib/manager.h new file mode 100644 index 0000000..dcae02b --- a/dev/null +++ b/noncore/net/opietooth/lib/manager.h @@ -0,0 +1,56 @@ + +#ifndef OpieToothManager_H +#define OpieToothManager_H + +#include <qobject.h> +#include <qstring.h> +#include <qvaluelist.h> + +namespace OpieTooth { + class Device; + class Manager : public QObject { +Q_OBJECT + public: + // Manage MAC device or by name (hci0) + Manager( const QString &device ); + // Manage a with Device attached device + Manager( Device* dev ); + // manage nothing ;) + Manager(); + ~Manager(); + + // setDevice either MAC or hci0 + // ups it + void setDevice( const QString& device ); + void setDevice( Device *dev ); + // asynchron connect to signal + void isConnected(const QString& device ); + void isConnected(Device *dev ); + + // if c'tor with device or setDevice everythning is ok + void searchDevices(); + // use an alternate device + void searchDevices(const QString& device); + void searchDevices(Device *d ); + + void addService(const QString &name ); + void addServices( const QStringList& names ); + void removeService(const QString &name ); + void removeServices(const QStringList& ); + + void searchServices( const QString& remDevice ); + /*static*/ QString toDevice( const QString& mac ); + /*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 foundServices( const QString& device, Services::ValueList ); + void foundDevices( const QString& device, RemoteDevices::ValueList ); + }; +}; + +#endif |