author | wimpie <wimpie> | 2004-08-12 12:46:55 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-08-12 12:46:55 (UTC) |
commit | 8f215ba9ceb395f262517855a99d7d2d303ca760 (patch) (unidiff) | |
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,4 +1,5 @@ | |||
1 | #include "nsdata.h" | 1 | #include "nsdata.h" |
2 | #include "activateprofile.h" | 2 | #include "activateprofile.h" |
3 | #include "activatevpn.h" | ||
3 | #include "networksettings.h" | 4 | #include "networksettings.h" |
4 | 5 | ||
@@ -22,4 +23,6 @@ OPIE_EXPORT_APP( OApplicationFactory<NetworkSettings> ) | |||
22 | // used by interfaces to request user prompt | 23 | // used by interfaces to request user prompt |
23 | #define ACT_PROMPT 3 | 24 | #define ACT_PROMPT 3 |
25 | // used by interfaces to trigger VPN | ||
26 | #define ACT_VPN 4 | ||
24 | 27 | ||
25 | int main( int argc, char * argv[] ) { | 28 | int main( int argc, char * argv[] ) { |
@@ -45,4 +48,7 @@ int main( int argc, char * argv[] ) { | |||
45 | Action = ACT_PROMPT; | 48 | Action = ACT_PROMPT; |
46 | rmv = 1; | 49 | rmv = 1; |
50 | } else if( strcmp( argv[i], "--triggervpn" ) == 0 ) { | ||
51 | Action = ACT_VPN; | ||
52 | rmv = 1; | ||
47 | } | 53 | } |
48 | if( rmv ) { | 54 | if( rmv ) { |
@@ -79,8 +85,6 @@ int main( int argc, char * argv[] ) { | |||
79 | case ACT_REQUEST : | 85 | case ACT_REQUEST : |
80 | { NetworkSettingsData NS; | 86 | { NetworkSettingsData NS; |
81 | Log(("ACT_REQUEST\n")); | ||
82 | if( NS.canStart( argv[1] ) ) { | 87 | if( NS.canStart( argv[1] ) ) { |
83 | QString S; | 88 | QString S; |
84 | Log(("NEED FOR PROMPT\n" )); | ||
85 | S.sprintf( QPEApplication::qpeDir()+ | 89 | S.sprintf( QPEApplication::qpeDir()+ |
86 | "/bin/networksettings2" ); | 90 | "/bin/networksettings2" ); |
@@ -98,5 +102,4 @@ int main( int argc, char * argv[] ) { | |||
98 | case ACT_REGEN : | 102 | case ACT_REGEN : |
99 | { NetworkSettingsData NS; | 103 | { NetworkSettingsData NS; |
100 | Log(("REGEN\n" )); | ||
101 | // regen returns 0 if OK | 104 | // regen returns 0 if OK |
102 | rv = (NS.regenerate()) ? 1 : 0; | 105 | rv = (NS.regenerate()) ? 1 : 0; |
@@ -105,5 +108,4 @@ int main( int argc, char * argv[] ) { | |||
105 | case ACT_PROMPT : | 108 | case ACT_PROMPT : |
106 | { ActivateProfile AP(argv[1]); | 109 | { ActivateProfile AP(argv[1]); |
107 | Log(("PROMPT\n" )); | ||
108 | if( AP.exec() == QDialog::Accepted ) { | 110 | if( AP.exec() == QDialog::Accepted ) { |
109 | printf( "%s-c%ld-allowed", argv[1], AP.selectedProfile() ); | 111 | printf( "%s-c%ld-allowed", argv[1], AP.selectedProfile() ); |
@@ -113,7 +115,11 @@ int main( int argc, char * argv[] ) { | |||
113 | } | 115 | } |
114 | break; | 116 | break; |
117 | case ACT_VPN : | ||
118 | { ActivateVPN AVPN; | ||
119 | AVPN.exec(); | ||
120 | } | ||
121 | break; | ||
115 | case ACT_GUI : | 122 | case ACT_GUI : |
116 | { QWidget * W = new NetworkSettings(0); | 123 | { QWidget * W = new NetworkSettings(0); |
117 | Log(("GUI\n" )); | ||
118 | TheApp->setMainWidget( W ); | 124 | TheApp->setMainWidget( W ); |
119 | W->show(); | 125 | W->show(); |