summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/opietooth2
authorwimpie <wimpie>2005-01-07 01:19:13 (UTC)
committer wimpie <wimpie>2005-01-07 01:19:13 (UTC)
commit7af7203a51ddcf85f9f60e39157fcad21f7d9e34 (patch) (side-by-side diff)
tree49829585a0100a5a741d55424f86be39c01d3150 /noncore/settings/networksettings2/opietooth2
parenta8e5ecd107a79f940d8a99d4a77071606a3a932f (diff)
downloadopie-7af7203a51ddcf85f9f60e39157fcad21f7d9e34.zip
opie-7af7203a51ddcf85f9f60e39157fcad21f7d9e34.tar.gz
opie-7af7203a51ddcf85f9f60e39157fcad21f7d9e34.tar.bz2
First implementation of plugins
THIS VERSION DOES NOT COMPILE
Diffstat (limited to 'noncore/settings/networksettings2/opietooth2') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTDevice.h6
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTDeviceAddress.h2
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTDriver.h2
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTGateway.h2
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTHCISocket.h2
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTIcons.h2
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTInquiry.h2
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTPeer.h2
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTSDPAttribute.h2
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTSDPService.h2
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTUUID.h2
-rw-r--r--noncore/settings/networksettings2/opietooth2/Opietooth.h14
12 files changed, 20 insertions, 20 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTDevice.h b/noncore/settings/networksettings2/opietooth2/OTDevice.h
index cf1c4b6..09de7ee 100644
--- a/noncore/settings/networksettings2/opietooth2/OTDevice.h
+++ b/noncore/settings/networksettings2/opietooth2/OTDevice.h
@@ -1,44 +1,44 @@
#ifndef OTDEVICE_H
#define OTDEVICE_H
#include <qobject.h>
#include <qstring.h>
#include <bluezlib.h>
#include <OTGateway.h>
// define if you want to use the process hciattach for detection
// #define USEHCIPROC
class QTimerEvent;
namespace Opie {
namespace Core {
class OProcess;
- };
-};
+ }
+}
namespace Opietooth2 {
/**
* Device takes care of attaching serial
* devices to the blueZ stack.
* After attaching it hciconfig ups it
*/
class OTDevice : public QObject {
Q_OBJECT
public:
/**
* Brings up the device.
* will detech which device is needed
* Usage example: new Device(/dev/ttySB0, csr)
*
*/
OTDevice( OTGateway * _OT );
/**
* unloads the device
@@ -90,27 +90,27 @@ namespace Opietooth2 {
void error( const QString & mesg );
void isEnabled( int devnr, bool );
private slots:
void slotStdOut(Opie::Core::OProcess*, char*, int );
void slotStdErr(Opie::Core::OProcess*, char*, int );
private:
void detectDeviceType( QString & Device,
QString & Mode,
unsigned long & Speed );
pid_t getPidOfHCIAttach( void );
Opie::Core::OProcess* m_hciattach; // ptr to hciattach proces
int m_deviceNr; // x as in hci(x)
pid_t m_hciattachPid; // pid of hciattach program
// backpointer
OTGateway * OT;
bool NeedsAttach;
};
-};
+}
#endif
diff --git a/noncore/settings/networksettings2/opietooth2/OTDeviceAddress.h b/noncore/settings/networksettings2/opietooth2/OTDeviceAddress.h
index 50f28fc..8395f37 100644
--- a/noncore/settings/networksettings2/opietooth2/OTDeviceAddress.h
+++ b/noncore/settings/networksettings2/opietooth2/OTDeviceAddress.h
@@ -82,27 +82,27 @@ public:
@return true if this and b have the same address or
if both are invalid, false otherwise
*/
bool operator==(const OTDeviceAddress& b) const;
inline bool operator!=(const OTDeviceAddress& b) const
{ return ! ( *this == b ); }
/** The address 00:00:00:FF:FF:FF */
static const OTDeviceAddress local;
/** The address 00:00:00:00:00:00 */
static const OTDeviceAddress any;
/** An address tagged as invalid */
static const OTDeviceAddress invalid;
protected:
bdaddr_t BDaddr;
bool IsValid;
};
-};
+}
#endif
diff --git a/noncore/settings/networksettings2/opietooth2/OTDriver.h b/noncore/settings/networksettings2/opietooth2/OTDriver.h
index f249cf7..b54ffdf 100644
--- a/noncore/settings/networksettings2/opietooth2/OTDriver.h
+++ b/noncore/settings/networksettings2/opietooth2/OTDriver.h
@@ -207,26 +207,26 @@ private slots :
private:
QString getRevEricsson();
QString getRevCsr(unsigned short rev);
QString Name;
QString Dev;
QString Revision;
QString Manufacturer;
OTDeviceAddress Address;
QString Features;
QTimer * AutoClose;
int Dev_id,Fd,Type;
bool IsUp;
int Iscan,Pscan,Auth,Encrypt;
// socket bound to this device
OTHCISocket * Socket;
// backpointer to opietooth system
OTGateway * OT;
};
-};
+}
#endif
diff --git a/noncore/settings/networksettings2/opietooth2/OTGateway.h b/noncore/settings/networksettings2/opietooth2/OTGateway.h
index a47cefb..d97ef35 100644
--- a/noncore/settings/networksettings2/opietooth2/OTGateway.h
+++ b/noncore/settings/networksettings2/opietooth2/OTGateway.h
@@ -174,27 +174,27 @@ protected :
private :
void loadActiveConnections( void );
void loadKnownPeers( void );
void saveKnownPeers( void );
bool isConnectedTo( int devid,
const OTDeviceAddress & Address );
void readLinkKeys();
static OTGateway * SingleGateway;
static int UseCount;
OTDriver * ScanWith;
OTDriverList AllDrivers;
OTDevice * TheOTDevice;
int HciCtl;
int ErrorConnectCount;
int RefreshTimer;
OTInquiry * Scanning;
bool AllPeersModified;
PeerVector AllPeers;
LinkKeyArray AllKeys;
};
-};
+}
#endif
diff --git a/noncore/settings/networksettings2/opietooth2/OTHCISocket.h b/noncore/settings/networksettings2/opietooth2/OTHCISocket.h
index d508078..a004989 100644
--- a/noncore/settings/networksettings2/opietooth2/OTHCISocket.h
+++ b/noncore/settings/networksettings2/opietooth2/OTHCISocket.h
@@ -90,27 +90,27 @@ signals:
void connectionClosed( );
private:
void updateStatus( const QByteArray& data );
//QSocketDevice hciSocket;
QGuardedPtr<QSocketNotifier> HCIReadNotifier;
QSocketDevice HCISocket;
OTDriver * Driver ;
bool BStatusSet;
unsigned short LastStatusOcf;
unsigned char LastStatusOgf;
int LastStatus;
private slots:
void slotSocketActivated();
void slotSocketError(int);
void slotConnectionClosed();
};
-};
+}
#endif
diff --git a/noncore/settings/networksettings2/opietooth2/OTIcons.h b/noncore/settings/networksettings2/opietooth2/OTIcons.h
index 966ed24..ee10831 100644
--- a/noncore/settings/networksettings2/opietooth2/OTIcons.h
+++ b/noncore/settings/networksettings2/opietooth2/OTIcons.h
@@ -28,27 +28,27 @@ public:
* @return true if found
*/
QPixmap serviceIcon( int, bool & );
// returns all UUID that represent channels with modem function
const UUIDVector & modems()
{ return Modems; }
// returns all UUID that represent channels with network
const UUIDVector & network()
{ return Networks; }
// set Sub to find icons in .../Icons dir
QPixmap loadPixmap( const QString &, bool Sub = 0 );
private:
// first ist id, second is icon name
QMap<QString,QString> deviceIcons;
QMap<int,QString> serviceIcons;
UUIDVector Modems;
UUIDVector Networks;
};
-};
+}
#endif
diff --git a/noncore/settings/networksettings2/opietooth2/OTInquiry.h b/noncore/settings/networksettings2/opietooth2/OTInquiry.h
index 2682499..f7bdeec 100644
--- a/noncore/settings/networksettings2/opietooth2/OTInquiry.h
+++ b/noncore/settings/networksettings2/opietooth2/OTInquiry.h
@@ -153,26 +153,26 @@ signals :
private:
// std::set<DeviceAddress> addrCache;
// double currentTimeout;
// QByteArray* buf;
// QSocket* hciSocket;
QGuardedPtr<OTHCISocket> Socket;
OTDriver * Driver;
//QDateTime *startTime;
QTimer *InquiryTimeoutTimer;
// std::deque<InquiryInfo> infoQueue;
bool SuccessfullyStarted;
bool SuccessfullyEnded;
private slots:
void slotInquiryTimeout();
void slotHCIEvent(unsigned char eventCode, QByteArray buf);
};
-};
+}
#endif
diff --git a/noncore/settings/networksettings2/opietooth2/OTPeer.h b/noncore/settings/networksettings2/opietooth2/OTPeer.h
index 9cd0dc7..c09af15 100644
--- a/noncore/settings/networksettings2/opietooth2/OTPeer.h
+++ b/noncore/settings/networksettings2/opietooth2/OTPeer.h
@@ -109,27 +109,27 @@ signals :
protected :
// while polling for result of ping
void timerEvent( QTimerEvent * ev );
private:
void updateServices();
OTGateway * OT;
OTDeviceAddress Addr;
QString Name;
int Class;
ServiceVector serviceList;
// -1 : don't know, 0 no, 1 yes
PeerState_t State;
OTDriver * ConnectedTo;
int ProbeFD;
int ProbePhase; // see OTDriver
long ProbeTimeout;
};
-};
+}
#endif
diff --git a/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.h b/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.h
index 86b5623..e79e33d 100644
--- a/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.h
+++ b/noncore/settings/networksettings2/opietooth2/OTSDPAttribute.h
@@ -114,27 +114,27 @@ public:
UUIDVector getAllUUIDs();
inline AttrType getType()
{ return type; }
//QString getValString();
const char * getTypeString();
private:
AttrType type;
union {
OTSDPAttribute::int128_t * intVal;
OTSDPAttribute::uint128_t * uintVal;
OTUUID * uuidVal;
bool boolVal;
QString * stringVal; // strings and urls
AttributeVector * sequenceVal; // sequences and alternatives
} Value;
};
-};
+}
#endif
diff --git a/noncore/settings/networksettings2/opietooth2/OTSDPService.h b/noncore/settings/networksettings2/opietooth2/OTSDPService.h
index 21d7344..4831df0 100644
--- a/noncore/settings/networksettings2/opietooth2/OTSDPService.h
+++ b/noncore/settings/networksettings2/opietooth2/OTSDPService.h
@@ -49,27 +49,27 @@ public:
UUIDVector allUUIDs();
// return list of classes this service belongs to
UUIDVector classIDList();
/** Retrieves the Rfcomm channel.
This function is provided just for conveniance.
@param n The Rfcomm channel.
@ret true if an rfcomm channel was found, false otherwise. */
bool rfcommChannel(unsigned int &n);
bool hasClassID(const OTUUID & uuid);
private:
struct AttributeEntry {
int id;
OTSDPAttribute * attr;
};
QArray<AttributeEntry> attributeList;
};
-};
+}
#endif
diff --git a/noncore/settings/networksettings2/opietooth2/OTUUID.h b/noncore/settings/networksettings2/opietooth2/OTUUID.h
index 97df114..aebd9b9 100644
--- a/noncore/settings/networksettings2/opietooth2/OTUUID.h
+++ b/noncore/settings/networksettings2/opietooth2/OTUUID.h
@@ -33,26 +33,26 @@ public :
bool fromString(QString s);
void setUUID128(uint64_t hi, uint64_t lo);
void setUUID32(uint32_t v);
uint16_t toShort()
{ return ((hi>>32) & 0xffff); }
uint32_t toLong()
{ return ((hi>>32) & 0xffffffff); }
uint64_t toLongLong()
{ return hi; }
QString toString() const ;
operator QString() const;
operator ::uuid_t() const;
OTUUID & operator=( const OTUUID & other ) ;
bool operator<( const OTUUID & other ) const;
bool operator==(const OTUUID & uuid) const;
uint64_t hi;
uint64_t lo;
};
-};
+}
#endif
diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.h b/noncore/settings/networksettings2/opietooth2/Opietooth.h
index e66787f..f077dd7 100644
--- a/noncore/settings/networksettings2/opietooth2/Opietooth.h
+++ b/noncore/settings/networksettings2/opietooth2/Opietooth.h
@@ -1,107 +1,107 @@
#ifndef OPIETOOTH_H
#define OPIETOOTH_H
#include <OTIcons.h>
class MyProcess;
namespace Opie {
namespace Ui {
class OLedBox;
- };
+ }
-};
+}
#include <OTSniffGUI.h>
namespace Opietooth2 {
class OTGateway;
class OTDriver;
class OTInquiry;
class OTPeer;
class PeerLVI;
class OTSniffing : public OTSniffGUI {
Q_OBJECT
public :
OTSniffing( QWidget * parent );
~OTSniffing();
private slots :
void SLOT_Trace( bool );
void SLOT_ClearLog( void );
void SLOT_Load( void );
void SLOT_Save( void );
void SLOT_ProcessExited( MyProcess * );
void SLOT_Show( const QString & );
signals :
protected :
private :
OTGateway * OT;
MyProcess * HciDump;
};
-};
+}
#include <OTPairingGUI.h>
namespace Opietooth2 {
class OTPairing : public OTPairingGUI {
Q_OBJECT
public :
OTPairing( QWidget * parent,
OTIcons * _Ic = 0 );
~OTPairing();
private slots :
void SLOT_Unpair( void );
signals :
protected :
private :
bool MyIcons;
OTIcons * Icons;
OTGateway * OT;
};
-};
+}
#include <OTScanGUI.h>
namespace Opietooth2 {
class OTGateway;
class OTDriver;
class OTInquiry;
class OTPeer;
class OTScan : public OTScanGUI {
Q_OBJECT
public :
OTScan( QWidget * parent,
OTIcons * _Ic = 0 );
~OTScan();
// static function to return a device and a channel
static int getDevice( OTPeer *& Peer,
int & Channel,
OTGateway * OT,
@@ -137,102 +137,102 @@ signals :
void selected( void );
protected :
private :
void refreshState( PeerLVI *, bool );
void scanMode( bool );
// load scanned devices
bool MyIcons;
OTIcons * Icons;
OTGateway * OT;
OTInquiry * Scanning;
UUIDVector Filter;
Opie::Ui::OLedBox * Paired_Led;
QTimer * StrengthTimer;
PeerLVI * Current;
OTPeer * SelectedPeer;
int SelectedChannel;
};
-};
+}
#include <OTManageGUI.h>
namespace Opietooth2 {
class OTManage : public OTManageGUI {
Q_OBJECT
public :
OTManage( QWidget * parent,
OTIcons * _IC = 0 );
~OTManage();
public slots :
private slots :
void SLOT_ShowDriver( QListViewItem * );
void SLOT_UpDriver( bool );
void SLOT_StateChange( OTDriver * , bool );
void SLOT_DriverListChanged();
void SLOT_SetRefreshTimer( int );
signals :
protected :
private :
// load scanned devices
bool MyIcons;
OTIcons * Icons;
OTGateway * OT;
OTInquiry * Scanning;
};
-};
+}
#include <OTMainGUI.h>
namespace Opietooth2 {
class OTMain : public OTMainGUI {
Q_OBJECT
public :
OTMain( QWidget * parent );
~OTMain();
public slots :
private slots :
void SLOT_Pairing( void );
void SLOT_Manage( void );
void SLOT_Sniffing( void );
void SLOT_Scan( void );
void SLOT_EnableBluetooth( bool );
void SLOT_DriverListChanged();
void SLOT_DeviceIsEnabled( bool );
void SLOT_StateChange( OTDriver * , bool );
signals :
protected :
private :
// load scanned devices
OTIcons * Icons;
OTGateway * OT;
QDialog * SnifWindow;
};
-};
+}
#endif