Diffstat (limited to 'noncore/settings/networksettings2/ppp/ppp_NN.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/ppp/ppp_NN.cpp | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/noncore/settings/networksettings2/ppp/ppp_NN.cpp b/noncore/settings/networksettings2/ppp/ppp_NN.cpp index b7edf87..ff4465c 100644 --- a/noncore/settings/networksettings2/ppp/ppp_NN.cpp +++ b/noncore/settings/networksettings2/ppp/ppp_NN.cpp | |||
@@ -1,5 +1,9 @@ | |||
1 | #include <qfile.h> | ||
2 | #include <qtextstream.h> | ||
1 | #include "ppp_NN.h" | 3 | #include "ppp_NN.h" |
2 | #include "ppp_NNI.h" | 4 | #include "ppp_NNI.h" |
3 | 5 | ||
6 | QStringList * PPPNetNode::ProperFiles = 0; | ||
7 | |||
4 | static const char * PPPNeeds[] = | 8 | static const char * PPPNeeds[] = |
5 | { "line", | 9 | { "line", |
@@ -12,4 +16,15 @@ static const char * PPPNeeds[] = | |||
12 | */ | 16 | */ |
13 | PPPNetNode::PPPNetNode() : ANetNode(tr("PPP Connection")) { | 17 | PPPNetNode::PPPNetNode() : ANetNode(tr("PPP Connection")) { |
18 | |||
19 | // proper files : will leak | ||
20 | ProperFiles =new QStringList; | ||
21 | *ProperFiles << "peers"; | ||
22 | *ProperFiles << "chatscript"; | ||
23 | |||
24 | // system files | ||
25 | NSResources->addSystemFile( | ||
26 | "pap-secrets", "/tmp/pap-secrets", 0 ); | ||
27 | NSResources->addSystemFile( | ||
28 | "chap-secrets", "/tmp/chap-secrets", 0 ); | ||
14 | } | 29 | } |
15 | 30 | ||
@@ -40,13 +55,15 @@ const char * PPPNetNode::provides( void ) { | |||
40 | } | 55 | } |
41 | 56 | ||
42 | bool PPPNetNode::generateProperFilesFor( | 57 | QStringList * PPPNetNode::properFiles( void ) { |
43 | ANetNodeInstance * ) { | 58 | return ProperFiles; |
44 | return 0; | 59 | |
45 | } | 60 | } |
46 | 61 | ||
47 | bool PPPNetNode::generateDeviceDataForCommonFile( | 62 | // need to generate : |
48 | SystemFile & , | 63 | // /etc/ppp/pap-secrets |
49 | long ) { | 64 | // /etc/ppp/pap-secrets |
50 | return 0; | 65 | bool PPPNetNode::hasDataForFile( const QString & S ) { |
66 | return S == "pap-secrets" || | ||
67 | S == "chap-secrets" ; | ||
51 | } | 68 | } |
52 | 69 | ||