author | wimpie <wimpie> | 2005-01-09 00:32:10 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-09 00:32:10 (UTC) |
commit | e54346d28b19d3ac671802a25e8c03f346693291 (patch) (side-by-side diff) | |
tree | 0f8d6561e24a7ba36fd8a6ab1869aa470e1fdb36 /noncore/settings/networksettings2/opietooth2 | |
parent | 60a617583d0ccc793d9ea4465998d90ec208db58 (diff) | |
download | opie-e54346d28b19d3ac671802a25e8c03f346693291.zip opie-e54346d28b19d3ac671802a25e8c03f346693291.tar.gz opie-e54346d28b19d3ac671802a25e8c03f346693291.tar.bz2 |
Updated dependencies
NS2->app requires OT2Lib and NS2Lib
OT2Lib requires NS2Lib
Most plugins only require NS2Lib
Except
BTPlugin which requires als OT2Lib
Also renamed owarn -> odebug
Diffstat (limited to 'noncore/settings/networksettings2/opietooth2') (more/less context) (ignore whitespace changes)
11 files changed, 62 insertions, 55 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTDevice.cpp b/noncore/settings/networksettings2/opietooth2/OTDevice.cpp index 62f17a0..c6f7d5e 100644 --- a/noncore/settings/networksettings2/opietooth2/OTDevice.cpp +++ b/noncore/settings/networksettings2/opietooth2/OTDevice.cpp @@ -104,5 +104,5 @@ bool OTDevice::detach(){ if( kill( m_hciattachPid, 9) < 0 ) { - owarn << "could not stop " << errno << oendl; + odebug << "could not stop " << errno << oendl; emit error( tr( "Could not stop process" ) ); return FALSE; @@ -169,5 +169,5 @@ void OTDevice::slotStdErr(OProcess* proc, char* chars, int len) { QString m_output; m_output.append( string.data() ); - owarn << m_output << oendl; + odebug << m_output << oendl; } } @@ -212,5 +212,5 @@ void OTDevice::detectDeviceType( QString & Device, // detect device type and determine parms - owarn << "Detecting device" << oendl; + odebug << "Detecting device" << oendl; switch ( ODevice::inst()->model() ) { case Model_iPAQ_H39xx: diff --git a/noncore/settings/networksettings2/opietooth2/OTDriver.cpp b/noncore/settings/networksettings2/opietooth2/OTDriver.cpp index 8bd7919..a7ee662 100644 --- a/noncore/settings/networksettings2/opietooth2/OTDriver.cpp +++ b/noncore/settings/networksettings2/opietooth2/OTDriver.cpp @@ -151,5 +151,5 @@ OTDriver::OTDriver( OTGateway * _OT, struct hci_dev_info* di) : QObject( _OT ), init(di); - owarn << "Driver " << devname() << oendl; + odebug << "Driver " << devname() << oendl; AutoClose = new QTimer( this ); @@ -386,5 +386,5 @@ void OTDriver::setUp( bool M ) { void OTDriver::bringUp() { - owarn << "bringUp : " << Dev << oendl; + odebug << "bringUp : " << Dev << oendl; if( ! open() ) { @@ -409,5 +409,5 @@ void OTDriver::bringUp() { void OTDriver::bringDown() { - owarn << "bringDown : " << Dev << oendl; + odebug << "bringDown : " << Dev << oendl; if( ! open() ) { @@ -662,5 +662,5 @@ void OTDriver::setManufacturer(int compid) { OTHCISocket * OTDriver::openSocket( void ) { if( ! Socket ) { - owarn << "Open HCI socket to " << devname() << oendl; + odebug << "Open HCI socket to " << devname() << oendl; Socket = new OTHCISocket( this ); } @@ -670,5 +670,5 @@ OTHCISocket * OTDriver::openSocket( void ) { void OTDriver::closeSocket( void ) { if( Socket ) { - owarn << "Close HCI socket to " << devname() << oendl; + odebug << "Close HCI socket to " << devname() << oendl; delete Socket; Socket = 0; @@ -714,5 +714,5 @@ long OTDriver::getLinkQuality( const OTDeviceAddress & Addr ) { if (ioctl( fd(), HCIGETCONNINFO, (unsigned long) cr) < 0) { - owarn << "Get connection info failed" << oendl; + odebug << "Get connection info failed" << oendl; free(cr); return 0; @@ -732,10 +732,10 @@ long OTDriver::getLinkQuality( const OTDeviceAddress & Addr ) { if (hci_send_req( fd(), &rq, 100) < 0) { - owarn << "Get connection info failed" << oendl; + odebug << "Get connection info failed" << oendl; return 0; } if( rp.status ) { - owarn << QString().sprintf("HCI get_link_quality cmd failed (0x%2.2X)", rp.status) << oendl; + odebug << QString().sprintf("HCI get_link_quality cmd failed (0x%2.2X)", rp.status) << oendl; return 0; } diff --git a/noncore/settings/networksettings2/opietooth2/OTDriverList.cpp b/noncore/settings/networksettings2/opietooth2/OTDriverList.cpp index f703834..e5af742 100644 --- a/noncore/settings/networksettings2/opietooth2/OTDriverList.cpp +++ b/noncore/settings/networksettings2/opietooth2/OTDriverList.cpp @@ -54,5 +54,5 @@ void OTDriverList::update() { if( ioctl( OT->getSocket(), HCIGETDEVLIST, (void*)dl) ) { - owarn << "WARNING : cannot read device list. " + odebug << "WARNING : cannot read device list. " << errno << strerror( errno ) << oendl; @@ -80,5 +80,5 @@ void OTDriverList::update() { } - owarn << "Found " << count() << " devices" << oendl; + odebug << "Found " << count() << " devices" << oendl; ::free( dl ); diff --git a/noncore/settings/networksettings2/opietooth2/OTGateway.cpp b/noncore/settings/networksettings2/opietooth2/OTGateway.cpp index 6531cf6..e8137dd 100644 --- a/noncore/settings/networksettings2/opietooth2/OTGateway.cpp +++ b/noncore/settings/networksettings2/opietooth2/OTGateway.cpp @@ -155,5 +155,5 @@ bool OTGateway::isEnabled() { void OTGateway::SLOT_ShowError( const QString & S ) { - owarn << S << oendl; + odebug << S << oendl; if( ErrorConnectCount > 0 ) { @@ -211,5 +211,5 @@ void OTGateway::timerEvent( QTimerEvent * ) { void OTGateway::SLOT_Enabled( int id, bool Up ) { - owarn << "device " << id << " state " << Up << oendl; + odebug << "device " << id << " state " << Up << oendl; if( Up ) { // device is up -> detect it @@ -228,5 +228,5 @@ void OTGateway::updateDrivers( void ) { AllDrivers.update(); - owarn << "updated drivers. now " << AllDrivers.count() << oendl; + odebug << "updated drivers. now " << AllDrivers.count() << oendl; // connect signals for each driver @@ -266,5 +266,5 @@ void OTGateway::updateDrivers( void ) { void OTGateway::SLOT_DriverDisappeared( OTDriver * D ) { - owarn << "Driver " << D->devname() << " when offline" << oendl; + odebug << "Driver " << D->devname() << " when offline" << oendl; updateDrivers(); } @@ -319,5 +319,5 @@ void OTGateway::SLOT_PeerDetected( OTPeer * P, bool IsNew ) { if( IsNew ) { // new peer - owarn << "New peer " << P->name() << oendl; + odebug << "New peer " << P->name() << oendl; addPeer( P ); } @@ -385,5 +385,5 @@ PANConnectionVector OTGateway::getPANConnections( void ) { int ctl = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_BNEP); if (ctl < 0) { - owarn << "Failed to open control socket" << oendl; + odebug << "Failed to open control socket" << oendl; return V; } @@ -392,5 +392,5 @@ PANConnectionVector OTGateway::getPANConnections( void ) { req.ci = ci; if (ioctl(ctl, BNEPGETCONNLIST, &req)) { - owarn << "Failed to get connection list" << oendl; + odebug << "Failed to get connection list" << oendl; ::close( ctl ); return V; diff --git a/noncore/settings/networksettings2/opietooth2/OTHCISocket.cpp b/noncore/settings/networksettings2/opietooth2/OTHCISocket.cpp index 471c3bf..1997b44 100644 --- a/noncore/settings/networksettings2/opietooth2/OTHCISocket.cpp +++ b/noncore/settings/networksettings2/opietooth2/OTHCISocket.cpp @@ -35,5 +35,5 @@ OTHCISocket::~OTHCISocket() { void OTHCISocket::close() { - owarn << "OTHCISocket::close()" << oendl; + odebug << "OTHCISocket::close()" << oendl; if( HCIReadNotifier ) { delete HCIReadNotifier; @@ -47,5 +47,5 @@ void OTHCISocket::close() { bool OTHCISocket::open() { - owarn << "OTHCISocket::open()" << oendl; + odebug << "OTHCISocket::open()" << oendl; int s; @@ -152,5 +152,5 @@ void OTHCISocket::slotSocketActivated() { } } else { - owarn << "Error reading hci packet: packetSize(" + odebug << "Error reading hci packet: packetSize(" << psize << ")-3 != dataSize(" @@ -184,5 +184,5 @@ void OTHCISocket::updateStatus(const QByteArray& data) { void OTHCISocket::slotConnectionClosed() { - owarn << "HCI connection closed." << oendl; + odebug << "HCI connection closed." << oendl; emit connectionClosed(); } @@ -231,5 +231,5 @@ bool OTHCISocket::readStatus( unsigned char ogf, while (timer.isActive() && HCISocket.isValid()) { - owarn << "OTHCISocket::readStatus()" << oendl; + odebug << "OTHCISocket::readStatus()" << oendl; bool timeout = false; @@ -247,5 +247,5 @@ bool OTHCISocket::readStatus( unsigned char ogf, ocf == LastStatusOcf) { *status = LastStatus; - owarn << "OTHCISocket::readStatus(ogf=" + odebug << "OTHCISocket::readStatus(ogf=" << ogf << ",ocf=" @@ -259,5 +259,5 @@ bool OTHCISocket::readStatus( unsigned char ogf, } - owarn << "OTHCISocket::readStatus(ogf=" + odebug << "OTHCISocket::readStatus(ogf=" << ogf << ",ocf=" diff --git a/noncore/settings/networksettings2/opietooth2/OTInquiry.cpp b/noncore/settings/networksettings2/opietooth2/OTInquiry.cpp index 8e94bbc..2bc63c7 100644 --- a/noncore/settings/networksettings2/opietooth2/OTInquiry.cpp +++ b/noncore/settings/networksettings2/opietooth2/OTInquiry.cpp @@ -60,5 +60,5 @@ OTInquiry::~OTInquiry() { void OTInquiry::stopInquiring( void ) { if( Socket ) { - owarn << "Stop inquiry" << oendl; + odebug << "Stop inquiry" << oendl; Driver->closeSocket(); Socket = 0; @@ -76,5 +76,5 @@ bool OTInquiry::inquire( double timeout, int numResponses, int lap) { cmdBuf[4] = (unsigned char)numResponses; - owarn << "Send HCI inquiry command. wait for " << cmdBuf[3] << oendl; + odebug << "Send HCI inquiry command. wait for " << cmdBuf[3] << oendl; Socket->sendCommand(0x01, 0x0001, cmdBuf); @@ -90,10 +90,10 @@ bool OTInquiry::inquire( double timeout, int numResponses, int lap) { else { QString S =QString().sprintf( "%x", status ); - owarn << "OTInquiry::inquiry() failed: 0x" << S << oendl; + odebug << "OTInquiry::inquiry() failed: 0x" << S << oendl; emit finished(); return false; } } else { - owarn << "OTInquiry::inquiry(): Timeout." << oendl; + odebug << "OTInquiry::inquiry(): Timeout." << oendl; return false; } @@ -127,5 +127,5 @@ void OTInquiry::slotInquiryTimeout() { void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) { - owarn << "OTInquiry: hci packet received: eventCode=" + odebug << "OTInquiry: hci packet received: eventCode=" << (unsigned int)eventCode << " packetLength=" @@ -137,9 +137,9 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) { case EVT_INQUIRY_COMPLETE: { unsigned char status = data[0]; - owarn << "EVT_INQUIRY_COMPLETE status=" << status << oendl; + odebug << "EVT_INQUIRY_COMPLETE status=" << status << oendl; InquiryTimeoutTimer->stop(); if (status == 0) { if( SuccessfullyStarted == true) { - owarn << "OTInquiry ended successfully" << oendl; + odebug << "OTInquiry ended successfully" << oendl; SuccessfullyEnded = true; } @@ -164,5 +164,5 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) { Addr.setBDAddr( results[n].bdaddr ); - owarn << "INQUIRY_RESULT: " + odebug << "INQUIRY_RESULT: " << Addr.toString() << oendl; @@ -204,5 +204,5 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) { int numHciCmdPkts = data[1]; int cmdOpcode = *((uint16_t*)(data+2)); - owarn << "EVT_CMD_STATUS status=" + odebug << "EVT_CMD_STATUS status=" << status << " numPkts=" diff --git a/noncore/settings/networksettings2/opietooth2/OTPeer.cpp b/noncore/settings/networksettings2/opietooth2/OTPeer.cpp index 0d7e943..2272f04 100644 --- a/noncore/settings/networksettings2/opietooth2/OTPeer.cpp +++ b/noncore/settings/networksettings2/opietooth2/OTPeer.cpp @@ -52,5 +52,5 @@ void OTPeer::updateServices( void ) { serviceList.clear(); - owarn << "Get services from " << Addr.toString() << oendl; + odebug << "Get services from " << Addr.toString() << oendl; session = sdp_connect( &(OTDeviceAddress::any.getBDAddr()), @@ -59,5 +59,5 @@ void OTPeer::updateServices( void ) { if (!session) { - owarn << "sdp_connect(" + odebug << "sdp_connect(" << Addr.toString() << ") failed" @@ -81,5 +81,5 @@ void OTPeer::updateServices( void ) { attrId, &seq ) ) { - owarn << "Service Search failed" << oendl; + odebug << "Service Search failed" << oendl; sdp_close(session); return; @@ -178,5 +178,5 @@ void OTPeer::findOutState( int timeoutInSec, bool Force ) { ProbePhase = 0; ProbeTimeout = timeoutInSec*1000; - owarn << "Ping " << address().toString() << oendl; + odebug << "Ping " << address().toString() << oendl; startTimer( POLLDELAY ); } else { @@ -236,5 +236,5 @@ void OTPeer::timerEvent( QTimerEvent * ev ) { pf[0].events = POLLOUT; if( (n = ::poll(pf, 1, 0)) < 0 ) { - owarn << address().toString() + odebug << address().toString() << " : errno " << errno @@ -267,5 +267,5 @@ void OTPeer::timerEvent( QTimerEvent * ev ) { // connect because the device does not allow us // but it is UP - owarn << address().toString() + odebug << address().toString() << " good send error " << errno @@ -277,5 +277,5 @@ void OTPeer::timerEvent( QTimerEvent * ev ) { break; } else if( errno != EBUSY ) { - owarn << address().toString() + odebug << address().toString() << " : errno " << errno @@ -300,5 +300,5 @@ void OTPeer::timerEvent( QTimerEvent * ev ) { pf[0].events = POLLIN; if( (n = ::poll(pf, 1, 0)) < 0 ) { - owarn << address().toString() + odebug << address().toString() << " : errno " << errno @@ -316,5 +316,5 @@ void OTPeer::timerEvent( QTimerEvent * ev ) { if( (n = ::recv( ProbeFD, buf, sizeof(buf), 0)) < 0) { - owarn << address().toString() + odebug << address().toString() << "errno " << errno @@ -331,5 +331,5 @@ void OTPeer::timerEvent( QTimerEvent * ev ) { break; - owarn << "reply from " + odebug << "reply from " << address().toString() << oendl; diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp index b14cc2f..8323549 100644 --- a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp +++ b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp @@ -538,5 +538,5 @@ void OTScan::SLOT_Selected( QListViewItem * it ) { SelectedChannel = 0; } - owarn << "Selected " << SelectedPeer->address().toString() << + odebug << "Selected " << SelectedPeer->address().toString() << " Channel " << SelectedChannel << oendl; emit selected(); @@ -566,5 +566,5 @@ void OTScan::SLOT_CleanupOld( ) { ) { // part of linkkey - owarn << "LINKKEY " << TheP->address().toString() << oendl; + odebug << "LINKKEY " << TheP->address().toString() << oendl; break; } @@ -572,5 +572,5 @@ void OTScan::SLOT_CleanupOld( ) { if( k == Keys.count() ) { - owarn << "RM LINKKEY " << TheP->address().toString() << oendl; + odebug << "RM LINKKEY " << TheP->address().toString() << oendl; // not found -> remember to remove this peer QListViewItem * Nit; @@ -582,5 +582,5 @@ void OTScan::SLOT_CleanupOld( ) { } } else { - owarn << "NODOWN " << TheP->address().toString() << oendl; + odebug << "NODOWN " << TheP->address().toString() << oendl; } @@ -607,5 +607,5 @@ void OTScan::SLOT_NewPeer( OTPeer * P, bool IsNew ){ if( ! it ) { - owarn << "Should not occur" << oendl; + odebug << "Should not occur" << oendl; return; } @@ -930,5 +930,5 @@ void OTManage::SLOT_UpDriver( bool Up ) { if( it->isSelected() ) { OTDriver * D = ((DriverLVI *)it)->driver(); - owarn << "UP driver " << D->devname() << oendl; + odebug << "UP driver " << D->devname() << oendl; // this D->setUp( Up ); diff --git a/noncore/settings/networksettings2/opietooth2/config.in b/noncore/settings/networksettings2/opietooth2/config.in index 720f49a..084e8c0 100644 --- a/noncore/settings/networksettings2/opietooth2/config.in +++ b/noncore/settings/networksettings2/opietooth2/config.in @@ -1,5 +1,5 @@ config NS2OPIETOOTH - boolean "opie-networksettings2 bluetooth library" + boolean "Opietooth2 bluetooth library" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBBLUEZ_DEP && NS2CORE diff --git a/noncore/settings/networksettings2/opietooth2/libopietooth2.postinst b/noncore/settings/networksettings2/opietooth2/libopietooth2.postinst index cd605c2..2713c61 100755 --- a/noncore/settings/networksettings2/opietooth2/libopietooth2.postinst +++ b/noncore/settings/networksettings2/opietooth2/libopietooth2.postinst @@ -6,5 +6,5 @@ QTPB=/opt/QtPalmtop/bin # qcop QPE/Taskbar "linkChanged(opietooth)" -qcop QPE/Taskbar "reloadApps()" +${QTPB}/qcop QPE/Taskbar "reloadApps()" exit 0 diff --git a/noncore/settings/networksettings2/opietooth2/opietooth2.pro b/noncore/settings/networksettings2/opietooth2/opietooth2.pro index e0057a9..16277cf 100644 --- a/noncore/settings/networksettings2/opietooth2/opietooth2.pro +++ b/noncore/settings/networksettings2/opietooth2/opietooth2.pro @@ -36,2 +36,9 @@ VERSION = 1.0.0 include ( $(OPIEDIR)/include.pro ) + +!isEmpty( LIBBLUEZ_INC_DIR ) { + INCLUDEPATH += $$LIBBLUEZ_INC_DIR +} +!isEmpty( LIBBLUEZ_LIB_DIR ) { + LIBS += -L$$LIBBLUEZ_LIB_DIR +} |