summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/ppp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/ppp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/ppp/ppp_NN.cpp17
-rw-r--r--noncore/settings/networksettings2/ppp/ppp_NN.h9
-rw-r--r--noncore/settings/networksettings2/ppp/ppp_NNI.cpp6
-rw-r--r--noncore/settings/networksettings2/ppp/ppp_NNI.h5
-rw-r--r--noncore/settings/networksettings2/ppp/ppprun.h2
5 files changed, 21 insertions, 18 deletions
diff --git a/noncore/settings/networksettings2/ppp/ppp_NN.cpp b/noncore/settings/networksettings2/ppp/ppp_NN.cpp
index 51d17ec..b3f70c5 100644
--- a/noncore/settings/networksettings2/ppp/ppp_NN.cpp
+++ b/noncore/settings/networksettings2/ppp/ppp_NN.cpp
@@ -35,35 +35,28 @@ const char ** PPPNetNode::needs( void ) {
35 return PPPNeeds; 35 return PPPNeeds;
36} 36}
37 37
38const char * PPPNetNode::provides( void ) { 38const char * PPPNetNode::provides( void ) {
39 return "connection"; 39 return "connection";
40} 40}
41 41
42bool PPPNetNode::generateProperFilesFor( 42bool PPPNetNode::generateProperFilesFor(
43 ANetNodeInstance * ) { 43 ANetNodeInstance * ) {
44 return 1; 44 return 1;
45} 45}
46 46
47bool PPPNetNode::hasDataFor( const QString &, bool ) { 47bool PPPNetNode::generateDeviceDataForCommonFile(
48 return 0;
49}
50
51bool PPPNetNode::generateDataForCommonFile(
52 SystemFile & , 48 SystemFile & ,
53 long, 49 long ) {
54 ANetNodeInstance * ) {
55 return 1; 50 return 1;
56} 51}
57 52
58bool PPPNetNode::generateDeviceDataForCommonFile( 53QString PPPNetNode::genNic( long NicNr ) {
59 SystemFile & , 54 QString S;
60 long , 55 return S.sprintf( "ppp%ld", NicNr );
61 ANetNodeInstance * ) {
62 return 1;
63} 56}
64 57
65extern "C" { 58extern "C" {
66void create_plugin( QList<ANetNode> & PNN ) { 59void create_plugin( QList<ANetNode> & PNN ) {
67 PNN.append( new PPPNetNode() ); 60 PNN.append( new PPPNetNode() );
68} 61}
69} 62}
diff --git a/noncore/settings/networksettings2/ppp/ppp_NN.h b/noncore/settings/networksettings2/ppp/ppp_NN.h
index 8d56e7f..c33f281 100644
--- a/noncore/settings/networksettings2/ppp/ppp_NN.h
+++ b/noncore/settings/networksettings2/ppp/ppp_NN.h
@@ -19,28 +19,29 @@ public:
19 19
20 virtual const QString nodeName() 20 virtual const QString nodeName()
21 { return tr("PPP Connection"); } 21 { return tr("PPP Connection"); }
22 22
23 virtual const QString nodeDescription() ; 23 virtual const QString nodeDescription() ;
24 24
25 virtual ANetNodeInstance * createInstance( void ); 25 virtual ANetNodeInstance * createInstance( void );
26 26
27 virtual const char ** needs( void ); 27 virtual const char ** needs( void );
28 virtual const char * provides( void ); 28 virtual const char * provides( void );
29 29
30 virtual bool generateProperFilesFor( ANetNodeInstance * NNI ); 30 virtual bool generateProperFilesFor( ANetNodeInstance * NNI );
31 virtual bool hasDataFor( const QString & S, bool DS ); 31 virtual bool hasDataFor( const QString & )
32 virtual bool generateDataForCommonFile( 32 { return 0; }
33 SystemFile & SF, long DevNr, ANetNodeInstance * NNI );
34 virtual bool generateDeviceDataForCommonFile( 33 virtual bool generateDeviceDataForCommonFile(
35 SystemFile & SF, long DevNr, ANetNodeInstance * NNI ); 34 SystemFile & SF, long DevNr );
35
36 virtual QString genNic( long NicNr );
36 37
37private: 38private:
38 39
39}; 40};
40 41
41extern "C" 42extern "C"
42{ 43{
43 void create_plugin( QList<ANetNode> & PNN ); 44 void create_plugin( QList<ANetNode> & PNN );
44}; 45};
45 46
46#endif 47#endif
diff --git a/noncore/settings/networksettings2/ppp/ppp_NNI.cpp b/noncore/settings/networksettings2/ppp/ppp_NNI.cpp
index d09ecf9..d0fd31c 100644
--- a/noncore/settings/networksettings2/ppp/ppp_NNI.cpp
+++ b/noncore/settings/networksettings2/ppp/ppp_NNI.cpp
@@ -104,12 +104,18 @@ QWidget * APPP::edit( QWidget * parent ) {
104} 104}
105 105
106QString APPP::acceptable( void ) { 106QString APPP::acceptable( void ) {
107 return ( GUI ) ? GUI->acceptable( ) : QString(); 107 return ( GUI ) ? GUI->acceptable( ) : QString();
108} 108}
109 109
110void APPP::commit( void ) { 110void APPP::commit( void ) {
111 if( GUI && GUI->commit( Data ) ) { 111 if( GUI && GUI->commit( Data ) ) {
112 setModified( 1 ); 112 setModified( 1 );
113 } 113 }
114} 114}
115 115
116bool APPP::generateDataForCommonFile(
117 SystemFile & ,
118 long) {
119 return 1;
120}
121
diff --git a/noncore/settings/networksettings2/ppp/ppp_NNI.h b/noncore/settings/networksettings2/ppp/ppp_NNI.h
index a17721a..989c2f0 100644
--- a/noncore/settings/networksettings2/ppp/ppp_NNI.h
+++ b/noncore/settings/networksettings2/ppp/ppp_NNI.h
@@ -18,24 +18,29 @@ public :
18 QString acceptable( void ); 18 QString acceptable( void );
19 void commit( void ); 19 void commit( void );
20 20
21 RuntimeInfo * runtime( void ) 21 RuntimeInfo * runtime( void )
22 { if( RT == 0 ) 22 { if( RT == 0 )
23 RT = new PPPRun( this, Data ); 23 RT = new PPPRun( this, Data );
24 return RT->runtimeInfo(); 24 return RT->runtimeInfo();
25 } 25 }
26 26
27 virtual void * data( void ) 27 virtual void * data( void )
28 { return (void *)&Data; } 28 { return (void *)&Data; }
29 29
30 virtual bool hasDataFor( const QString & )
31 { return 0; }
32
33 virtual bool generateDataForCommonFile(
34 SystemFile & SF, long DevNr );
30protected : 35protected :
31 36
32 virtual void setSpecificAttribute( QString & Attr, QString & Value ); 37 virtual void setSpecificAttribute( QString & Attr, QString & Value );
33 virtual void saveSpecificAttribute( QTextStream & TS ); 38 virtual void saveSpecificAttribute( QTextStream & TS );
34 39
35private : 40private :
36 41
37 PPPEdit * GUI; 42 PPPEdit * GUI;
38 PPPData Data; 43 PPPData Data;
39 PPPRun * RT; 44 PPPRun * RT;
40 45
41}; 46};
diff --git a/noncore/settings/networksettings2/ppp/ppprun.h b/noncore/settings/networksettings2/ppp/ppprun.h
index 765aff2..af51fbe 100644
--- a/noncore/settings/networksettings2/ppp/ppprun.h
+++ b/noncore/settings/networksettings2/ppp/ppprun.h
@@ -3,26 +3,24 @@
3 3
4#include <qregexp.h> 4#include <qregexp.h>
5#include <asconnection.h> 5#include <asconnection.h>
6#include <asdevice.h> 6#include <asdevice.h>
7#include "pppdata.h" 7#include "pppdata.h"
8 8
9class PPPRun : public AsConnection, public AsDevice { 9class PPPRun : public AsConnection, public AsDevice {
10 10
11public : 11public :
12 12
13 PPPRun( ANetNodeInstance * NNI, 13 PPPRun( ANetNodeInstance * NNI,
14 PPPData & Data ); 14 PPPData & Data );
15 virtual QString genNic( long NicNr )
16 { QString S; return S.sprintf( "ppp%ld", NicNr ); }
17 15
18 virtual AsDevice * asDevice( void ) 16 virtual AsDevice * asDevice( void )
19 { return (AsDevice *)this; } 17 { return (AsDevice *)this; }
20 virtual AsConnection * asConnection( void ) 18 virtual AsConnection * asConnection( void )
21 { return (AsConnection *)this; } 19 { return (AsConnection *)this; }
22 20
23 virtual AsDevice * device( void ) 21 virtual AsDevice * device( void )
24 { return (AsDevice *)this; } 22 { return (AsDevice *)this; }
25 23
26 virtual RuntimeInfo * runtimeInfo( void ) 24 virtual RuntimeInfo * runtimeInfo( void )
27 { return ( AsConnection *)this; } 25 { return ( AsConnection *)this; }
28 26