summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/gprs/GPRS_NN.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/gprs/GPRS_NN.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/gprs/GPRS_NN.cpp80
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
7static const char * GPRSNeeds[] =
8 { "GPRS",
9 0
10 };
11
12static const char * GPRSProvides[] =
13 { "connection",
14 0
15 };
16
17/**
18 * Constructor, find all of the possible interfaces
19 */
20GPRSNetNode::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 */
28GPRSNetNode::~GPRSNetNode(){
29}
30
31const QString GPRSNetNode::nodeDescription(){
32 return tr("\
33<p>provides access to a GPRS capable device.</p>\
34"
35);
36}
37
38ANetNodeInstance * GPRSNetNode::createInstance( void ) {
39 return new AGPRSDevice( this );
40}
41
42bool GPRSNetNode::hasDataForFile( SystemFile & S ) {
43 return S.name() == "pap-secrets";
44}
45
46short GPRSNetNode::generateFile( SystemFile & ,
47 ANetNodeInstance * ,
48 long ) {
49
50 return 0;
51}
52
53const char ** GPRSNetNode::needs( void ) {
54 return GPRSNeeds;
55}
56
57const char ** GPRSNetNode::provides( void ) {
58 return GPRSProvides;
59}
60
61void GPRSNetNode::setSpecificAttribute( QString & , QString & ) {
62}
63
64void GPRSNetNode::saveSpecificAttribute( QTextStream & ) {
65}
66
67QStringList GPRSNetNode::properFiles( void ) {
68 QStringList SL;
69
70 SL << "peers";
71 SL << "chatscripts";
72 SL << "extra";
73 return SL;
74}
75
76extern "C" {
77void create_plugin( QList<ANetNode> & PNN ) {
78 PNN.append( new GPRSNetNode() );
79}
80}