summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth
authorzecke <zecke>2004-05-06 19:47:25 (UTC)
committer zecke <zecke>2004-05-06 19:47:25 (UTC)
commit49588c7322679fe3dadf7aaad058d7df76e0d8d3 (patch) (unidiff)
tree9428d97efa1167552d17aebf30c3607b30b6b3d8 /noncore/net/opietooth
parentac015dbe0a2d7f52139d9efaba16d6e3069c5f2e (diff)
downloadopie-49588c7322679fe3dadf7aaad058d7df76e0d8d3.zip
opie-49588c7322679fe3dadf7aaad058d7df76e0d8d3.tar.gz
opie-49588c7322679fe3dadf7aaad058d7df76e0d8d3.tar.bz2
Error spotted by Clement with Opie::Core and namespaces
Diffstat (limited to 'noncore/net/opietooth') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/device.cc2
-rw-r--r--noncore/net/opietooth/lib/device.h2
-rw-r--r--noncore/net/opietooth/lib/manager.cc3
-rw-r--r--noncore/net/opietooth/lib/manager.h2
4 files changed, 4 insertions, 5 deletions
diff --git a/noncore/net/opietooth/lib/device.cc b/noncore/net/opietooth/lib/device.cc
index 18d26e4..04c50d9 100644
--- a/noncore/net/opietooth/lib/device.cc
+++ b/noncore/net/opietooth/lib/device.cc
@@ -1,34 +1,34 @@
1 1
2#include <signal.h> 2#include <signal.h>
3 3
4#include <opie2/oprocess.h> 4#include <opie2/oprocess.h>
5 5
6#include "device.h" 6#include "device.h"
7 7
8using namespace OpieTooth; 8using namespace OpieTooth;
9 9
10using namespace Opie::Core; 10using Opie::Core::OProcess;
11namespace { 11namespace {
12 int parsePid( const QCString& par ){ 12 int parsePid( const QCString& par ){
13 int id=0; 13 int id=0;
14 QString string( par ); 14 QString string( par );
15 QStringList list = QStringList::split( '\n', string ); 15 QStringList list = QStringList::split( '\n', string );
16 for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ){ 16 for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ){
17 qWarning("parsePID: %s", (*it).latin1() ); 17 qWarning("parsePID: %s", (*it).latin1() );
18 if( !(*it).startsWith("CSR") ){ 18 if( !(*it).startsWith("CSR") ){
19 id = (*it).toInt(); 19 id = (*it).toInt();
20 break; 20 break;
21 } 21 }
22 } 22 }
23 return id; 23 return id;
24 } 24 }
25} 25}
26 26
27Device::Device(const QString &device, const QString &mode, const QString &speed ) 27Device::Device(const QString &device, const QString &mode, const QString &speed )
28 : QObject(0, "device") { 28 : QObject(0, "device") {
29 29
30 qWarning("OpieTooth::Device create" ); 30 qWarning("OpieTooth::Device create" );
31 m_hci = 0; 31 m_hci = 0;
32 m_process = 0; 32 m_process = 0;
33 m_attached = false; 33 m_attached = false;
34 m_device = device; 34 m_device = device;
diff --git a/noncore/net/opietooth/lib/device.h b/noncore/net/opietooth/lib/device.h
index f3339fc..3631c97 100644
--- a/noncore/net/opietooth/lib/device.h
+++ b/noncore/net/opietooth/lib/device.h
@@ -1,35 +1,35 @@
1 1
2#ifndef OpieToothDevice_H 2#ifndef OpieToothDevice_H
3#define OpieToothDevice_H 3#define OpieToothDevice_H
4 4
5#include <qobject.h> 5#include <qobject.h>
6#include <qstring.h> 6#include <qstring.h>
7#include <qvaluelist.h> 7#include <qvaluelist.h>
8 8
9#include <sys/types.h> 9#include <sys/types.h>
10 10
11namespace Opie {namespace Core {class Opie::Core::OProcess;}} 11namespace Opie {namespace Core {class OProcess;}}
12namespace OpieTooth { 12namespace OpieTooth {
13 /** 13 /**
14 * Device takes care of attaching serial 14 * Device takes care of attaching serial
15 * devices to the blueZ stack. 15 * devices to the blueZ stack.
16 * After attaching it hciconfig ups it 16 * After attaching it hciconfig ups it
17 */ 17 */
18 class Device : public QObject { 18 class Device : public QObject {
19 19
20 Q_OBJECT 20 Q_OBJECT
21 21
22 public: 22 public:
23 23
24 /** 24 /**
25 * Brings up an device. 25 * Brings up an device.
26 * Usage example: new Device(/dev/ttySB0, csr) 26 * Usage example: new Device(/dev/ttySB0, csr)
27 * 27 *
28 * @param &device QString the device name 28 * @param &device QString the device name
29 * @param &mode QString the mode 29 * @param &mode QString the mode
30 * @param &speed QString the speed of the device, can be left blank 30 * @param &speed QString the speed of the device, can be left blank
31 */ 31 */
32 Device(const QString &device, const QString& mode, const QString& speed); 32 Device(const QString &device, const QString& mode, const QString& speed);
33 33
34 /** 34 /**
35 * unloads the device 35 * unloads the device
diff --git a/noncore/net/opietooth/lib/manager.cc b/noncore/net/opietooth/lib/manager.cc
index 7c9ea5b..18e1df9 100644
--- a/noncore/net/opietooth/lib/manager.cc
+++ b/noncore/net/opietooth/lib/manager.cc
@@ -1,36 +1,35 @@
1 1
2 2
3#include <opie2/oprocess.h> 3#include <opie2/oprocess.h>
4 4
5#include "parser.h" 5#include "parser.h"
6#include "manager.h" 6#include "manager.h"
7 7
8 8
9using namespace OpieTooth; 9using namespace OpieTooth;
10 10
11using namespace Opie::Core; 11using Opie::Core::OProcess;
12using namespace Opie::Core;
13Manager::Manager( const QString& dev ) 12Manager::Manager( const QString& dev )
14 : QObject() 13 : QObject()
15{ 14{
16 qWarning("created"); 15 qWarning("created");
17 m_device = dev; 16 m_device = dev;
18 m_hcitool = 0; 17 m_hcitool = 0;
19 m_sdp = 0; 18 m_sdp = 0;
20} 19}
21Manager::Manager( Device* /*dev*/ ) 20Manager::Manager( Device* /*dev*/ )
22 : QObject() 21 : QObject()
23{ 22{
24 m_hcitool = 0; 23 m_hcitool = 0;
25 m_sdp = 0; 24 m_sdp = 0;
26} 25}
27Manager::Manager() 26Manager::Manager()
28 : QObject() 27 : QObject()
29{ 28{
30 m_hcitool = 0; 29 m_hcitool = 0;
31 m_sdp = 0; 30 m_sdp = 0;
32} 31}
33Manager::~Manager(){ 32Manager::~Manager(){
34 delete m_hcitool; 33 delete m_hcitool;
35 delete m_sdp; 34 delete m_sdp;
36} 35}
diff --git a/noncore/net/opietooth/lib/manager.h b/noncore/net/opietooth/lib/manager.h
index 9b1c714..930eb56 100644
--- a/noncore/net/opietooth/lib/manager.h
+++ b/noncore/net/opietooth/lib/manager.h
@@ -1,38 +1,38 @@
1 1
2#ifndef OpieToothManager_H 2#ifndef OpieToothManager_H
3#define OpieToothManager_H 3#define OpieToothManager_H
4 4
5#include <qobject.h> 5#include <qobject.h>
6#include <qstring.h> 6#include <qstring.h>
7#include <qmap.h> 7#include <qmap.h>
8#include <qvaluelist.h> 8#include <qvaluelist.h>
9 9
10#include "connection.h" 10#include "connection.h"
11#include "remotedevice.h" 11#include "remotedevice.h"
12#include "services.h" 12#include "services.h"
13 13
14namespace Opie {namespace Core {class Opie::Core::OProcess;}} 14namespace Opie {namespace Core {class OProcess;}}
15namespace OpieTooth { 15namespace OpieTooth {
16 class Device; 16 class Device;
17 /** Manager manages a blueZ device (hci0 for example) 17 /** Manager manages a blueZ device (hci0 for example)
18 * without Manager you can control the things you 18 * without Manager you can control the things you
19 * could do from command line in a OO and asynchronus 19 * could do from command line in a OO and asynchronus
20 * way. 20 * way.
21 */ 21 */
22 class Manager : public QObject { 22 class Manager : public QObject {
23 Q_OBJECT 23 Q_OBJECT
24 public: 24 public:
25 /** c'tor whichs create a new Manager 25 /** c'tor whichs create a new Manager
26 * @param device is the device to use. Either a mac or blueZ device name 26 * @param device is the device to use. Either a mac or blueZ device name
27 * 27 *
28 */ 28 */
29 Manager( const QString &device ); 29 Manager( const QString &device );
30 30
31 /** c'tor 31 /** c'tor
32 * @param dev The Device to be managed 32 * @param dev The Device to be managed
33 * We don't care of Device so you need to delete it 33 * We don't care of Device so you need to delete it
34 */ 34 */
35 Manager( Device* dev ); 35 Manager( Device* dev );
36 36
37 /** 37 /**
38 * c'tor 38 * c'tor