summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager
Side-by-side diff
Diffstat (limited to 'noncore/net/opietooth/manager') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp16
-rw-r--r--noncore/net/opietooth/manager/devicehandler.cpp10
-rw-r--r--noncore/net/opietooth/manager/dunpopup.cpp2
-rw-r--r--noncore/net/opietooth/manager/hciconfwrapper.cpp16
-rw-r--r--noncore/net/opietooth/manager/obexdialog.cpp2
-rw-r--r--noncore/net/opietooth/manager/obexpopup.cpp4
-rw-r--r--noncore/net/opietooth/manager/panpopup.cpp2
-rw-r--r--noncore/net/opietooth/manager/popuphelper.cpp4
-rw-r--r--noncore/net/opietooth/manager/pppdialog.cpp2
-rw-r--r--noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp4
-rw-r--r--noncore/net/opietooth/manager/rfcommconfhandler.cpp10
-rw-r--r--noncore/net/opietooth/manager/rfcpopup.cpp8
-rw-r--r--noncore/net/opietooth/manager/scandialog.cpp2
13 files changed, 41 insertions, 41 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index 29030ab..b1cddd2 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -146,25 +146,25 @@ void BlueBase::writeConfig()
cfg.writeEntry( "enableAuthentification" , m_enableAuthentification );
cfg.writeEntry( "enablePagescan" , m_enablePagescan );
cfg.writeEntry( "enableInquiryscan" , m_enableInquiryscan );
writeToHciConfig();
}
/**
* Modify the hcid.conf file to our needs
*/
void BlueBase::writeToHciConfig()
{
- qWarning("writeToHciConfig");
+ owarn << "writeToHciConfig" << oendl;
HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" );
hciconf.load();
hciconf.setPinHelper( "/opt/QtPalmtop/bin/bluepin" );
hciconf.setName( m_deviceName );
hciconf.setEncrypt( m_useEncryption );
hciconf.setAuth( m_enableAuthentification );
hciconf.setPscan( m_enablePagescan );
hciconf.setIscan( m_enableInquiryscan );
hciconf.save();
}
@@ -358,81 +358,81 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
* delete the PopupMenu otherwise it's the responsibility of
* the PopupMenu to delete itself
*
*/
else if ( ((BTListItem*)item)->type() == "service")
{
BTServiceItem* service = (BTServiceItem*)item;
QMap<int, QString> list = service->services().classIdList();
QMap<int, QString>::Iterator it = list.begin();
QPopupMenu *popup =0l;
if ( it != list.end() )
{
- qWarning("Searching id %d %s", it.key(), it.data().latin1() );
+ owarn << "Searching id " << it.key() << " " << it.data().latin1() << "" << oendl;
popup = m_popHelper.find( it.key(),
service->services(),
(BTDeviceItem*)service->parent() );
}
else
{
- qWarning("Empty");
+ owarn << "Empty" << oendl;
}
if ( popup == 0l )
{
- qWarning("factory returned 0l");
+ owarn << "factory returned 0l" << oendl;
popup = new QPopupMenu();
}
int test1 = popup->insertItem( tr("Test1:"), 2);
ret = popup->exec( point );
- qWarning("returned from exec() ");
+ owarn << "returned from exec() " << oendl;
if ( ret == -1 )
{
;
}
else if ( ret == test1 )
{
;
}
delete popup;
}
delete menu;
}
/**
* Search and display avail. services for a device (on expand from device listing)
* @param item the service item returned
*/
void BlueBase::addServicesToDevice( BTDeviceItem * item )
{
- qDebug("addServicesToDevice");
+ odebug << "addServicesToDevice" << oendl;
// row of mac adress text(3)
RemoteDevice device = item->remoteDevice();
m_deviceList.insert( item->mac() , item );
// and some time later I get a signal foundServices( const QString& device, Services::ValueList ); back
m_localDevice->searchServices( device );
}
/**
* Overloaded. This one it the one that is
ted to the foundServices signal
* @param device the mac address of the remote device
* @param servicesList the list with the service the device has.
*/
void BlueBase::addServicesToDevice( const QString& device, Services::ValueList servicesList )
{
- qDebug("fill services list");
+ odebug << "fill services list" << oendl;
QMap<QString,BTDeviceItem*>::Iterator it;
BTDeviceItem* deviceItem = 0;
// get the right devices which requested the search
it = m_deviceList.find( device );
if( it == m_deviceList.end() )
return;
deviceItem = it.data();
// remove previous entries
QList<QListViewItem> tempList;
@@ -598,25 +598,25 @@ void BlueBase::deviceActive( const RemoteDevice &device )
// We should have a BTDeviceItem there or where does it get added to the map -zecke
m_localDevice->isAvailable( device.mac() );
}
/**
* The signal catcher. Set the avail. status on device.
* @param device - the mac address
* @param connected - if it is avail. or not
*/
void BlueBase::deviceActive( const QString& device, bool connected )
{
- qDebug("deviceActive slot");
+ odebug << "deviceActive slot" << oendl;
QMap<QString,BTDeviceItem*>::Iterator it;
it = m_deviceList.find( device );
if( it == m_deviceList.end() )
return;
BTDeviceItem* deviceItem = it.data();
if ( connected )
{
diff --git a/noncore/net/opietooth/manager/devicehandler.cpp b/noncore/net/opietooth/manager/devicehandler.cpp
index 9c5b817..bd34351 100644
--- a/noncore/net/opietooth/manager/devicehandler.cpp
+++ b/noncore/net/opietooth/manager/devicehandler.cpp
@@ -24,31 +24,31 @@ QString path = QDir::homeDirPath() + "/Settings/bluetooth";
QStringList devicesFileList = deviceListSave.entryList();
// cut .conf of to get the mac and also read the name entry in it.
if (!devicesFileList.isEmpty() ) {
QString name;
QString mac;
QStringList::Iterator it;
for (it = devicesFileList.begin(); it != devicesFileList.end(); ++it ) {
if ( (*it) == "." || (*it) == ".." )
continue;
- qDebug((*it).latin1() );
+ odebug << (*it).latin1() << oendl;
Config conf(path + "/"+(*it), Config::File);
conf.setGroup("Info");
name = conf.readEntry("name", "Error");
mac = conf.readEntry("mac", QString::null);
- qDebug("MAC: " + mac);
- qDebug("NAME: " + name);
+ odebug << "MAC: " + mac << oendl;
+ odebug << "NAME: " + name << oendl;
if (mac.isEmpty() )
continue;
RemoteDevice currentDevice( mac , name );
list.append( currentDevice );
}
}
return list;
};
/*
* This is some how rude but make sure all old devices
* are getting deleted
*/
@@ -57,31 +57,31 @@ void DeviceHandler::save( const RemoteDevice::ValueList& list) {
rm += "rm -rf ";
rm += QDir::homeDirPath() + "/Settings/bluetooth";
system ( rm.data() );
if (list.isEmpty() ) // no need to create the dir
return;
/**
* Create a new dir
*/
rm = "mkdir ";
rm += QDir::homeDirPath() + "/Settings/bluetooth";
- qWarning("out %s", rm.data() );
+ owarn << "out " << rm.data() << "" << oendl;
system( rm.data() );
RemoteDevice::ValueList::ConstIterator it;
// write the config
for ( it = list.begin(); it != list.end(); ++it ) {
- qDebug( "/Settings/bluetooth/" + (*it).mac() + ".conf");
+ odebug << "/Settings/bluetooth/" + (*it).mac() + ".conf" << oendl;
Config conf( QDir::homeDirPath() +
"/Settings/bluetooth/" +
(*it).mac() + ".conf", Config::File );
conf.setGroup( "Info" );
conf.writeEntry( "name", (*it).name() );
conf.writeEntry( "mac", (*it).mac() );
}
}
diff --git a/noncore/net/opietooth/manager/dunpopup.cpp b/noncore/net/opietooth/manager/dunpopup.cpp
index 3043f71..5b01d2f 100644
--- a/noncore/net/opietooth/manager/dunpopup.cpp
+++ b/noncore/net/opietooth/manager/dunpopup.cpp
@@ -2,25 +2,25 @@
#include <qtimer.h>
#include "dunpopup.h"
using namespace OpieTooth;
/*
* c'tor init the QAction
*/
DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() {
- qWarning("DunPopup c'tor");
+ owarn << "DunPopup c'tor" << oendl;
m_item = item;
QAction *a, *b, *c;
m_dunconnection = 0l;
/* connect action */
a = new QAction(); // so it's get deleted
a->setText( tr("connect") );
a->addTo( this );
connect( a, SIGNAL( activated() ), this, SLOT( slotConnect() ) );
diff --git a/noncore/net/opietooth/manager/hciconfwrapper.cpp b/noncore/net/opietooth/manager/hciconfwrapper.cpp
index 35e9cd9..71c935c 100644
--- a/noncore/net/opietooth/manager/hciconfwrapper.cpp
+++ b/noncore/net/opietooth/manager/hciconfwrapper.cpp
@@ -65,75 +65,75 @@ namespace OpieTooth {
void HciConfWrapper::setValue(const QString &key, const QString &value ) {
if (m_file.isEmpty() ) // load first
return;
QStringList::Iterator it;
QString str;
for (it = m_file.begin(); it != m_file.end(); ++it ) {
str = (*it);
if( (str.contains(key)) > 0 ) {
- qDebug("Found");
+ odebug << "Found" << oendl;
// still need to look if its commented out!!!
str.simplifyWhiteSpace();
- qDebug( key );
+ odebug << key << oendl;
if (str.startsWith("#")) {
str = (key + " " + value + ";");
} else {
str = str.replace( QRegExp( "\\s*"+key+"\\s+[^\\s][^;]*;" ), key + " " + value + ";");
}
- qDebug( str );
+ odebug << str << oendl;
it = m_file.remove( it );
it = m_file.insert( it, str );
//return; the regexp is too wide -zecke // all set
}
}
}
/**
* This loads the config file and stores it inside
* the m_file
*/
void HciConfWrapper::load() {
- qWarning("loaded");
+ owarn << "loaded" << oendl;
m_file.clear();
QFile file( m_fileName );
if (!file.open( IO_ReadOnly ) ) {
- qDebug("Could not open");
+ odebug << "Could not open" << oendl;
return;
}
/**
* readAll() into a QByteArray
* QStringList::split('\n', array )
* would this be faster? -zecke
*/
QTextStream stream(&file );
QString tmp;
while ( !stream.atEnd() ) {
tmp = stream.readLine();
m_file.append( tmp );
}
}
void HciConfWrapper::save() {
- qWarning("save");
+ owarn << "save" << oendl;
if (m_file.isEmpty() ) // load first
return;
QFile file( m_fileName );
if ( !file.open(IO_WriteOnly ) ) {
- qWarning("could not open %s", m_fileName.latin1() );
+ owarn << "could not open " << m_fileName.latin1() << "" << oendl;
return;
}
QTextStream stream(&file );
QStringList::Iterator it;
for ( it = m_file.begin(); it != m_file.end(); ++it ) {
stream << (*it) << endl;
}
- qWarning("saved");
+ owarn << "saved" << oendl;
};
}
diff --git a/noncore/net/opietooth/manager/obexdialog.cpp b/noncore/net/opietooth/manager/obexdialog.cpp
index 1ef862a..3a3dbb0 100644
--- a/noncore/net/opietooth/manager/obexdialog.cpp
+++ b/noncore/net/opietooth/manager/obexdialog.cpp
@@ -71,19 +71,19 @@ void ObexDialog::sendData() {
QString fileURL = cmdLine->text();
QString file = QFileInfo( fileURL ).fileName();
QString modifiedName = chNameLine->text();
// vom popupmenu beziehen
OProcess* obexSend = new OProcess();
if ( !modifiedName.isEmpty() ) {
*obexSend << "ussp-push" << m_device << fileURL << modifiedName;
} else {
*obexSend << "ussp-push" << m_device << fileURL << file;
}
if (!obexSend->start(OProcess::DontCare, OProcess::AllOutput) ) {
- qWarning("could not start");
+ owarn << "could not start" << oendl;
delete obexSend;
}
}
diff --git a/noncore/net/opietooth/manager/obexpopup.cpp b/noncore/net/opietooth/manager/obexpopup.cpp
index d147d52..9a50199 100644
--- a/noncore/net/opietooth/manager/obexpopup.cpp
+++ b/noncore/net/opietooth/manager/obexpopup.cpp
@@ -7,39 +7,39 @@
/* QT */
#include <qtimer.h>
using namespace OpieTooth;
/*
* c'tor init the QAction
*/
ObexPopup::ObexPopup()
: QPopupMenu()
{
- qWarning("RfcCommPopup c'tor");
+ owarn << "RfcCommPopup c'tor" << oendl;
QAction* a;
/* connect action */
a = new QAction( ); // so it's get deleted
a->setText("Push file");
a->addTo( this );
connect( a, SIGNAL( activated() ),
this, SLOT( slotPush() ) );
};
ObexPopup::~ObexPopup()
{}
void ObexPopup::slotPush()
{
- qWarning("push something");
+ owarn << "push something" << oendl;
ObexDialog obexDialog;
QPEApplication::execDialog( &obexDialog );
}
diff --git a/noncore/net/opietooth/manager/panpopup.cpp b/noncore/net/opietooth/manager/panpopup.cpp
index 8b05964..43c2777 100644
--- a/noncore/net/opietooth/manager/panpopup.cpp
+++ b/noncore/net/opietooth/manager/panpopup.cpp
@@ -2,25 +2,25 @@
#include <qtimer.h>
#include "panpopup.h"
using namespace OpieTooth;
/*
* c'tor init the QAction
*/
PanPopup::PanPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() {
- qWarning("PanPopup c'tor");
+ owarn << "PanPopup c'tor" << oendl;
m_item = item;
QAction *a, *b, *c;
m_panconnection = 0l;
/* connect action */
a = new QAction(); // so it's get deleted
a->setText( tr("connect") );
a->addTo( this );
connect( a, SIGNAL( activated() ), this, SLOT( slotConnect() ) );
diff --git a/noncore/net/opietooth/manager/popuphelper.cpp b/noncore/net/opietooth/manager/popuphelper.cpp
index ab22fea..19deb19 100644
--- a/noncore/net/opietooth/manager/popuphelper.cpp
+++ b/noncore/net/opietooth/manager/popuphelper.cpp
@@ -7,28 +7,28 @@ using namespace OpieTooth;
PopupHelper::PopupHelper() {
init();
}
PopupHelper::~PopupHelper() {
}
void PopupHelper::insert( int id, popupFactory fact ) {
m_map.insert(id, fact );
}
QPopupMenu* PopupHelper::find( int id, const Services& ser, BTDeviceItem* item ) {
- //qWarning("find");
+ //owarn << "find" << oendl;
FactoryMap::Iterator it = m_map.find(id );
if ( it != m_map.end() ) {
- //qWarning("found");
+ //owarn << "found" << oendl;
popupFactory fact = it.data();
return (*fact)(ser, item);
}
return 0l;
}
void PopupHelper::init() {
insert( 4355, newRfcComPopup );
insert( 4354, newDunPopup );
insert( 4353, newRfcComPopup );
insert( 4357, newObexPushPopup );
insert( 4358, newObexPushPopup );
diff --git a/noncore/net/opietooth/manager/pppdialog.cpp b/noncore/net/opietooth/manager/pppdialog.cpp
index 78c1501..989bf45 100644
--- a/noncore/net/opietooth/manager/pppdialog.cpp
+++ b/noncore/net/opietooth/manager/pppdialog.cpp
@@ -47,23 +47,23 @@ PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl,
PPPDialog::~PPPDialog() {
}
void PPPDialog::connectToDevice() {
outPut->clear();
// vom popupmenu beziehen
QString connectScript = "/etc/ppp/peers/" + cmdLine->text();
OProcess* pppDial = new OProcess();
*pppDial << "pppd" << m_device << "call" << connectScript;
connect( pppDial, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ),
this, SLOT(fillOutPut(Opie::Core::OProcess*,char*,int) ) );
if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) {
- qWarning("could not start");
+ owarn << "could not start" << oendl;
delete pppDial;
}
}
void PPPDialog::fillOutPut( OProcess* pppDial, char* cha, int len ) {
QCString str(cha, len );
outPut->insertLine( str );
delete pppDial;
}
diff --git a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp
index fc76301..4469129 100644
--- a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp
+++ b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp
@@ -62,46 +62,46 @@ void RfcommAssignDialog::newDevice( const QString & mac )
RfcommDialogItem *newDev = new RfcommDialogItem( &dialog );
newDev->setIdent( i );
newDev->setMac( mac );
if ( QPEApplication::execDialog( &dialog ) == QDialog::Accepted )
{
RfcommDialogItem *rfcomm = new RfcommDialogItem( m_box );
m_itemList.insert( i , rfcomm );
rfcomm->setIdent( i );
rfcomm->setMac( mac );
rfcomm->setChannel( newDev->channel() );
rfcomm->setComment( newDev->comment() );
- qDebug( "New device set up" );
+ odebug << "New device set up" << oendl;
}
}
}
}
void RfcommAssignDialog::loadConfig()
{
//Config cfg( "bluetoothmanager-rfcommbind" );
for ( int i = 0 ; i < m_range; i++ )
{
// cfg.setGroup( QString("%1").arg( i ) );
RfcommDialogItem *rfcomm = new RfcommDialogItem( m_box );
m_itemList.insert( i , rfcomm );
rfcomm->setIdent( i );
QMap<QString, RfCommConfObject*>::Iterator it;
it = confHandler->foundEntries().find( QString("%1").arg( i ) );
if ( it != confHandler->foundEntries().end() )
{
- qDebug( "Found key in foundEntries() " );
+ odebug << "Found key in foundEntries() " << oendl;
rfcomm->setMac( it.data()->mac() );
rfcomm->setChannel( it.data()->channel() );
rfcomm->setComment( it.data()->comment() );
}
/* Use rfcomm.conf directly for now
* rfcomm->setMac( cfg.readEntry( "mac", "" ) );
* rfcomm->setChannel( cfg.readNumEntry( "channel", 1 ) );
* rfcomm->setComment( cfg.readEntry( "comment", "" ) );
*/
}
}
diff --git a/noncore/net/opietooth/manager/rfcommconfhandler.cpp b/noncore/net/opietooth/manager/rfcommconfhandler.cpp
index 20453e8..2ef95ff 100644
--- a/noncore/net/opietooth/manager/rfcommconfhandler.cpp
+++ b/noncore/net/opietooth/manager/rfcommconfhandler.cpp
@@ -83,32 +83,32 @@ void RfCommConfHandler::load() {
QString number;
QString mac;
QString channel;
QString comment;
for ( QStringList::Iterator line=list.begin(); line != list.end(); line++ ) {
QString tmpLine = ( *line ).stripWhiteSpace();
if ( tmpLine.startsWith("rfcomm") ) {
QString number = tmpLine.mid( 6,1 );
- qDebug( tmpLine );
- qDebug( "TEST " + number );
+ odebug << tmpLine << oendl;
+ odebug << "TEST " + number << oendl;
} else if ( tmpLine.startsWith( "}" ) ) {
m_foundEntries.insert( number, new RfCommConfObject( number.toInt(), mac, channel.toInt(), comment ) );
} else if ( tmpLine.startsWith( "device" ) ) {
mac = tmpLine.mid( 7, 17 );
- qDebug( "mac" + mac );
+ odebug << "mac" + mac << oendl;
} else if ( tmpLine.startsWith( "channel" ) ) {
channel = tmpLine.mid( 8, 1 );
qDebug ( "Channel :" + channel );
} else if ( tmpLine.startsWith( "comment" ) ) {
comment = tmpLine.mid( 9, tmpLine.find( ';' ) - 9 - 1 );
- qDebug( "Comment: " + comment );
+ odebug << "Comment: " + comment << oendl;
}
}
rfCommConf.close();
}
save( m_foundEntries );
- qDebug( QString( "ENTries: %1").arg( m_foundEntries.count() ) );
+ odebug << QString( "ENTries: %1").arg( m_foundEntries.count() ) << oendl;
}
diff --git a/noncore/net/opietooth/manager/rfcpopup.cpp b/noncore/net/opietooth/manager/rfcpopup.cpp
index 04bfe48..01ad616 100644
--- a/noncore/net/opietooth/manager/rfcpopup.cpp
+++ b/noncore/net/opietooth/manager/rfcpopup.cpp
@@ -8,25 +8,25 @@
/* QT */
#include <qtimer.h>
using namespace OpieTooth;
/*
* c'tor init the QAction
*/
RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item )
: QPopupMenu()
{
- qWarning("RfcCommPopup c'tor");
+ owarn << "RfcCommPopup c'tor" << oendl;
QAction* a;
m_item = item;
/* connect action */
a = new QAction( ); // so it's get deleted
a->setText("Connect");
a->addTo( this );
connect( a, SIGNAL( activated() ),
this, SLOT( slotConnect() ) );
@@ -61,43 +61,43 @@ RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item )
RfcCommPopup::~RfcCommPopup()
{
/* delete m_con;
delete m_dis;
delete m_foo;
delete m_bar; */
}
void RfcCommPopup::slotConnect()
{
- qWarning("connect");
+ owarn << "connect" << oendl;
PPPDialog pppDialog;
QPEApplication::execDialog( &pppDialog );
}
void RfcCommPopup::slotDisconnect()
{
- qWarning("slot disconnected");
+ owarn << "slot disconnected" << oendl;
}
void RfcCommPopup::slotBind()
{
RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp );
rfcommAssign.newDevice( m_item->mac() );
if ( QPEApplication::execDialog( &rfcommAssign ) == QDialog::Accepted )
{
rfcommAssign.saveConfig();
}
}
void RfcCommPopup::slotBar()
{
- qWarning("slotBar");
+ owarn << "slotBar" << oendl;
};
diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp
index c8ea3e3..3b005c4 100644
--- a/noncore/net/opietooth/manager/scandialog.cpp
+++ b/noncore/net/opietooth/manager/scandialog.cpp
@@ -146,16 +146,16 @@ namespace OpieTooth {
if ( ( (QCheckListItem*)it.current() )->isOn() ) {
RemoteDevice device( it.current()->text(1), it.current()->text(0) );
deviceList.append( device );
}
}
emit selectedDevices( deviceList );
}
/**
* Cleanup
*/
ScanDialog::~ScanDialog() {
- qWarning("delete scan dialog");
+ owarn << "delete scan dialog" << oendl;
delete localDevice;
}
}