author | wimpie <wimpie> | 2005-01-04 01:39:32 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-04 01:39:32 (UTC) |
commit | 2a7afda8b7daf4a43e370dba09e43e7f5058ab49 (patch) (unidiff) | |
tree | 1905b1afdf7a1364149c4d325c778a4dd4c629c1 /noncore/settings/networksettings2/gprs/GPRS_NN.cpp | |
parent | f1a6369e3df58019891707a3964b20836e104d67 (diff) | |
download | opie-2a7afda8b7daf4a43e370dba09e43e7f5058ab49.zip opie-2a7afda8b7daf4a43e370dba09e43e7f5058ab49.tar.gz opie-2a7afda8b7daf4a43e370dba09e43e7f5058ab49.tar.bz2 |
More NS2 files
Diffstat (limited to 'noncore/settings/networksettings2/gprs/GPRS_NN.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/gprs/GPRS_NN.cpp | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/gprs/GPRS_NN.cpp b/noncore/settings/networksettings2/gprs/GPRS_NN.cpp new file mode 100644 index 0000000..5393324 --- a/dev/null +++ b/noncore/settings/networksettings2/gprs/GPRS_NN.cpp | |||
@@ -0,0 +1,80 @@ | |||
1 | #include <resources.h> | ||
2 | #include <qpe/qpeapplication.h> | ||
3 | #include <netnode.h> | ||
4 | #include "GPRS_NN.h" | ||
5 | #include "GPRS_NNI.h" | ||
6 | |||
7 | static const char * GPRSNeeds[] = | ||
8 | { "GPRS", | ||
9 | 0 | ||
10 | }; | ||
11 | |||
12 | static const char * GPRSProvides[] = | ||
13 | { "connection", | ||
14 | 0 | ||
15 | }; | ||
16 | |||
17 | /** | ||
18 | * Constructor, find all of the possible interfaces | ||
19 | */ | ||
20 | GPRSNetNode::GPRSNetNode() : ANetNode(tr("GPRS capable device")) { | ||
21 | NSResources->addSystemFile( | ||
22 | "pap-secrets", "/etc/ppp/pap-secrets", 0 ); | ||
23 | } | ||
24 | |||
25 | /** | ||
26 | * Delete any interfaces that we own. | ||
27 | */ | ||
28 | GPRSNetNode::~GPRSNetNode(){ | ||
29 | } | ||
30 | |||
31 | const QString GPRSNetNode::nodeDescription(){ | ||
32 | return tr("\ | ||
33 | <p>provides access to a GPRS capable device.</p>\ | ||
34 | " | ||
35 | ); | ||
36 | } | ||
37 | |||
38 | ANetNodeInstance * GPRSNetNode::createInstance( void ) { | ||
39 | return new AGPRSDevice( this ); | ||
40 | } | ||
41 | |||
42 | bool GPRSNetNode::hasDataForFile( SystemFile & S ) { | ||
43 | return S.name() == "pap-secrets"; | ||
44 | } | ||
45 | |||
46 | short GPRSNetNode::generateFile( SystemFile & , | ||
47 | ANetNodeInstance * , | ||
48 | long ) { | ||
49 | |||
50 | return 0; | ||
51 | } | ||
52 | |||
53 | const char ** GPRSNetNode::needs( void ) { | ||
54 | return GPRSNeeds; | ||
55 | } | ||
56 | |||
57 | const char ** GPRSNetNode::provides( void ) { | ||
58 | return GPRSProvides; | ||
59 | } | ||
60 | |||
61 | void GPRSNetNode::setSpecificAttribute( QString & , QString & ) { | ||
62 | } | ||
63 | |||
64 | void GPRSNetNode::saveSpecificAttribute( QTextStream & ) { | ||
65 | } | ||
66 | |||
67 | QStringList GPRSNetNode::properFiles( void ) { | ||
68 | QStringList SL; | ||
69 | |||
70 | SL << "peers"; | ||
71 | SL << "chatscripts"; | ||
72 | SL << "extra"; | ||
73 | return SL; | ||
74 | } | ||
75 | |||
76 | extern "C" { | ||
77 | void create_plugin( QList<ANetNode> & PNN ) { | ||
78 | PNN.append( new GPRSNetNode() ); | ||
79 | } | ||
80 | } | ||