Diffstat (limited to 'noncore/settings/networksettings/ppp/pppdata.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppdata.h | 43 |
1 files changed, 36 insertions, 7 deletions
diff --git a/noncore/settings/networksettings/ppp/pppdata.h b/noncore/settings/networksettings/ppp/pppdata.h index 6e1379d..d1cbeb5 100644 --- a/noncore/settings/networksettings/ppp/pppdata.h +++ b/noncore/settings/networksettings/ppp/pppdata.h @@ -63,20 +63,24 @@ class Config; //#define GRAPH_GRP "Graph" //#define WINPOS_GRP "WindowPosition" // general +#define ACCOUNT_LIST "AccountList" +#define DEVICE_LIST "DeviceList" #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 NUMACCOUNTS_KEY "HighcountAccounts" +#define NUMDEVICES_KEY "HighcountDevices" #define ID_KEY "ID" // modem +#define MODEMNAME_KEY "Modem_Name" #define MODEMDEV_KEY "Device" #define LOCKFILE_KEY "UseLockFile" #define FLOWCONTROL_KEY "FlowControl" #define SPEED_KEY "Speed" @@ -150,8 +154,12 @@ class Config; #define ACCOUNTS_COUNT "Accounts_Count" #define ACOUNTS_DEV "Accounts_Modem" #define ACOUNTS_ACC "Accounts_Account" +#define DEVICESNAMES_LIST "DevicesNames_List" +#define DEVICES_LIST "Devices_List" +#define DEVICES_LIST_SEP ',' + class PPPData { public: PPPData(); ~PPPData() {}; @@ -161,8 +169,10 @@ public: // general functions void save(); void cancel(); + QStringList getAccountList(); + static QMap<QString,QString> getConfiguredInterfaces(); static void setConfiguredInterfaces( QMap<QString,QString> ); // function to read/write date to configuration file @@ -183,9 +193,9 @@ public: // functions to set/get general kppp info QString password(); void setPassword(const QString &); - int currentAccountID() { return caccount; }; +// int currentAccountID() { return caccount; }; const QString defaultAccount(); void setDefaultAccount(const QString &); void set_xserver_exit_disconnect(bool set); @@ -235,8 +245,12 @@ public: void setModemEscapeResp(const QString &); const QString modemEscapeResp(); +// const QString modemName(); +// bool setModemName(const QString &); +// bool changeModemName(const QString &); + const QString modemDevice(); bool setModemDevice(const QString &); const QString flowcontrol(); @@ -312,16 +326,17 @@ public: // functions to set/get account information int count() const; bool setAccount(const QString &); - bool setAccountbyIndex(int); +// bool setAccountbyIndex(int); bool isUniqueAccname(const QString &); + bool isUniqueDevname(const QString &); bool deleteAccount(); bool deleteAccount(const QString &); int newaccount(); - int copyaccount(int i); + int copyaccount(const QString&); const QString accname(); void setAccname(const QString &); @@ -408,27 +423,41 @@ public: int pppdError() const; void setpppdError(int err); + QStringList getDevicesList(); static QString encodeWord(const QString &s); + const QString devname(); + void setDevname(const QString &); + bool setDevice(const QString& ); + bool deleteDevice(); + bool deleteDevice(const QString &); + int newdevice(); + int copydevice(const QString&); + QStringList getDevicesNamesList(); + private: //static PPPData *_data; - int modemDeviceGroup; +// int modemDeviceGroup; QString passwd; - // static Config* config; // configuration object + QString _modemName; int highcount; // index of highest account - int caccount; // index of the current account + int highcountdev; // index of highest device +// int caccount; // index of the current account QString cgroup; // name of current config group pid_t suidprocessid; // process ID of setuid child bool pppdisrunning; // pppd process // daemon int pppderror; // error encounterd running pppd int pppdVer, pppdMod, pppdPatch; // pppd version + QStringList phonelist; + QStringList accountList; + QStringList deviceList; QMap<QString,QString> stringEntries; QMap<QString,int> intEntries; QMap<QString,QStringList> listEntries; QMap<QString,QChar> sepEntries; |