summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/pppdata.h
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings/ppp/pppdata.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/pppdata.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/noncore/settings/networksettings/ppp/pppdata.h b/noncore/settings/networksettings/ppp/pppdata.h
index 41dfbd8..c1c7e69 100644
--- a/noncore/settings/networksettings/ppp/pppdata.h
+++ b/noncore/settings/networksettings/ppp/pppdata.h
@@ -10,75 +10,77 @@
* based on EzPPP:
* Copyright (C) 1997 Jay Painter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _PPPDATA_H_
#define _PPPDATA_H_
#include <unistd.h>
#include <sys/types.h>
+#include <qcolor.h>
+#include <qmap.h>
#include <qstring.h>
#include <qstringlist.h>
-#include <qcolor.h>
#include "kpppconfig.h"
class Config;
// string lengths
#define PATH_SIZE 120
#define MODEMSTR_SIZE 80
#define ACCNAME_SIZE 50
#define PHONENUMBER_SIZE 60
#define COMMAND_SIZE 255
#define IPADDR_SIZE 15
#define DOMAIN_SIZE 50
#define TIMEOUT_SIZE 60
//
// keys for config file
//
// groups
#define GENERAL_GRP "PPP_General"
#define MODEM_GRP "PPP_Modem"
#define ACCOUNT_GRP "PPP_Account"
+#define ACCLIST_GRP "PPP_Accounts_List"
//#define GRAPH_GRP "Graph"
//#define WINPOS_GRP "WindowPosition"
// general
#define DEFAULTACCOUNT_KEY "DefaultAccount"
#define PPPDVERSION_KEY "pppdVersion"
#define PPPDTIMEOUT_KEY "pppdTimeout"
#define SHOWCLOCK_KEY "ShowClock"
#define SHOWLOGWIN_KEY "ShowLogWindow"
#define AUTOREDIAL_KEY "AutomaticRedial"
#define DISCONNECT_KEY "DisconnectOnXServerExit"
#define QUITONDISCONNECT_KEY "QuitOnDisconnect"
#define NUMACCOUNTS_KEY "NumberOfAccounts"
#define ID_KEY "ID"
// modem
#define MODEMDEV_KEY "Device"
#define LOCKFILE_KEY "UseLockFile"
#define FLOWCONTROL_KEY "FlowControl"
#define SPEED_KEY "Speed"
#define TIMEOUT_KEY "Timeout"
#define TONEDURATION_KEY "ToneDuration"
#define BUSYWAIT_KEY "BusyWait"
#define INITSTR_KEY "InitString"
@@ -119,97 +121,92 @@ class Config;
#define COMMAND_KEY "Command"
#define DISCONNECT_COMMAND_KEY "DisconnectCommand"
#define BEFORE_DISCONNECT_KEY "BeforeDisconnect"
#define IPADDR_KEY "IPAddr"
#define SUBNETMASK_KEY "SubnetMask"
#define ACCTENABLED_KEY "AccountingEnabled"
#define VOLACCTENABLED_KEY "VolumeAccountingEnabled"
#define ACCTFILE_KEY "AccountingFile"
#define AUTONAME_KEY "AutoName"
#define GATEWAY_KEY "Gateway"
#define DEFAULTROUTE_KEY "DefaultRoute"
#define DOMAIN_KEY "Domain"
#define DNS_KEY "DNS"
#define AUTODNS_KEY "AutoDNS"
#define EXDNSDISABLED_KEY "ExDNSDisabled"
#define SCRIPTCOM_KEY "ScriptCommands"
#define SCRIPTARG_KEY "ScriptArguments"
#define PPPDARG_KEY "pppdArguments"
#define PPP_DEBUG_OPTION "PPPDebug"
#define ICONIFY_ON_CONNECT_KEY "iconifyOnConnect"
#define DOCKING_KEY "DockIntoPanel"
#define TOTALCOSTS_KEY "TotalCosts"
#define TOTALBYTES_KEY "TotalBytes"
-// graph colors
-#define GENABLED "Enabled"
-#define GCOLOR_BG "Background"
-#define GCOLOR_TEXT "Text"
-#define GCOLOR_IN "InBytes"
-#define GCOLOR_OUT "OutBytes"
-
// pppd errors
#define E_IF_TIMEOUT 1
#define E_PPPD_DIED 2
-// window position
-#define WINPOS_CONWIN_X "WindowPositionConWinX"
-#define WINPOS_CONWIN_Y "WindowPositionConWinY"
-#define WINPOS_STATWIN_X "WindowPositionStatWinX"
-#define WINPOS_STATWIN_Y "WindowPositionStatWinY"
+// account list
+#define ACCOUNTS_COUNT "Accounts_Count"
+#define ACOUNTS_DEV "Accounts_Modem"
+#define ACOUNTS_ACC "Accounts_Account"
class PPPData {
public:
PPPData();
~PPPData() {};
static PPPData* data();
enum { NumInitStrings = 2 };
// general functions
bool open();
void save();
void cancel();
+ QMap<QString,QString> getConfiguredInterfaces();
+ void setConfiguredInterfaces( QMap<QString,QString> );
// function to read/write date to configuration file
QString readConfig(const QString &, const QString &, const QString &);
int readNumConfig(const QString &, const QString &, int);
bool readListConfig(const QString &, const QString &,
QStringList &, char sep = ',');
void writeConfig(const QString &, const QString &, const QString &);
void writeConfig(const QString &, const QString &, int);
void writeListConfig(const QString &, const QString &,
QStringList &, char sep = ',');
// return the current account group
QString currentGroup() { return cgroup; }
QString modemGroup();
// functions to set/get general kppp info
QString password() const;
void setPassword(const QString &);
+ int currentAccountID() { return caccount; };
const QString defaultAccount();
void setDefaultAccount(const QString &);
void set_xserver_exit_disconnect(bool set);
bool get_xserver_exit_disconnect();
void setPPPDebug(bool set);
bool getPPPDebug();
void set_quit_on_disconnect(bool);
bool quit_on_disconnect();
void set_show_clock_on_caption(bool set);
bool get_show_clock_on_caption();
void set_show_log_window(bool set);
bool get_show_log_window();
void set_automatic_redial(bool set);
bool automatic_redial();
void set_iconify_on_connect(bool set);
bool get_iconify_on_connect();