summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/ppp/ppp_NN.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/ppp/ppp_NN.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/ppp/ppp_NN.cpp31
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,6 +1,10 @@
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
6QStringList * PPPNetNode::ProperFiles = 0;
7
4static const char * PPPNeeds[] = 8static const char * PPPNeeds[] =
5 { "line", 9 { "line",
6 "modem", 10 "modem",
@@ -11,6 +15,17 @@ static const char * PPPNeeds[] =
11 * Constructor, find all of the possible interfaces 15 * Constructor, find all of the possible interfaces
12 */ 16 */
13PPPNetNode::PPPNetNode() : ANetNode(tr("PPP Connection")) { 17PPPNetNode::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
16/** 31/**
@@ -39,15 +54,17 @@ const char * PPPNetNode::provides( void ) {
39 return "connection"; 54 return "connection";
40} 55}
41 56
42bool PPPNetNode::generateProperFilesFor( 57QStringList * PPPNetNode::properFiles( void ) {
43 ANetNodeInstance * ) { 58 return ProperFiles;
44 return 0; 59
45} 60}
46 61
47bool PPPNetNode::generateDeviceDataForCommonFile( 62// need to generate :
48 SystemFile & , 63// /etc/ppp/pap-secrets
49 long ) { 64// /etc/ppp/pap-secrets
50 return 0; 65bool PPPNetNode::hasDataForFile( const QString & S ) {
66 return S == "pap-secrets" ||
67 S == "chap-secrets" ;
51} 68}
52 69
53QString PPPNetNode::genNic( long NicNr ) { 70QString PPPNetNode::genNic( long NicNr ) {