Diffstat (limited to 'noncore/settings/networksettings2/opietooth2') (more/less context) (show whitespace changes)
5 files changed, 21 insertions, 21 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTDriver.cpp b/noncore/settings/networksettings2/opietooth2/OTDriver.cpp index a7ee662..cfd0491 100644 --- a/noncore/settings/networksettings2/opietooth2/OTDriver.cpp +++ b/noncore/settings/networksettings2/opietooth2/OTDriver.cpp @@ -704,41 +704,41 @@ long OTDriver::getLinkQuality( const OTDeviceAddress & Addr ) { return 0; } cr = (struct hci_conn_info_req *)malloc( sizeof(*cr) + sizeof(struct hci_conn_info)); if (!cr) return 0; bacpy( &(cr->bdaddr), &(Addr.getBDAddr()) ); cr->type = ACL_LINK; if (ioctl( fd(), HCIGETCONNINFO, (unsigned long) cr) < 0) { - odebug << "Get connection info failed" << oendl; + odebug << "Get NetworkSetup info failed" << oendl; free(cr); return 0; } handle = htobs(cr->conn_info->handle); free(cr); memset(&rq, 0, sizeof(rq)); rq.ogf = OGF_STATUS_PARAM; rq.ocf = OCF_READ_RSSI; rq.cparam = &handle; rq.clen = 2; rq.rparam = &rp; rq.rlen = GET_LINK_QUALITY_RP_SIZE; if (hci_send_req( fd(), &rq, 100) < 0) { - odebug << "Get connection info failed" << oendl; + odebug << "Get NetworkSetup info failed" << oendl; return 0; } if( rp.status ) { odebug << QString().sprintf("HCI get_link_quality cmd failed (0x%2.2X)", rp.status) << oendl; return 0; } return rp.rssi+50; } diff --git a/noncore/settings/networksettings2/opietooth2/OTDriver.h b/noncore/settings/networksettings2/opietooth2/OTDriver.h index b54ffdf..899fab4 100644 --- a/noncore/settings/networksettings2/opietooth2/OTDriver.h +++ b/noncore/settings/networksettings2/opietooth2/OTDriver.h @@ -3,25 +3,25 @@ * ottobit@ferrara.linux.it * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ #ifndef OTDRIVER_H #define OTDRIVER_H /* - * This class handles the connection with the BlueZ libraries, implements + * This class handles the networkSetup with the BlueZ libraries, implements * most of the bluetooth-related functions and owns the KBTDevice class * that is a single local bluetooth device representation. * It is used as a Singleton pattern thru the getDefaultConnector() method. * */ #include <qobject.h> #include <opie2/odebug.h> #include <bluezlib.h> #include <OTDeviceAddress.h> namespace Opietooth2 { @@ -109,25 +109,25 @@ public: int devId() const { return Dev_id; }; /* * Returns the string representation of the device id, * with the same format of the hciconfig tool. */ QString devname() { return Dev; }; /* * Returns the file descriptor for the local - * connection to this device + * networkSetup to this device */ int fd() const { return Fd; }; void setfd(int _fd) { Fd = _fd; }; void setType(int _type) { Type = _type; }; int type() const { return Type; }; QString strType(); diff --git a/noncore/settings/networksettings2/opietooth2/OTGateway.cpp b/noncore/settings/networksettings2/opietooth2/OTGateway.cpp index 1b61a2e..7fc8719 100644 --- a/noncore/settings/networksettings2/opietooth2/OTGateway.cpp +++ b/noncore/settings/networksettings2/opietooth2/OTGateway.cpp @@ -53,27 +53,27 @@ OTGateway::OTGateway( void ) : QObject( 0, "OTGateway" ), if ( ( HciCtl = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI)) < 0) { SLOT_ShowError( tr( "error opening hci socket" ) ); return; } // load all known devices updateDrivers(); // load all peers we have ever seen loadKnownPeers(); - // iterate over drivers and find active connections + // iterate over drivers and find active NetworkSetups // adding/updating peers - loadActiveConnections(); + loadActiveNetworkSetups(); // check every 4 seconds the state of BT timerEvent(0); RefreshTimer = -1; setRefreshTimer( 4000 ); // load known link keys readLinkKeys(); } // close bluetooth system OTGateway::~OTGateway( void ) { @@ -366,51 +366,51 @@ const char * OTGateway::deviceTypeToName( int cls ) { return "av"; case 0x05: return "peripheral"; case 0x06: return "imaging"; case 0x07: default : break; } return "unknown"; } -PANConnectionVector OTGateway::getPANConnections( void ) { - PANConnectionVector V; +PANNetworkSetupVector OTGateway::getPANNetworkSetups( void ) { + PANNetworkSetupVector V; struct bnep_connlist_req req; struct bnep_conninfo ci[48]; V.setAutoDelete(TRUE); int ctl = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_BNEP); if (ctl < 0) { odebug << "Failed to open control socket" << oendl; return V; } req.cnum = 48; req.ci = ci; if (ioctl(ctl, BNEPGETCONNLIST, &req)) { - odebug << "Failed to get connection list" << oendl; + odebug << "Failed to get NetworkSetup list" << oendl; ::close( ctl ); return V; } for ( unsigned i=0; i < req.cnum; i++) { V.resize( V.size() + 1 ); if( ci[i].role == BNEP_SVC_PANU ) { // we are the client - V.insert( V.size()-1, new OTPANConnection( + V.insert( V.size()-1, new OTPANNetworkSetup( ci[i].device, batostr((bdaddr_t *) ci[i].dst) ) ); } } ::close( ctl ); return V; } struct link_key { bdaddr_t sba; @@ -501,53 +501,53 @@ bool OTGateway::removeLinkKey( unsigned int Index ) { if( Index < (AllKeys.size()-1) ) { // collapse array AllKeys[Index] = AllKeys[AllKeys.size()-1]; } // remove last element AllKeys.resize( AllKeys.size()-1 ); return 1; } #define MAXCONNECTIONS 10 -void OTGateway::loadActiveConnections( void ) { +void OTGateway::loadActiveNetworkSetups( void ) { struct hci_conn_list_req *cl; struct hci_conn_info *ci; OTDeviceAddress Addr; OTPeer * P; if (!(cl = (struct hci_conn_list_req *)malloc( MAXCONNECTIONS * sizeof(*ci) + sizeof(*cl)))) { emit error( tr("Can't allocate memory") ); return; } memset( cl, 0, MAXCONNECTIONS * sizeof(*ci) + sizeof(*cl) ); for( unsigned int i = 0; i < AllDrivers.count(); i ++ ) { if( ! AllDrivers[i]->isUp() ) { continue; } - // driver is up -> check connections + // driver is up -> check NetworkSetups cl->dev_id = AllDrivers[i]->devId(); cl->conn_num = MAXCONNECTIONS; ci = cl->conn_info; if (ioctl( getSocket(), HCIGETCONNLIST, (void *) cl)) { - emit error( tr("Can't get connection list") ); + emit error( tr("Can't get NetworkSetup list") ); break; } for ( int k = 0; k < cl->conn_num; k++, ci++) { if( ci->state != BT_CONNECTED ) { // not yet connected continue; } Addr.setBDAddr( ci->bdaddr ); P = findPeer( Addr ); @@ -744,25 +744,25 @@ int OTGateway::releaseRFCommDevice( int devnr ) { dl->dev_num = RFCOMM_MAX_DEV; di = dl->dev_info; if( ::ioctl(s, RFCOMMGETDEVLIST, (void *) dl) < 0) { emit error( tr("Can't get device list") ); ::close( s ); return 0; } dr = di; for (i = 0; i < dl->dev_num; i++, dr++) { if( dr->id == devnr ) { - // still in connection list + // still in NetworkSetup list struct rfcomm_dev_req req; int err; memset(&req, 0, sizeof(req)); req.dev_id = devnr; if ((err = ioctl(s, RFCOMMRELEASEDEV, &req)) < 0 ) { return err; } return 0; } } 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 @@ -8,55 +8,55 @@ #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 @@ -83,25 +83,25 @@ public : 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 ) @@ -164,25 +164,25 @@ signals : // 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; diff --git a/noncore/settings/networksettings2/opietooth2/OTInquiry.h b/noncore/settings/networksettings2/opietooth2/OTInquiry.h index f7bdeec..559af7a 100644 --- a/noncore/settings/networksettings2/opietooth2/OTInquiry.h +++ b/noncore/settings/networksettings2/opietooth2/OTInquiry.h @@ -29,25 +29,25 @@ class QSocket; class QDateTime; class OTDriver; class OTHCISocket; /** Scans for nearby bluetooth devices. * This class provides an asynchronous interface to the * inquriy HCI command. To scan for other devices, connect * to the signals neighbourFound() and finished() and call * inquiry(). Inquiry results are signalled as soon as they arrive, * so the information can be displayed before the whole inquiry * process is finished. - * Still no connections should be set up before + * Still no networkSetups should be set up before * the finished() signal was sent (hmm, is this always true..?) */ class OTInquiry : public QObject { Q_OBJECT public: /** Constructor. @param owner The owning parent object */ |