author | wimpie <wimpie> | 2005-01-06 17:59:54 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-06 17:59:54 (UTC) |
commit | 006091cfc3bb54286fd4dd74773fe5c09048077b (patch) (unidiff) | |
tree | 23075790a300998a674dafe104fdc05bb6d19789 | |
parent | fab28788f055b998803df9a6e8cfe2a4f9122351 (diff) | |
download | opie-006091cfc3bb54286fd4dd74773fe5c09048077b.zip opie-006091cfc3bb54286fd4dd74773fe5c09048077b.tar.gz opie-006091cfc3bb54286fd4dd74773fe5c09048077b.tar.bz2 |
Forgot networktemplate files
HCIdump seems to work -> bt sniffing is possible
5 files changed, 39 insertions, 25 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[] = { | |||
46 | System::System( void ) : QObject(), ProbedInterfaces() { | 46 | System::System( void ) : QObject(), ProbedInterfaces() { |
47 | ProcDevNet = 0; | ||
47 | } | 48 | } |
@@ -111,3 +112,3 @@ int System::runAsRoot( QStringList & S, MyProcess * Prc ) { | |||
111 | // error starting app | 112 | // error starting app |
112 | return 1; | 113 | return 0; |
113 | } | 114 | } |
@@ -117,3 +118,3 @@ int System::runAsRoot( QStringList & S, MyProcess * Prc ) { | |||
117 | // all is fine | 118 | // all is fine |
118 | return 0; | 119 | return 1; |
119 | } | 120 | } |
@@ -163,3 +164,3 @@ int System::execAsUser( QStringList & SL ) { | |||
163 | 164 | ||
164 | return rv; | 165 | return ! rv; |
165 | } | 166 | } |
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 @@ | |||
1 | Package: opie-networksettings2 | 1 | Package: opie-networksettings2 |
2 | Files: bin/networksettings2 apps/Settings/networksettings2.desktop pics/networksettings2/*.png lib/libnetworksettings2.so* pics/networksettings2/Devices/*.png | 2 | Files: bin/networksettings2 apps/Settings/networksettings2.desktop pics/networksettings2/*.png lib/libnetworksettings2.so* pics/networksettings2/Devices/*.png etc/NS2templates/* etc/NS2templates/*/* |
3 | Priority: optional | 3 | 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 @@ | |||
14 | <width>274</width> | 14 | <width>274</width> |
15 | <height>160</height> | 15 | <height>173</height> |
16 | </rect> | 16 | </rect> |
@@ -24,2 +24,5 @@ | |||
24 | </property> | 24 | </property> |
25 | <property> | ||
26 | <name>layoutSpacing</name> | ||
27 | </property> | ||
25 | <vbox> | 28 | <vbox> |
@@ -31,3 +34,3 @@ | |||
31 | <name>spacing</name> | 34 | <name>spacing</name> |
32 | <number>6</number> | 35 | <number>2</number> |
33 | </property> | 36 | </property> |
@@ -126,10 +129,6 @@ | |||
126 | <widget> | 129 | <widget> |
127 | <class>QListBox</class> | 130 | <class>QTextView</class> |
128 | <property stdset="1"> | 131 | <property stdset="1"> |
129 | <name>name</name> | 132 | <name>name</name> |
130 | <cstring>Output_LB</cstring> | 133 | <cstring>Output_TV</cstring> |
131 | </property> | ||
132 | <property stdset="1"> | ||
133 | <name>selectionMode</name> | ||
134 | <enum>NoSelection</enum> | ||
135 | </property> | 134 | </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; | |||
23 | #include <qpushbutton.h> | 23 | #include <qpushbutton.h> |
24 | #include <qscrollbar.h> | ||
24 | #include <qtextstream.h> | 25 | #include <qtextstream.h> |
26 | #include <qtextview.h> | ||
25 | 27 | ||
@@ -122,3 +124,2 @@ OTSniffing::OTSniffing( QWidget * parent ) : OTSniffGUI( parent ) { | |||
122 | HciDump = 0; | 124 | HciDump = 0; |
123 | Sys = new System(); | ||
124 | } | 125 | } |
@@ -126,3 +127,8 @@ OTSniffing::OTSniffing( QWidget * parent ) : OTSniffGUI( parent ) { | |||
126 | OTSniffing::~OTSniffing() { | 127 | OTSniffing::~OTSniffing() { |
127 | printf( "CLOSE \n" ); | 128 | SLOT_Trace( 0 ); |
129 | } | ||
130 | |||
131 | void OTSniffing::SLOT_Trace( bool Run ) { | ||
132 | |||
133 | if( ! Run ) { | ||
128 | if ( HciDump ) { | 134 | if ( HciDump ) { |
@@ -131,6 +137,6 @@ OTSniffing::~OTSniffing() { | |||
131 | } | 137 | } |
132 | delete Sys; | 138 | HciDump = 0; |
139 | return; | ||
133 | } | 140 | } |
134 | 141 | ||
135 | void OTSniffing::SLOT_Trace( bool ) { | ||
136 | HciDump = new MyProcess(); | 142 | HciDump = new MyProcess(); |
@@ -138,3 +144,3 @@ void OTSniffing::SLOT_Trace( bool ) { | |||
138 | 144 | ||
139 | SL << "hcidump"; | 145 | SL << "/usr/sbin/hcidump"; |
140 | switch( DataFormat_CB->currentItem() ) { | 146 | switch( DataFormat_CB->currentItem() ) { |
@@ -164,3 +170,7 @@ void OTSniffing::SLOT_Trace( bool ) { | |||
164 | 170 | ||
165 | if( ! Sys->runAsRoot( SL, HciDump ) ) { | 171 | HciDump->process() << SL; |
172 | |||
173 | if( ! HciDump->process().start( OProcess::DontCare, | ||
174 | OProcess::AllOutput ) | ||
175 | ) { | ||
166 | QMessageBox::warning(0, | 176 | QMessageBox::warning(0, |
@@ -177,5 +187,9 @@ void OTSniffing::SLOT_Show( const QString & S ) { | |||
177 | printf( "%s\n", S.latin1() ); | 187 | printf( "%s\n", S.latin1() ); |
178 | Output_LB->insertItem( S ); | 188 | Output_TV->setText( Output_TV->text() + S + "\n" ); |
179 | Output_LB->setCurrentItem( Output_LB->count()-1 ); | 189 | |
180 | Output_LB->ensureCurrentVisible(); | 190 | QScrollBar *scroll = Output_TV->verticalScrollBar(); |
191 | scroll->setValue(scroll->maxValue()); | ||
192 | //Output_LB->insertItem( S ); | ||
193 | //Output_LB->setCurrentItem( Output_LB->count()-1 ); | ||
194 | //Output_LB->ensureCurrentVisible(); | ||
181 | } | 195 | } |
@@ -230,3 +244,4 @@ void OTSniffing::SLOT_Load( void ) { | |||
230 | S = TS.read(); | 244 | S = TS.read(); |
231 | Output_LB->insertStringList( QStringList::split( "\n", S ) ); | 245 | // Output_LB->insertStringList( QStringList::split( "\n", S ) ); |
246 | Output_TV->setText( S ); | ||
232 | } | 247 | } |
@@ -235,3 +250,4 @@ void OTSniffing::SLOT_Load( void ) { | |||
235 | void OTSniffing::SLOT_ClearLog( void ) { | 250 | void OTSniffing::SLOT_ClearLog( void ) { |
236 | Output_LB->clear(); | 251 | // Output_LB->clear(); |
252 | Output_TV->setText( "" ); | ||
237 | } | 253 | } |
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 @@ | |||
6 | class MyProcess; | 6 | class MyProcess; |
7 | class System; | ||
8 | 7 | ||
@@ -53,3 +52,2 @@ private : | |||
53 | MyProcess * HciDump; | 52 | MyProcess * HciDump; |
54 | System * Sys; | ||
55 | }; | 53 | }; |