summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/gprs/GPRS_NN.cpp
blob: e9553a68a89921253ebf73c41aceea93f3df1a82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#include <resources.h>
#include <qpe/qpeapplication.h>
#include <netnode.h>
#include "GPRS_NN.h"
#include "GPRS_NNI.h"

#include "netnodeinterface.h"

static const char * GPRSNeeds[] = 
    { "GPRS",
      0
    };

static const char * GPRSProvides[] = 
    { "connection", 
      0
    };

/**
 * Constructor, find all of the possible interfaces
 */
GPRSNetNode::GPRSNetNode() : ANetNode(tr("GPRS capable device")) {
      NSResources->addSystemFile( 
        "pap-secrets", "/etc/ppp/pap-secrets", 0 );
}

/**
 * Delete any interfaces that we own.
 */
GPRSNetNode::~GPRSNetNode(){
}

const QString GPRSNetNode::nodeDescription(){
      return tr("\
<p>provides access to a GPRS capable device.</p>\
"
);
}

ANetNodeInstance * GPRSNetNode::createInstance( void ) {
      return new AGPRSDevice( this );
}

bool GPRSNetNode::hasDataForFile( SystemFile & S ) {
      return S.name() == "pap-secrets";
}

short GPRSNetNode::generateFile( SystemFile & , 
                                 ANetNodeInstance * ,
                                 long ) {
                                   
      return 0;
}

const char ** GPRSNetNode::needs( void ) {
      return GPRSNeeds;
}

const char ** GPRSNetNode::provides( void ) {
      return GPRSProvides;
}

void GPRSNetNode::setSpecificAttribute( QString & , QString & ) {
}

void GPRSNetNode::saveSpecificAttribute( QTextStream & ) {
}

QStringList GPRSNetNode::properFiles( void ) {
      QStringList SL;

      SL << "peers";
      SL << "chatscripts";
      SL << "extra";
      return SL;
}

OPIE_NS2_PLUGIN(  NetNodeInterface_T<GPRSNetNode> )