summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/interfaceppp.cpp
authortille <tille>2003-06-03 14:08:04 (UTC)
committer tille <tille>2003-06-03 14:08:04 (UTC)
commit60d9f66d2b31c659ac652c15423ecaca89a5f312 (patch) (side-by-side diff)
treebfda269b58eb1c72893057d9d7fae5a6a2e45abc /noncore/settings/networksettings/ppp/interfaceppp.cpp
parentaaf7709f64dda5a6cb81eeb96e421ba4189654d6 (diff)
downloadopie-60d9f66d2b31c659ac652c15423ecaca89a5f312.zip
opie-60d9f66d2b31c659ac652c15423ecaca89a5f312.tar.gz
opie-60d9f66d2b31c659ac652c15423ecaca89a5f312.tar.bz2
authentication (except when passwd not stored)
and minor things
Diffstat (limited to 'noncore/settings/networksettings/ppp/interfaceppp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/interfaceppp.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/noncore/settings/networksettings/ppp/interfaceppp.cpp b/noncore/settings/networksettings/ppp/interfaceppp.cpp
index dc24824..98bb4da 100644
--- a/noncore/settings/networksettings/ppp/interfaceppp.cpp
+++ b/noncore/settings/networksettings/ppp/interfaceppp.cpp
@@ -36,30 +36,28 @@ Modem* InterfacePPP::modem()
}
bool InterfacePPP::refresh()
{
qDebug("InterfacePPP::refresh()");
QMessageBox::information(0,"Not Implemented","This feature is not yet implemneted... ;-(");
return false;
}
void InterfacePPP::start()
{
qDebug("InterfacePPP::start");
- if (data()->storedPassword() != "" ){
- data()->setPassword(data()->storedPassword());
- }else{
- //FIXME:
+ if (data()->password().isEmpty() ){
+//FIXME: ask for password
qDebug("using dummy password");
- data()->setPassword( "dummy" );
+ QMessageBox::critical( 0, "no password", "you should be prompted for a password, but you are not! ;-)");
}
QFileInfo info(pppdPath());
if(!info.exists()){
QMessageBox::warning(0, tr("Error"),
i18n("<qt>Cannot find the PPP daemon!<br>"
"Make sure that pppd is installed and "
"that you have entered the correct path.</qt>"));
return;
}
@@ -87,55 +85,56 @@ void InterfacePPP::start()
"and/or adjust the location of the modem device on "
"the modem tab of "
"the setup dialog.</qt>").arg(data()->modemDevice());
QMessageBox::warning(0, tr("Error"), string);
return;
}
// if this is a PAP or CHAP account, ensure that username is
// supplied
if(data()->authMethod() == AUTH_PAP ||
data()->authMethod() == AUTH_CHAP ||
data()->authMethod() == AUTH_PAPCHAP ) {
- if(false){ //ID_Edit->text().isEmpty()) {
+ if(false){ //FIXME: ID_Edit->text().isEmpty()) {
QMessageBox::warning(0,tr("Error"),
i18n("<qt>You have selected the authentication method PAP or CHAP. This requires that you supply a username and a password!</qt>"));
// FIXME: return;
} else {
if(!modem()->setSecret(data()->authMethod(),
PPPData::encodeWord(data()->storedUsername()),
PPPData::encodeWord(data()->password()))
) {
QString s;
s = i18n("<qt>Cannot create PAP/CHAP authentication<br>"
"file \"%1\"</qt>").arg(PAP_AUTH_FILE);
QMessageBox::warning(0, tr("Error"), s);
return;
}
}
}
if (data()->phonenumber().isEmpty()) {
QString s = i18n("You must specify a telephone number!");
QMessageBox::warning(0, tr("Error"), s);
return;
}
-// this->hide();
-
- QString tit = i18n("Connecting to: %1").arg(data()->accname());
-// con->setCaption(tit);
-
-// con->show();
-
+ // SEGFAULTS:
+// setStatus( true );
+// emit updateInterface((Interface*) this);
emit begin_connect();
qDebug("InterfacePPP::start END");
}
void InterfacePPP::stop()
{
qDebug("InterfacePPP::stop");
}
+void InterfacePPP::save()
+{
+ data()->save();
+ emit updateInterface((Interface*) this);
+}