author | wimpie <wimpie> | 2004-08-12 12:46:55 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-08-12 12:46:55 (UTC) |
commit | 8f215ba9ceb395f262517855a99d7d2d303ca760 (patch) (side-by-side diff) | |
tree | aa5f9b14c249217b4d3fc30f4771bdaf1c3545d3 /noncore/settings/networksettings2/main.cpp | |
parent | ef64880308b5035cc8ca2e4e79325db613af525b (diff) | |
download | opie-8f215ba9ceb395f262517855a99d7d2d303ca760.zip opie-8f215ba9ceb395f262517855a99d7d2d303ca760.tar.gz opie-8f215ba9ceb395f262517855a99d7d2d303ca760.tar.bz2 |
MANY changes
- now generates peers/pap-chap secrets files
(no chatscript yet)
(not all usefull ppp options included yet)
- still not ready for prime time yet
Diffstat (limited to 'noncore/settings/networksettings2/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/main.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/noncore/settings/networksettings2/main.cpp b/noncore/settings/networksettings2/main.cpp index 6c969fc..b32b323 100644 --- a/noncore/settings/networksettings2/main.cpp +++ b/noncore/settings/networksettings2/main.cpp @@ -1,5 +1,6 @@ #include "nsdata.h" #include "activateprofile.h" +#include "activatevpn.h" #include "networksettings.h" #include <qpe/qpeapplication.h> @@ -21,6 +22,8 @@ OPIE_EXPORT_APP( OApplicationFactory<NetworkSettings> ) #define ACT_REGEN 2 // used by interfaces to request user prompt #define ACT_PROMPT 3 +// used by interfaces to trigger VPN +#define ACT_VPN 4 int main( int argc, char * argv[] ) { int rv = 0; @@ -44,6 +47,9 @@ int main( int argc, char * argv[] ) { } else if( strcmp( argv[i], "--prompt" ) == 0 ) { Action = ACT_PROMPT; rmv = 1; + } else if( strcmp( argv[i], "--triggervpn" ) == 0 ) { + Action = ACT_VPN; + rmv = 1; } if( rmv ) { memmove( argv+i, argv+i+rmv, @@ -78,10 +84,8 @@ int main( int argc, char * argv[] ) { switch( Action ) { case ACT_REQUEST : { NetworkSettingsData NS; - Log(("ACT_REQUEST\n")); if( NS.canStart( argv[1] ) ) { QString S; - Log(("NEED FOR PROMPT\n" )); S.sprintf( QPEApplication::qpeDir()+ "/bin/networksettings2" ); char * MyArgv[4]; @@ -97,14 +101,12 @@ int main( int argc, char * argv[] ) { break; case ACT_REGEN : { NetworkSettingsData NS; - Log(("REGEN\n" )); // regen returns 0 if OK rv = (NS.regenerate()) ? 1 : 0; } break; case ACT_PROMPT : { ActivateProfile AP(argv[1]); - Log(("PROMPT\n" )); if( AP.exec() == QDialog::Accepted ) { printf( "%s-c%ld-allowed", argv[1], AP.selectedProfile() ); } else { @@ -112,9 +114,13 @@ int main( int argc, char * argv[] ) { } } break; + case ACT_VPN : + { ActivateVPN AVPN; + AVPN.exec(); + } + break; case ACT_GUI : { QWidget * W = new NetworkSettings(0); - Log(("GUI\n" )); TheApp->setMainWidget( W ); W->show(); #ifdef _WS_QWS_ |