summaryrefslogtreecommitdiff
authorwimpie <wimpie>2005-01-06 17:59:54 (UTC)
committer wimpie <wimpie>2005-01-06 17:59:54 (UTC)
commit006091cfc3bb54286fd4dd74773fe5c09048077b (patch) (side-by-side diff)
tree23075790a300998a674dafe104fdc05bb6d19789
parentfab28788f055b998803df9a6e8cfe2a4f9122351 (diff)
downloadopie-006091cfc3bb54286fd4dd74773fe5c09048077b.zip
opie-006091cfc3bb54286fd4dd74773fe5c09048077b.tar.gz
opie-006091cfc3bb54286fd4dd74773fe5c09048077b.tar.bz2
Forgot networktemplate files
HCIdump seems to work -> bt sniffing is possible
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/networksettings2/system.cpp7
-rw-r--r--noncore/settings/networksettings2/opie-networksettings2.control2
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTSniffGUI.ui15
-rw-r--r--noncore/settings/networksettings2/opietooth2/Opietooth.cpp46
-rw-r--r--noncore/settings/networksettings2/opietooth2/Opietooth.h2
5 files changed, 43 insertions, 29 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/system.cpp b/noncore/settings/networksettings2/networksettings2/system.cpp
index 9512579..e642c08 100644
--- a/noncore/settings/networksettings2/networksettings2/system.cpp
+++ b/noncore/settings/networksettings2/networksettings2/system.cpp
@@ -46,2 +46,3 @@ static char Dig2Hex[] = {
System::System( void ) : QObject(), ProbedInterfaces() {
+ ProcDevNet = 0;
}
@@ -111,3 +112,3 @@ int System::runAsRoot( QStringList & S, MyProcess * Prc ) {
// error starting app
- return 1;
+ return 0;
}
@@ -117,3 +118,3 @@ int System::runAsRoot( QStringList & S, MyProcess * Prc ) {
// all is fine
- return 0;
+ return 1;
}
@@ -163,3 +164,3 @@ int System::execAsUser( QStringList & SL ) {
- return rv;
+ return ! rv;
}
diff --git a/noncore/settings/networksettings2/opie-networksettings2.control b/noncore/settings/networksettings2/opie-networksettings2.control
index e4bd29c..874833c 100644
--- a/noncore/settings/networksettings2/opie-networksettings2.control
+++ b/noncore/settings/networksettings2/opie-networksettings2.control
@@ -1,3 +1,3 @@
Package: opie-networksettings2
-Files: bin/networksettings2 apps/Settings/networksettings2.desktop pics/networksettings2/*.png lib/libnetworksettings2.so* pics/networksettings2/Devices/*.png
+Files: bin/networksettings2 apps/Settings/networksettings2.desktop pics/networksettings2/*.png lib/libnetworksettings2.so* pics/networksettings2/Devices/*.png etc/NS2templates/* etc/NS2templates/*/*
Priority: optional
diff --git a/noncore/settings/networksettings2/opietooth2/OTSniffGUI.ui b/noncore/settings/networksettings2/opietooth2/OTSniffGUI.ui
index 9ef540e..ec0b387 100644
--- a/noncore/settings/networksettings2/opietooth2/OTSniffGUI.ui
+++ b/noncore/settings/networksettings2/opietooth2/OTSniffGUI.ui
@@ -14,3 +14,3 @@
<width>274</width>
- <height>160</height>
+ <height>173</height>
</rect>
@@ -24,2 +24,5 @@
</property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
<vbox>
@@ -31,3 +34,3 @@
<name>spacing</name>
- <number>6</number>
+ <number>2</number>
</property>
@@ -126,10 +129,6 @@
<widget>
- <class>QListBox</class>
+ <class>QTextView</class>
<property stdset="1">
<name>name</name>
- <cstring>Output_LB</cstring>
- </property>
- <property stdset="1">
- <name>selectionMode</name>
- <enum>NoSelection</enum>
+ <cstring>Output_TV</cstring>
</property>
diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
index 5a890da..b14cc2f 100644
--- a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
+++ b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
@@ -23,3 +23,5 @@ using namespace Opie::Ui;
#include <qpushbutton.h>
+#include <qscrollbar.h>
#include <qtextstream.h>
+#include <qtextview.h>
@@ -122,3 +124,2 @@ OTSniffing::OTSniffing( QWidget * parent ) : OTSniffGUI( parent ) {
HciDump = 0;
- Sys = new System();
}
@@ -126,11 +127,16 @@ OTSniffing::OTSniffing( QWidget * parent ) : OTSniffGUI( parent ) {
OTSniffing::~OTSniffing() {
- printf( "CLOSE \n" );
- if ( HciDump ) {
- HciDump->process().kill();
- delete HciDump;
- }
- delete Sys;
+ SLOT_Trace( 0 );
}
-void OTSniffing::SLOT_Trace( bool ) {
+void OTSniffing::SLOT_Trace( bool Run ) {
+
+ if( ! Run ) {
+ if ( HciDump ) {
+ HciDump->process().kill();
+ delete HciDump;
+ }
+ HciDump = 0;
+ return;
+ }
+
HciDump = new MyProcess();
@@ -138,3 +144,3 @@ void OTSniffing::SLOT_Trace( bool ) {
- SL << "hcidump";
+ SL << "/usr/sbin/hcidump";
switch( DataFormat_CB->currentItem() ) {
@@ -164,3 +170,7 @@ void OTSniffing::SLOT_Trace( bool ) {
- if( ! Sys->runAsRoot( SL, HciDump ) ) {
+ HciDump->process() << SL;
+
+ if( ! HciDump->process().start( OProcess::DontCare,
+ OProcess::AllOutput )
+ ) {
QMessageBox::warning(0,
@@ -177,5 +187,9 @@ void OTSniffing::SLOT_Show( const QString & S ) {
printf( "%s\n", S.latin1() );
- Output_LB->insertItem( S );
- Output_LB->setCurrentItem( Output_LB->count()-1 );
- Output_LB->ensureCurrentVisible();
+ Output_TV->setText( Output_TV->text() + S + "\n" );
+
+ QScrollBar *scroll = Output_TV->verticalScrollBar();
+ scroll->setValue(scroll->maxValue());
+ //Output_LB->insertItem( S );
+ //Output_LB->setCurrentItem( Output_LB->count()-1 );
+ //Output_LB->ensureCurrentVisible();
}
@@ -230,3 +244,4 @@ void OTSniffing::SLOT_Load( void ) {
S = TS.read();
- Output_LB->insertStringList( QStringList::split( "\n", S ) );
+ // Output_LB->insertStringList( QStringList::split( "\n", S ) );
+ Output_TV->setText( S );
}
@@ -235,3 +250,4 @@ void OTSniffing::SLOT_Load( void ) {
void OTSniffing::SLOT_ClearLog( void ) {
- Output_LB->clear();
+ // Output_LB->clear();
+ Output_TV->setText( "" );
}
diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.h b/noncore/settings/networksettings2/opietooth2/Opietooth.h
index 2b20975..e66787f 100644
--- a/noncore/settings/networksettings2/opietooth2/Opietooth.h
+++ b/noncore/settings/networksettings2/opietooth2/Opietooth.h
@@ -6,3 +6,2 @@
class MyProcess;
-class System;
@@ -53,3 +52,2 @@ private :
MyProcess * HciDump;
- System * Sys;
};