summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/modem
authorwimpie <wimpie>2004-08-12 12:46:55 (UTC)
committer wimpie <wimpie>2004-08-12 12:46:55 (UTC)
commit8f215ba9ceb395f262517855a99d7d2d303ca760 (patch) (unidiff)
treeaa5f9b14c249217b4d3fc30f4771bdaf1c3545d3 /noncore/settings/networksettings2/modem
parentef64880308b5035cc8ca2e4e79325db613af525b (diff)
downloadopie-8f215ba9ceb395f262517855a99d7d2d303ca760.zip
opie-8f215ba9ceb395f262517855a99d7d2d303ca760.tar.gz
opie-8f215ba9ceb395f262517855a99d7d2d303ca760.tar.bz2
MANY changes
- now generates peers/pap-chap secrets files (no chatscript yet) (not all usefull ppp options included yet) - still not ready for prime time yet
Diffstat (limited to 'noncore/settings/networksettings2/modem') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/modem/modem_NN.cpp11
-rw-r--r--noncore/settings/networksettings2/modem/modem_NN.h8
-rw-r--r--noncore/settings/networksettings2/modem/modem_NNI.cpp6
-rw-r--r--noncore/settings/networksettings2/modem/modem_NNI.h16
-rw-r--r--noncore/settings/networksettings2/modem/modemrun.h3
5 files changed, 8 insertions, 36 deletions
diff --git a/noncore/settings/networksettings2/modem/modem_NN.cpp b/noncore/settings/networksettings2/modem/modem_NN.cpp
index 18aa480..ee61b10 100644
--- a/noncore/settings/networksettings2/modem/modem_NN.cpp
+++ b/noncore/settings/networksettings2/modem/modem_NN.cpp
@@ -28,34 +28,23 @@ const QString ModemNetNode::nodeDescription(){
28ANetNodeInstance * ModemNetNode::createInstance( void ) { 28ANetNodeInstance * ModemNetNode::createInstance( void ) {
29 return new AModem( this ); 29 return new AModem( this );
30} 30}
31 31
32const char ** ModemNetNode::needs( void ) { 32const char ** ModemNetNode::needs( void ) {
33 return ModemNeeds; 33 return ModemNeeds;
34} 34}
35 35
36const char * ModemNetNode::provides( void ) { 36const char * ModemNetNode::provides( void ) {
37 return "line"; 37 return "line";
38} 38}
39 39
40bool ModemNetNode::generateProperFilesFor(
41 ANetNodeInstance * ) {
42 return 0;
43}
44
45bool ModemNetNode::generateDeviceDataForCommonFile(
46 SystemFile & ,
47 long ) {
48 return 0;
49}
50
51void ModemNetNode::setSpecificAttribute( QString & , QString & ) { 40void ModemNetNode::setSpecificAttribute( QString & , QString & ) {
52} 41}
53 42
54void ModemNetNode::saveSpecificAttribute( QTextStream & ) { 43void ModemNetNode::saveSpecificAttribute( QTextStream & ) {
55} 44}
56 45
57extern "C" { 46extern "C" {
58void create_plugin( QList<ANetNode> & PNN ) { 47void create_plugin( QList<ANetNode> & PNN ) {
59 PNN.append( new ModemNetNode() ); 48 PNN.append( new ModemNetNode() );
60} 49}
61} 50}
diff --git a/noncore/settings/networksettings2/modem/modem_NN.h b/noncore/settings/networksettings2/modem/modem_NN.h
index 2f496dd..a76525f 100644
--- a/noncore/settings/networksettings2/modem/modem_NN.h
+++ b/noncore/settings/networksettings2/modem/modem_NN.h
@@ -9,36 +9,28 @@ class ModemNetNode : public ANetNode{
9 9
10 Q_OBJECT 10 Q_OBJECT
11 11
12public: 12public:
13 13
14 ModemNetNode(); 14 ModemNetNode();
15 virtual ~ModemNetNode(); 15 virtual ~ModemNetNode();
16 16
17 virtual const QString pixmapName() 17 virtual const QString pixmapName()
18 { return "Devices/modem"; } 18 { return "Devices/modem"; }
19 19
20 virtual const QString nodeDescription() ; 20 virtual const QString nodeDescription() ;
21
22 virtual ANetNodeInstance * createInstance( void ); 21 virtual ANetNodeInstance * createInstance( void );
23
24 virtual const char ** needs( void ); 22 virtual const char ** needs( void );
25 virtual const char * provides( void ); 23 virtual const char * provides( void );
26 24
27 virtual bool generateProperFilesFor( ANetNodeInstance * NNI );
28 virtual bool hasDataFor( const QString & )
29 { return 0; }
30 virtual bool generateDeviceDataForCommonFile(
31 SystemFile & SF, long DevNr );
32
33private: 25private:
34 26
35 virtual void setSpecificAttribute( QString & Attr, QString & Value ); 27 virtual void setSpecificAttribute( QString & Attr, QString & Value );
36 virtual void saveSpecificAttribute( QTextStream & TS ); 28 virtual void saveSpecificAttribute( QTextStream & TS );
37}; 29};
38 30
39extern "C" 31extern "C"
40{ 32{
41 void create_plugin( QList<ANetNode> & PNN ); 33 void create_plugin( QList<ANetNode> & PNN );
42}; 34};
43 35
44#endif 36#endif
diff --git a/noncore/settings/networksettings2/modem/modem_NNI.cpp b/noncore/settings/networksettings2/modem/modem_NNI.cpp
index 6c76b56..91df22b 100644
--- a/noncore/settings/networksettings2/modem/modem_NNI.cpp
+++ b/noncore/settings/networksettings2/modem/modem_NNI.cpp
@@ -20,18 +20,12 @@ QWidget * AModem::edit( QWidget * parent ) {
20 return GUI; 20 return GUI;
21} 21}
22 22
23QString AModem::acceptable( void ) { 23QString AModem::acceptable( void ) {
24 return ( GUI ) ? GUI->acceptable( ) : QString(); 24 return ( GUI ) ? GUI->acceptable( ) : QString();
25} 25}
26 26
27void AModem::commit( void ) { 27void AModem::commit( void ) {
28 if( GUI && GUI->commit( Data ) ) 28 if( GUI && GUI->commit( Data ) )
29 setModified( 1 ); 29 setModified( 1 );
30} 30}
31 31
32bool AModem::generateDataForCommonFile(
33 SystemFile & ,
34 long ) {
35 return 1;
36}
37
diff --git a/noncore/settings/networksettings2/modem/modem_NNI.h b/noncore/settings/networksettings2/modem/modem_NNI.h
index a623704..ca7c279 100644
--- a/noncore/settings/networksettings2/modem/modem_NNI.h
+++ b/noncore/settings/networksettings2/modem/modem_NNI.h
@@ -5,42 +5,36 @@
5#include "modemdata.h" 5#include "modemdata.h"
6#include "modemrun.h" 6#include "modemrun.h"
7 7
8class ModemNetNode; 8class ModemNetNode;
9class ModemEdit; 9class ModemEdit;
10 10
11class AModem : public ANetNodeInstance { 11class AModem : public ANetNodeInstance {
12 12
13public : 13public :
14 14
15 AModem( ModemNetNode * PNN ); 15 AModem( ModemNetNode * PNN );
16 16
17 RuntimeInfo * runtime( void )
18 { return
19 ( RT ) ? RT : ( RT = new ModemRun( this, Data ) );
20 }
21
17 QWidget * edit( QWidget * parent ); 22 QWidget * edit( QWidget * parent );
18 QString acceptable( void ); 23 QString acceptable( void );
19 void commit( void ); 24 void commit( void );
20 25
21 RuntimeInfo * runtime( void )
22 { if( RT == 0 )
23 RT = new ModemRun( this, Data );
24 return RT;
25 }
26
27 virtual void * data( void ) 26 virtual void * data( void )
28 { return (void *)&Data; } 27 { return (void *)&Data; }
29 28
30 virtual bool hasDataFor( const QString & )
31 { return 0; }
32 virtual bool generateDataForCommonFile(
33 SystemFile & SF, long DevNr );
34
35protected : 29protected :
36 30
37 virtual void setSpecificAttribute( QString & Attr, QString & Value ); 31 virtual void setSpecificAttribute( QString & Attr, QString & Value );
38 virtual void saveSpecificAttribute( QTextStream & TS ); 32 virtual void saveSpecificAttribute( QTextStream & TS );
39 33
40private : 34private :
41 35
42 ModemEdit * GUI; 36 ModemEdit * GUI;
43 ModemData Data; 37 ModemData Data;
44 ModemRun * RT; 38 ModemRun * RT;
45 39
46}; 40};
diff --git a/noncore/settings/networksettings2/modem/modemrun.h b/noncore/settings/networksettings2/modem/modemrun.h
index 336462e..491a677 100644
--- a/noncore/settings/networksettings2/modem/modemrun.h
+++ b/noncore/settings/networksettings2/modem/modemrun.h
@@ -3,23 +3,26 @@
3 3
4class ModemRun : public AsLine { 4class ModemRun : public AsLine {
5 5
6public : 6public :
7 7
8 ModemRun( ANetNodeInstance * NNI, 8 ModemRun( ANetNodeInstance * NNI,
9 ModemData & Data ) : AsLine ( NNI ) 9 ModemData & Data ) : AsLine ( NNI )
10 { } 10 { }
11 11
12 virtual AsLine * asLine( void ) 12 virtual AsLine * asLine( void )
13 { return (AsLine *)this; } 13 { return (AsLine *)this; }
14 14
15 virtual QString deviceFile( void )
16 { return QString("/dev/modem"); }
17
15protected : 18protected :
16 19
17 void detectState( NodeCollection * ) 20 void detectState( NodeCollection * )
18 { } 21 { }
19 22
20 bool setState( NodeCollection *, Action_t, bool ) 23 bool setState( NodeCollection *, Action_t, bool )
21 { return 0; } 24 { return 0; }
22 25
23 bool canSetState( State_t, Action_t ) 26 bool canSetState( State_t, Action_t )
24 { return 0; } 27 { return 0; }
25}; 28};