summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/lib.pro4
-rw-r--r--noncore/net/opietooth/lib/libopietooth1.control2
-rw-r--r--noncore/net/opietooth/lib/startpanconnection.cpp1
-rw-r--r--noncore/net/opietooth/manager/manager.pro4
-rw-r--r--noncore/net/opietooth/manager/panpopup.cpp2
-rw-r--r--noncore/net/opietooth/manager/popuphelper.cpp1
-rw-r--r--noncore/net/opietooth/manager/stdpopups.cpp5
-rw-r--r--noncore/net/opietooth/manager/stdpopups.h1
8 files changed, 14 insertions, 6 deletions
diff --git a/noncore/net/opietooth/lib/lib.pro b/noncore/net/opietooth/lib/lib.pro
index d081b5c..25b3c2d 100644
--- a/noncore/net/opietooth/lib/lib.pro
+++ b/noncore/net/opietooth/lib/lib.pro
@@ -1,30 +1,30 @@
TEMPLATE = lib
CONFIG += qte warn_on release
-HEADERS = connection.h parser.h device.h manager.h remotedevice.h services.h startpanconnection.h
-SOURCES = connection.cpp parser.cc device.cc manager.cc remotedevice.cc services.cc startpanconnection.cpp
+HEADERS = connection.h parser.h device.h manager.h remotedevice.h services.h startpanconnection.h startdunconnection.h
+SOURCES = connection.cpp parser.cc device.cc manager.cc remotedevice.cc services.cc startpanconnection.cpp startdunconnection.cpp
TARGET = opietooth
INCLUDEPATH += $(OPIEDIR)/include .
DESTDIR = $(OPIEDIR)/lib$(PROJMAK)
LIBS += -lopie
#VERSION = 0.0.0
TRANSLATIONS = ../../../../i18n/de/libopietooth.ts \
../../../../i18n/da/libopietooth.ts \
../../../../i18n/xx/libopietooth.ts \
../../../../i18n/en/libopietooth.ts \
../../../../i18n/es/libopietooth.ts \
../../../../i18n/fr/libopietooth.ts \
../../../../i18n/hu/libopietooth.ts \
../../../../i18n/ja/libopietooth.ts \
../../../../i18n/ko/libopietooth.ts \
../../../../i18n/no/libopietooth.ts \
../../../../i18n/pl/libopietooth.ts \
../../../../i18n/pt/libopietooth.ts \
../../../../i18n/pt_BR/libopietooth.ts \
../../../../i18n/sl/libopietooth.ts \
../../../../i18n/zh_CN/libopietooth.ts \
../../../../i18n/zh_TW/libopietooth.ts
include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/net/opietooth/lib/libopietooth1.control b/noncore/net/opietooth/lib/libopietooth1.control
index 4534f02..22af489 100644
--- a/noncore/net/opietooth/lib/libopietooth1.control
+++ b/noncore/net/opietooth/lib/libopietooth1.control
@@ -1,9 +1,9 @@
Files: $OPIEDIR/lib/libopietooth.so.1.0.0 $OPIEDIR/lib/libopietooth.so.1.0 $OPIEDIR/lib/libopietooth.so.1
Priority: optional
Section: opie/system
Maintainer: Maximilian Reiß <max.reiss@gmx.de>
Architecture: arm
Version: $QPE_VERSION-$SUB_VERSION
Replaces: libopietooth
-Depends: libqt2-emb (>=2.3.4), libopie, task-bluez
+Depends: libqt2-emb (>=2.3.4), libopie, task-bluez, bluez-rfcomm
Description: Opie bluetooth library
diff --git a/noncore/net/opietooth/lib/startpanconnection.cpp b/noncore/net/opietooth/lib/startpanconnection.cpp
index b68f02d..e7deede 100644
--- a/noncore/net/opietooth/lib/startpanconnection.cpp
+++ b/noncore/net/opietooth/lib/startpanconnection.cpp
@@ -1,67 +1,68 @@
#include "startpanconnection.h"
using namespace OpieTooth;
StartPanConnection::StartPanConnection() {
m_panConnect = 0l;
setConnectionType();
}
StartPanConnection::~StartPanConnection() {
delete m_panConnect;
}
StartPanConnection::StartPanConnection( QString mac ) {
m_panConnect = 0l;
m_mac = mac;
setConnectionType();
}
void StartPanConnection::setName( QString name ) {
m_name = name;
}
QString StartPanConnection::name() {
return m_name;
}
void StartPanConnection::setConnectionType() {
m_connectionType = Pan;
}
StartConnection::ConnectionType StartPanConnection::type() {
return m_connectionType;
}
void StartPanConnection::start() {
m_panConnect = new OProcess();
+ qDebug( "IM START " + m_mac );
*m_panConnect << "pand" << "--connect" << m_mac;
connect( m_panConnect, SIGNAL( processExited( OProcess* ) ) ,
this, SLOT( slotExited( OProcess* ) ) );
connect( m_panConnect, SIGNAL( receivedStdout( OProcess*, char*, int ) ),
this, SLOT( slotStdOut( OProcess*, char*, int ) ) );
if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) {
qWarning( "could not start" );
delete m_panConnect;
}
}
void StartPanConnection::slotExited( OProcess* proc ) {
delete m_panConnect;
}
void StartPanConnection::slotStdOut(OProcess* proc, char* chars, int len)
{}
void StartPanConnection::stop() {
if ( m_panConnect ) {
delete m_panConnect;
m_panConnect = 0l;
}
}
diff --git a/noncore/net/opietooth/manager/manager.pro b/noncore/net/opietooth/manager/manager.pro
index f813e65..6fad6ae 100644
--- a/noncore/net/opietooth/manager/manager.pro
+++ b/noncore/net/opietooth/manager/manager.pro
@@ -1,49 +1,49 @@
TEMPLATE = app
CONFIG = qt warn_on debug
#CONFIG = qt warn_on release
HEADERS = btconnectionitem.h btdeviceitem.h \
btserviceitem.h stdpopups.h \
popuphelper.h bluebase.h \
scandialog.h btlistitem.h \
hciconfwrapper.h bticonloader.h \
pppdialog.h obexdialog.h \
devicehandler.h rfcpopup.h obexpopup.h \
- rfcommhelper.h panpopup.h
+ rfcommhelper.h panpopup.h dunpopup.h
SOURCES = btconnectionitem.cpp btdeviceitem.cpp \
btserviceitem.cpp stdpopups.cpp \
popuphelper.cpp main.cpp \
bluebase.cpp scandialog.cpp \
btlistitem.cpp hciconfwrapper.cpp \
bticonloader.cpp pppdialog.cpp \
obexdialog.cpp devicehandler.cpp \
rfcpopup.cpp obexpopup.cpp \
- rfcommhelper.cpp panpopup.cpp
+ rfcommhelper.cpp panpopup.cpp dunpopup.cpp
INCLUDEPATH += $(OPIEDIR)/include
INCLUDEPATH += $(OPIEDIR)/noncore/net/opietooth/lib
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopietooth -lopie
INTERFACES = bluetoothbase.ui devicedialog.ui
DESTDIR = $(OPIEDIR)/bin
TARGET = bluetooth-manager
TRANSLATIONS = ../../../../i18n/de/bluetooth-manager.ts \
../../../../i18n/da/bluetooth-manager.ts \
../../../../i18n/xx/bluetooth-manager.ts \
../../../../i18n/en/bluetooth-manager.ts \
../../../../i18n/es/bluetooth-manager.ts \
../../../../i18n/fr/bluetooth-manager.ts \
../../../../i18n/hu/bluetooth-manager.ts \
../../../../i18n/ja/bluetooth-manager.ts \
../../../../i18n/ko/bluetooth-manager.ts \
../../../../i18n/no/bluetooth-manager.ts \
../../../../i18n/pl/bluetooth-manager.ts \
../../../../i18n/pt/bluetooth-manager.ts \
../../../../i18n/pt_BR/bluetooth-manager.ts \
../../../../i18n/sl/bluetooth-manager.ts \
../../../../i18n/zh_CN/bluetooth-manager.ts \
../../../../i18n/zh_TW/bluetooth-manager.ts
include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/net/opietooth/manager/panpopup.cpp b/noncore/net/opietooth/manager/panpopup.cpp
index 7a0ee55..695f349 100644
--- a/noncore/net/opietooth/manager/panpopup.cpp
+++ b/noncore/net/opietooth/manager/panpopup.cpp
@@ -1,63 +1,63 @@
#include <qpe/qcopenvelope_qws.h>
#include <qtimer.h>
#include "panpopup.h"
using namespace OpieTooth;
/*
* c'tor init the QAction
*/
PanPopup::PanPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() {
qWarning("PanPopup c'tor");
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() ) );
b = new QAction();
b->setText( tr( "connect+conf" ) );
b->addTo( this );
connect( b, SIGNAL( activated() ), this, SLOT( slotConnectAndConfig() ) );
c = new QAction();
c->setText( tr( "disconnect" ) );
c->addTo( this );
connect( c, SIGNAL( activated() ), this, SLOT( slotDisconnect() ) );
};
PanPopup::~PanPopup() {
}
void PanPopup::slotConnect() {
m_panconnection = new StartPanConnection( m_item->mac() );
m_panconnection->start();
}
void PanPopup::slotDisconnect() {
m_panconnection->stop();
}
void PanPopup::slotConnectAndConfig() {
slotConnect();
// more intelligence here later like passing the device ( bnepX )
QCopEnvelope e( "QPE/System", "execute(QString)" );
- e << QString( "networksetup" );
+ e << QString( "networksettings" );
}
diff --git a/noncore/net/opietooth/manager/popuphelper.cpp b/noncore/net/opietooth/manager/popuphelper.cpp
index 7da7002..ab22fea 100644
--- a/noncore/net/opietooth/manager/popuphelper.cpp
+++ b/noncore/net/opietooth/manager/popuphelper.cpp
@@ -1,35 +1,36 @@
#include "stdpopups.h"
#include "popuphelper.h"
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");
FactoryMap::Iterator it = m_map.find(id );
if ( it != m_map.end() ) {
//qWarning("found");
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 );
insert( 4374, newPanPopup );
}
diff --git a/noncore/net/opietooth/manager/stdpopups.cpp b/noncore/net/opietooth/manager/stdpopups.cpp
index 934e58b..38b8ee7 100644
--- a/noncore/net/opietooth/manager/stdpopups.cpp
+++ b/noncore/net/opietooth/manager/stdpopups.cpp
@@ -1,21 +1,26 @@
#include "rfcpopup.h"
#include "obexpopup.h"
#include "panpopup.h"
+#include "dunpopup.h"
#include "stdpopups.h"
extern "C" {
QPopupMenu* newRfcComPopup( const OpieTooth::Services& service, OpieTooth::BTDeviceItem* item ) {
return new OpieTooth::RfcCommPopup(/* servive, item*/ ); // fix spellin RfComm vs. RfcComm and paramaters
//return 0l;
}
QPopupMenu* newObexPushPopup( const OpieTooth::Services&, OpieTooth::BTDeviceItem* ) {
return new OpieTooth::ObexPopup();
}
QPopupMenu* newPanPopup( const OpieTooth::Services& service, OpieTooth::BTDeviceItem* item ) {
return new OpieTooth::PanPopup( item );
}
+
+ QPopupMenu* newDunPopup( const OpieTooth::Services& service, OpieTooth::BTDeviceItem* item ) {
+ return new OpieTooth::DunPopup( item );
+ }
}
diff --git a/noncore/net/opietooth/manager/stdpopups.h b/noncore/net/opietooth/manager/stdpopups.h
index 7f2f6b3..f52dc3a 100644
--- a/noncore/net/opietooth/manager/stdpopups.h
+++ b/noncore/net/opietooth/manager/stdpopups.h
@@ -1,19 +1,20 @@
#ifndef OPIE_TOOTH_STD_POPUPS
#define OPIE_TOOTH_STD_POPUPS
#include <qlistview.h>
#include <qpopupmenu.h>
#include <services.h>
#include "btdeviceitem.h"
extern "C" {
QPopupMenu* newRfcComPopup( const OpieTooth::Services&, OpieTooth::BTDeviceItem* );
QPopupMenu* newObexPushPopup( const OpieTooth::Services&, OpieTooth::BTDeviceItem* );
QPopupMenu* newPanPopup( const OpieTooth::Services&, OpieTooth::BTDeviceItem* );
+ QPopupMenu* newDunPopup( const OpieTooth::Services&, OpieTooth::BTDeviceItem* );
}
#endif