Diffstat (limited to 'noncore/settings/networksettings2/modem') (more/less context) (ignore whitespace changes)
7 files changed, 27 insertions, 24 deletions
diff --git a/noncore/settings/networksettings2/modem/modem_NN.cpp b/noncore/settings/networksettings2/modem/modem_NN.cpp index ee61b10..06f417c 100644 --- a/noncore/settings/networksettings2/modem/modem_NN.cpp +++ b/noncore/settings/networksettings2/modem/modem_NN.cpp | |||
@@ -1,50 +1,55 @@ | |||
1 | #include "modem_NN.h" | 1 | #include "modem_NN.h" |
2 | #include "modem_NNI.h" | 2 | #include "modem_NNI.h" |
3 | 3 | ||
4 | static const char * ModemNeeds[] = | 4 | static const char * ModemNeeds[] = |
5 | { "line" | 5 | { "line", |
6 | 0 | ||
7 | }; | ||
8 | static const char * ModemProvides[] = | ||
9 | { "modem", | ||
10 | 0 | ||
6 | }; | 11 | }; |
7 | 12 | ||
8 | /** | 13 | /** |
9 | * Constructor, find all of the possible interfaces | 14 | * Constructor, find all of the possible interfaces |
10 | */ | 15 | */ |
11 | ModemNetNode::ModemNetNode() : ANetNode(tr("Dialup modem")) { | 16 | ModemNetNode::ModemNetNode() : ANetNode(tr("Dialup modem")) { |
12 | } | 17 | } |
13 | 18 | ||
14 | /** | 19 | /** |
15 | * Delete any interfaces that we own. | 20 | * Delete any interfaces that we own. |
16 | */ | 21 | */ |
17 | ModemNetNode::~ModemNetNode(){ | 22 | ModemNetNode::~ModemNetNode(){ |
18 | } | 23 | } |
19 | 24 | ||
20 | const QString ModemNetNode::nodeDescription(){ | 25 | const QString ModemNetNode::nodeDescription(){ |
21 | return tr("\ | 26 | return tr("\ |
22 | <p>Sets up a dialing procedures.</p>\ | 27 | <p>Sets up a dialing procedures.</p>\ |
23 | <p>Use this to dial up over modems, ISDN, GSM, ...</p>\ | 28 | <p>Use this to dial up over modems, ISDN, GSM, ...</p>\ |
24 | " | 29 | " |
25 | ); | 30 | ); |
26 | } | 31 | } |
27 | 32 | ||
28 | ANetNodeInstance * ModemNetNode::createInstance( void ) { | 33 | ANetNodeInstance * ModemNetNode::createInstance( void ) { |
29 | return new AModem( this ); | 34 | return new AModem( this ); |
30 | } | 35 | } |
31 | 36 | ||
32 | const char ** ModemNetNode::needs( void ) { | 37 | const char ** ModemNetNode::needs( void ) { |
33 | return ModemNeeds; | 38 | return ModemNeeds; |
34 | } | 39 | } |
35 | 40 | ||
36 | const char * ModemNetNode::provides( void ) { | 41 | const char ** ModemNetNode::provides( void ) { |
37 | return "line"; | 42 | return ModemProvides; |
38 | } | 43 | } |
39 | 44 | ||
40 | void ModemNetNode::setSpecificAttribute( QString & , QString & ) { | 45 | void ModemNetNode::setSpecificAttribute( QString & , QString & ) { |
41 | } | 46 | } |
42 | 47 | ||
43 | void ModemNetNode::saveSpecificAttribute( QTextStream & ) { | 48 | void ModemNetNode::saveSpecificAttribute( QTextStream & ) { |
44 | } | 49 | } |
45 | 50 | ||
46 | extern "C" { | 51 | extern "C" { |
47 | void create_plugin( QList<ANetNode> & PNN ) { | 52 | void create_plugin( QList<ANetNode> & PNN ) { |
48 | PNN.append( new ModemNetNode() ); | 53 | PNN.append( new ModemNetNode() ); |
49 | } | 54 | } |
50 | } | 55 | } |
diff --git a/noncore/settings/networksettings2/modem/modem_NN.h b/noncore/settings/networksettings2/modem/modem_NN.h index a76525f..5b3b573 100644 --- a/noncore/settings/networksettings2/modem/modem_NN.h +++ b/noncore/settings/networksettings2/modem/modem_NN.h | |||
@@ -1,36 +1,36 @@ | |||
1 | #ifndef MODEM_NETNODE_H | 1 | #ifndef MODEM_NETNODE_H |
2 | #define MODEM_NETNODE_H | 2 | #define MODEM_NETNODE_H |
3 | 3 | ||
4 | #include "netnode.h" | 4 | #include "netnode.h" |
5 | 5 | ||
6 | class AModem; | 6 | class AModem; |
7 | 7 | ||
8 | class ModemNetNode : public ANetNode{ | 8 | class ModemNetNode : public ANetNode{ |
9 | 9 | ||
10 | Q_OBJECT | 10 | Q_OBJECT |
11 | 11 | ||
12 | public: | 12 | public: |
13 | 13 | ||
14 | ModemNetNode(); | 14 | ModemNetNode(); |
15 | virtual ~ModemNetNode(); | 15 | virtual ~ModemNetNode(); |
16 | 16 | ||
17 | virtual const QString pixmapName() | 17 | virtual const QString pixmapName() |
18 | { return "Devices/modem"; } | 18 | { return "Devices/modem"; } |
19 | 19 | ||
20 | virtual const QString nodeDescription() ; | 20 | virtual const QString nodeDescription() ; |
21 | virtual ANetNodeInstance * createInstance( void ); | 21 | virtual ANetNodeInstance * createInstance( void ); |
22 | virtual const char ** needs( void ); | 22 | virtual const char ** needs( void ); |
23 | virtual const char * provides( void ); | 23 | virtual const char ** provides( void ); |
24 | 24 | ||
25 | private: | 25 | private: |
26 | 26 | ||
27 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); | 27 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); |
28 | virtual void saveSpecificAttribute( QTextStream & TS ); | 28 | virtual void saveSpecificAttribute( QTextStream & TS ); |
29 | }; | 29 | }; |
30 | 30 | ||
31 | extern "C" | 31 | extern "C" |
32 | { | 32 | { |
33 | void create_plugin( QList<ANetNode> & PNN ); | 33 | void create_plugin( QList<ANetNode> & PNN ); |
34 | }; | 34 | }; |
35 | 35 | ||
36 | #endif | 36 | #endif |
diff --git a/noncore/settings/networksettings2/modem/modemdata.h b/noncore/settings/networksettings2/modem/modemdata.h index 773cb77..89656ed 100644 --- a/noncore/settings/networksettings2/modem/modemdata.h +++ b/noncore/settings/networksettings2/modem/modemdata.h | |||
@@ -1,17 +1,18 @@ | |||
1 | #ifndef MODEM_DATA_H | 1 | #ifndef MODEM_DATA_H |
2 | #define MODEM_DATA_H | 2 | #define MODEM_DATA_H |
3 | 3 | ||
4 | #include <qstring.h> | 4 | #include <qstring.h> |
5 | typedef struct ModemData { | 5 | class ModemData { |
6 | public : | ||
6 | QString Device; | 7 | QString Device; |
7 | QString LockFile; | 8 | QString LockFile; |
8 | long Speed; | 9 | long Speed; |
9 | short Parity; | 10 | short Parity; |
10 | short DataBits; | 11 | short DataBits; |
11 | short StopBits; | 12 | short StopBits; |
12 | bool HardwareControl; | 13 | bool HardwareControl; |
13 | bool SoftwareControl; | 14 | bool SoftwareControl; |
14 | 15 | ||
15 | } ModemData_t; | 16 | } ; |
16 | 17 | ||
17 | #endif | 18 | #endif |
diff --git a/noncore/settings/networksettings2/modem/modemedit.cpp b/noncore/settings/networksettings2/modem/modemedit.cpp index fd3d694..d97d895 100644 --- a/noncore/settings/networksettings2/modem/modemedit.cpp +++ b/noncore/settings/networksettings2/modem/modemedit.cpp | |||
@@ -1,18 +1,18 @@ | |||
1 | #include <GUIUtils.h> | 1 | #include <GUIUtils.h> |
2 | #include "modemedit.h" | 2 | #include "modemedit.h" |
3 | 3 | ||
4 | ModemEdit::ModemEdit( QWidget * Parent ) : ModemGUI( Parent ){ | 4 | ModemEdit::ModemEdit( QWidget * Parent ) : ModemGUI( Parent ){ |
5 | 5 | ||
6 | } | 6 | } |
7 | 7 | ||
8 | QString ModemEdit::acceptable( void ) { | 8 | QString ModemEdit::acceptable( void ) { |
9 | return QString(); | 9 | return QString(); |
10 | } | 10 | } |
11 | 11 | ||
12 | bool ModemEdit::commit( ModemData_t & Data ) { | 12 | bool ModemEdit::commit( ModemData & Data ) { |
13 | return 0; | 13 | return 0; |
14 | } | 14 | } |
15 | 15 | ||
16 | void ModemEdit::showData( ModemData_t & Data ) { | 16 | void ModemEdit::showData( ModemData & Data ) { |
17 | } | 17 | } |
18 | 18 | ||
diff --git a/noncore/settings/networksettings2/modem/modemedit.h b/noncore/settings/networksettings2/modem/modemedit.h index 56e2a82..ed9cfc0 100644 --- a/noncore/settings/networksettings2/modem/modemedit.h +++ b/noncore/settings/networksettings2/modem/modemedit.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #include "modemdata.h" | 1 | #include "modemdata.h" |
2 | #include "modemGUI.h" | 2 | #include "modemGUI.h" |
3 | 3 | ||
4 | class ModemEdit : public ModemGUI { | 4 | class ModemEdit : public ModemGUI { |
5 | 5 | ||
6 | public : | 6 | public : |
7 | 7 | ||
8 | ModemEdit( QWidget * parent ); | 8 | ModemEdit( QWidget * parent ); |
9 | QString acceptable( void ); | 9 | QString acceptable( void ); |
10 | bool commit( ModemData_t & Data ); | 10 | bool commit( ModemData & Data ); |
11 | void showData( ModemData_t & Data ); | 11 | void showData( ModemData & Data ); |
12 | }; | 12 | }; |
diff --git a/noncore/settings/networksettings2/modem/modemrun.h b/noncore/settings/networksettings2/modem/modemrun.h index 491a677..eb3a193 100644 --- a/noncore/settings/networksettings2/modem/modemrun.h +++ b/noncore/settings/networksettings2/modem/modemrun.h | |||
@@ -1,28 +1,25 @@ | |||
1 | #include <asline.h> | 1 | #include <netnode.h> |
2 | #include "modemdata.h" | 2 | #include "modemdata.h" |
3 | 3 | ||
4 | class ModemRun : public AsLine { | 4 | class ModemRun : public RuntimeInfo { |
5 | 5 | ||
6 | public : | 6 | public : |
7 | 7 | ||
8 | ModemRun( ANetNodeInstance * NNI, | 8 | ModemRun( ANetNodeInstance * NNI, |
9 | ModemData & Data ) : AsLine ( NNI ) | 9 | ModemData & Data ) : RuntimeInfo ( NNI ) |
10 | { } | 10 | { } |
11 | 11 | ||
12 | virtual AsLine * asLine( void ) | 12 | virtual RuntimeInfo * line( void ) |
13 | { return (AsLine *)this; } | 13 | { return this; } |
14 | 14 | ||
15 | virtual QString deviceFile( void ) | 15 | virtual QString deviceFile( void ) |
16 | { return QString("/dev/modem"); } | 16 | { return QString("/dev/modem"); } |
17 | 17 | ||
18 | protected : | 18 | State_t detectState( void ) |
19 | 19 | { return Unknown;} | |
20 | void detectState( NodeCollection * ) | ||
21 | { } | ||
22 | 20 | ||
23 | bool setState( NodeCollection *, Action_t, bool ) | 21 | protected : |
24 | { return 0; } | ||
25 | 22 | ||
26 | bool canSetState( State_t, Action_t ) | 23 | QString setMyState( NodeCollection * , Action_t, bool ) |
27 | { return 0; } | 24 | { return QString(); } |
28 | }; | 25 | }; |
diff --git a/noncore/settings/networksettings2/modem/opie-networksettings2plugin-modem.control b/noncore/settings/networksettings2/modem/opie-networksettings2plugin-modem.control index eaa6ab0..a73249a 100644 --- a/noncore/settings/networksettings2/modem/opie-networksettings2plugin-modem.control +++ b/noncore/settings/networksettings2/modem/opie-networksettings2plugin-modem.control | |||
@@ -1,9 +1,9 @@ | |||
1 | Package: opie-networksettingsplugin2-modem | 1 | Package: opie-networksettings2plugin-modem |
2 | Files: plugins/networksettings2/libmodem.so* | 2 | Files: plugins/networksettings2/libmodem.so* |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/settings | 4 | Section: opie/settings |
5 | Maintainer: Wim Delvaux <wimpie@handhelds.org> | 5 | Maintainer: Wim Delvaux <wimpie@handhelds.org> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: opie-networksettings2, libopiecore2, libopienet2 | 7 | Depends: opie-networksettings2, libopiecore2, libopienet2 |
8 | Description: Network settings modem plugin. | 8 | Description: Network settings modem plugin. |
9 | Version: $QPE_VERSION$EXTRAVERSION | 9 | Version: $QPE_VERSION$EXTRAVERSION |