summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/opietooth2/OTGateway.h
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/OTGateway.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTGateway.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTGateway.h b/noncore/settings/networksettings2/opietooth2/OTGateway.h
index 11c6b30..d0e42db 100644
--- a/noncore/settings/networksettings2/opietooth2/OTGateway.h
+++ b/noncore/settings/networksettings2/opietooth2/OTGateway.h
@@ -1,119 +1,119 @@
#ifndef OTGATEWAY_H
#define OTGATEWAY_H
#include <qobject.h>
#include <qvector.h>
#include <qmap.h>
#include <OTDriverList.h>
#include <OTInquiry.h>
class QPixmap;
namespace Opietooth2 {
class OTDriverList;
class OTDriver;
class OTDevice;
class OTPeer;
class OTInquiry;
-class OTPANConnection;
+class OTPANNetworkSetup;
class OTLinkKey;
typedef QVector<OTPeer> PeerVector;
-typedef QVector<OTPANConnection> PANConnectionVector;
+typedef QVector<OTPANNetworkSetup> PANNetworkSetupVector;
typedef QArray<OTLinkKey> LinkKeyArray;
class OTLinkKey {
public :
OTLinkKey( const OTDeviceAddress & F,
const OTDeviceAddress & T ) {
From = F;
To = T;
}
const OTDeviceAddress & to()
{ return To; }
const OTDeviceAddress & from()
{ return From; }
OTDeviceAddress From;
OTDeviceAddress To;
};
-class OTPANConnection {
+class OTPANNetworkSetup {
public :
- OTPANConnection( const QString & Dev, const QString & CT ) {
+ OTPANNetworkSetup( const QString & Dev, const QString & CT ) {
Device = Dev;
ConnectedTo = CT;
}
QString Device;
QString ConnectedTo;
};
class OTGateway : public QObject {
Q_OBJECT
public :
// single instance
static OTGateway * getOTGateway( void );
static void releaseOTGateway( void );
// convert device type as class to name for that class
static const char * deviceTypeToName( int Cls );
// open bluetooth system
OTGateway( void );
// close bluetooth system
~OTGateway( void );
// get access to system device
OTDevice * getOTDevice();
// return true if this device needs enabling of bluetooth
bool needsEnabling();
// return true if system is running
bool isEnabled();
void setRefreshTimer( int MilleSecs );
// return socket to HCI raw layer
inline int getSocket()
{ return HciCtl; }
OTDriverList & getDriverList()
{ return AllDrivers; }
OTDriver * driver( int nr )
{ return AllDrivers.count() == 0 ? 0 : AllDrivers[nr]; }
void updateDrivers();
- PANConnectionVector getPANConnections();
+ PANNetworkSetupVector getPANNetworkSetups();
// scan neighbourhood using device
void scanNeighbourhood( OTDriver * D = 0 );
void stopScanOfNeighbourhood(void );
void setScanWith( OTDriver * D = 0 )
{ ScanWith = (D) ? D :
(AllDrivers.count() ) ? AllDrivers[0] : 0; }
OTDriver * scanWith( void )
{ return ScanWith; }
// get list of all detected peers
inline const PeerVector & peers( void )
{ return AllPeers; }
// ping peer to see if it is up
bool isPeerUp( const OTDeviceAddress & PAddr,
int timeoutInSec = 1,
int timeoutInUSec = 0,
int retry = 1 );
OTPeer * findPeer( const OTDeviceAddress & Addr );
void removePeer( OTPeer * P );
void addPeer( OTPeer * P );
OTDriver * findDriver( const OTDeviceAddress & Addr );
@@ -152,49 +152,49 @@ signals :
// signal state of bluetooth driver
void stateChange( OTDriver * D, bool State );
// sent when list of drivers changees
void driverListChanged();
// sent when bluetooth on device is enabled
void deviceEnabled( bool );
// sent when a (new if bool = TRUE) peer is detected
void detectedPeer( OTPeer *, bool );
// end of detection process
void finishedDetecting();
protected :
void connectNotify( const char * Signal );
void disconnectNotify( const char * Signal );
void timerEvent( QTimerEvent * );
private :
- void loadActiveConnections( void );
+ void loadActiveNetworkSetups( 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