Commit b7e65203 authored by Alf Gaida's avatar Alf Gaida

Cherry-picking upstream version 2016.01.28.

Use safe VCS-links
Added hardening=+all
Changed years in copyright
Added re-release patch to match the displayed version with
  tar-ball and package version
Added remove_DATE_TIME.patch to make reproducible builds possible
parent 2b50736a
cmst
====
QT GUI for Connman with system tray icon.
The program provides graphical user interface to control the connman daemon. The connman daemon
must be started as you normally would, this program just interfaces with that daemon. You can see
what technologies and services connman has found, and for wifi services an agent is registered to
assist in obtaining the information from you necessary to logon the wifi service.
The program requires that connman be installed and running. The program depends on QT5, but only the base package.
The [Wiki](https://github.com/andrew-bibb/cmst/wiki) has been started and announcements, news, and other information can be found there.
[Screen shots:](https://github.com/andrew-bibb/cmst/wiki/Screenshots) are now included in the Wiki
There is a PKGBUILD for this project in the Arch Linux AUR.
If you are not on Arch download the release and extract the files. Then run:
qmake
make
make install (as root)
......@@ -34,8 +34,13 @@ HEADERS += ./code/scrollbox/scrollbox.h
HEADERS += ./code/notify/notify.h
HEADERS += ./code/peditor/peditor.h
HEADERS += ./code/provisioning/prov_ed.h
HEADERS += ./code/vpn_prov_ed/vpn_ed.h
HEADERS += ./code/trstring/tr_strings.h
HEADERS += ./code/iconman/iconman.h
HEADERS += ./code/vpn_agent/vpnagent.h
HEADERS += ./code/vpn_agent/vpnagent_dialog.h
HEADERS += ./code/vpn_agent/vpnagent_adaptor.h
HEADERS += ./code/vpn_agent/vpnagent_interface.h
# forms
FORMS += ./code/control_box/ui/controlbox.ui
......@@ -43,6 +48,8 @@ FORMS += ./code/agent/ui/agent.ui
FORMS += ./code/scrollbox/ui/scrollbox.ui
FORMS += ./code/peditor/ui/peditor.ui
FORMS += ./code/provisioning/ui/provisioning_editor.ui
FORMS += ./code/vpn_prov_ed/ui/vpn_prov_editor.ui
FORMS += ./code/vpn_agent/ui/vpnagent.ui
# sources
SOURCES += ./code/main.cpp
......@@ -54,8 +61,13 @@ SOURCES += ./code/scrollbox/scrollbox.cpp
SOURCES += ./code/notify/notify.cpp
SOURCES += ./code/peditor/peditor.cpp
SOURCES += ./code/provisioning/prov_ed.cpp
SOURCES += ./code/vpn_prov_ed/vpn_ed.cpp
SOURCES += ./code/trstring/tr_strings.cpp
SOURCES += ./code/iconman/iconman.cpp
SOURCES += ./code/vpn_agent/vpnagent.cpp
SOURCES += ./code/vpn_agent/vpnagent_dialog.cpp
SOURCES += ./code/vpn_agent/vpnagent_adaptor.cpp
SOURCES += ./code/vpn_agent/vpnagent_interface.cpp
# resource files
RESOURCES += ../../cmst.qrc
......
......@@ -4,7 +4,7 @@
Code for the user agent registered on DBus. When the connman daemon
needs to communicate with the user it does so through this agent.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......@@ -58,7 +58,7 @@ ConnmanAgent::ConnmanAgent(QObject* parent)
// Create Adaptor and register this Agent on the system bus.
new AgentAdaptor(this);
QDBusConnection::systemBus().registerObject("/org/cmst/Agent", this);
QDBusConnection::systemBus().registerObject(AGENT_OBJECT, this);
}
/////////////////////////////////////// PUBLIC Q_SLOTS////////////////////////////////
......@@ -67,6 +67,8 @@ ConnmanAgent::ConnmanAgent(QObject* parent)
// tasks so don't need much here
void ConnmanAgent::Release()
{
//qDebug() << "Agent Released";
return;
}
......@@ -110,13 +112,13 @@ QVariantMap ConnmanAgent::RequestInput(QDBusObjectPath path, QMap<QString,QVaria
// Send our input_map to the dialog to have the user supply the necessary information
// needed to continue. Return if canceled.
if (this->uiDialog->showPage0(input_map) == QDialog::Rejected) this->sendErrorReply(ERROR_CANCELED,"User cancelled the dialog");
// Create a return dict and send it back to connman on DBus
QMap<QString,QVariant> rtn;
rtn.clear();
uiDialog->createDict(rtn);
if (this->uiDialog->showPage0(input_map) == QDialog::Rejected)
this->sendErrorReply(ERROR_CANCELED,"User cancelled the dialog");
else
uiDialog->createDict(rtn); // create a return dict and send it back to connman on DBus
return rtn;
}
......@@ -145,11 +147,9 @@ void ConnmanAgent::createInputMap(const QMap<QString,QVariant>& r_map)
// QFile object for logging
QTextStream log;
QFile logfile("/tmp/cmst/input_request.log");
QDir d(IPT_REQ_LOG_PATH);
QFile logfile(d.absoluteFilePath(IPT_REQ_LOG_FILE));
if (b_loginputrequest) {
QDir d;
d.mkpath("/tmp/cmst");
if (logfile.exists()) logfile.remove();
if (!logfile.open(QIODevice::WriteOnly | QIODevice::Text)) b_loginputrequest = false;
else log.setDevice(&logfile);
}
......@@ -160,12 +160,12 @@ void ConnmanAgent::createInputMap(const QMap<QString,QVariant>& r_map)
while (i != r_map.constEnd()) {
// Lets see what the values contain, but first make sure we can get to them.
if (b_loginputrequest) log << "\nMap Key: " << i.key() << "\n";
if (b_loginputrequest) log << "Agent: " << "Map Key = " << i.key() << "\n";
if (! i.value().canConvert<QDBusArgument>() ) return;
const QDBusArgument qdba = i.value().value<QDBusArgument>();
if (qdba.currentType() != QDBusArgument::MapType ) {
if (b_loginputrequest) log << "Error - QDBusArgument as the value is not a MapType\n";
if (b_loginputrequest) log << "Agent: " << "Error - QDBusArgument as the value is not a MapType\n";
return;
}
......@@ -173,7 +173,7 @@ void ConnmanAgent::createInputMap(const QMap<QString,QVariant>& r_map)
qdba.beginMap();
QMap<QString,QString> m;
m.clear();
if (b_loginputrequest) log << "Extracting the DBusArgument Map...\n";
if (b_loginputrequest) log << "Agent: " << "Extracting the DBusArgument Map...\n";
while ( ! qdba.atEnd() ) {
QString k;
QVariant v;
......
......@@ -3,7 +3,7 @@
Code for the user agent registered on DBus. When the connman daemon
needs to communicate with the user it does so through this agent.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......@@ -40,10 +40,15 @@ DEALINGS IN THE SOFTWARE.
# include "./code/agent/agent_dialog.h"
# define AGENT_SERVICE "org.cmst"
# define AGENT_INTERFACE "net.connman.Agent"
# define AGENT_OBJECT "/org/cmst/Agent"
class ConnmanAgent : public QObject, protected QDBusContext
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "net.connman.Agent")
Q_CLASSINFO("D-Bus Interface", AGENT_INTERFACE)
public:
ConnmanAgent(QObject*);
......
......@@ -5,7 +5,7 @@ needs to communicate with the user it does so through the agent. The
agent has a QDialog as a class member, and agent_dialog.cpp manages
that dialog.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......
......@@ -5,7 +5,7 @@ needs to communicate with the user it does so through the agent. The
agent has a QDialog as a class member, and agent_dialog.cpp manages
that dialog.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......
......@@ -45,6 +45,9 @@
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If an old passphrase is available it will be shown here for reference.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
......@@ -55,6 +58,9 @@
<property name="text">
<string/>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
......@@ -111,6 +117,9 @@
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Type the name of the hidden network you wish to connect to.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
......@@ -133,7 +142,11 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEdit_ssid"/>
<widget class="QLineEdit" name="lineEdit_ssid">
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
......@@ -159,6 +172,9 @@
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;WISPr username.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
......@@ -176,6 +192,9 @@
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;WISPr password.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
......@@ -192,6 +211,9 @@
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Type your Identity for the Extensible Authentication Protocol&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
......@@ -269,6 +291,9 @@
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enter a WPS pin.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
......
......@@ -3,7 +3,7 @@
Code to manage the primary user interface to include the QDialog the
user interfaces with and the system tray icon.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......@@ -54,6 +54,7 @@ DEALINGS IN THE SOFTWARE.
# include "./code/counter/counter.h"
# include "./code/notify/notify.h"
# include "./code/iconman/iconman.h"
# include "./code/vpn_agent/vpnagent.h"
// Two of the connman.Manager query functions will return an array of structures.
......@@ -87,20 +88,6 @@ class idButton : public QFrame
void buttonClicked(bool);
};
//
// custom QFrame containing a QProgressBar
class SignalBar : public QFrame
{
Q_OBJECT
public:
SignalBar (QWidget*);
inline void setBarValue (const int& val) {bar->setValue(val);}
private:
QProgressBar* bar;
};
//
// The main program class based on a QDialog
class ControlBox : public QDialog
......@@ -130,18 +117,22 @@ class ControlBox : public QDialog
QList<arrayElement> technologies_list;
QList<arrayElement> wifi_list;
QList<arrayElement> peer_list;
QList<arrayElement> vpn_list;
ConnmanAgent* agent;
ConnmanVPNAgent* vpnagent;
ConnmanCounter* counter;
NotifyClient* notifyclient;
short wifi_interval;
quint32 counter_accuracy;
quint32 counter_period;
QDBusInterface* iface_manager;
QDBusInterface* con_manager;
QDBusInterface* vpn_manager;
QSystemTrayIcon* trayicon;
QMenu* trayiconmenu;
QMenu* tech_submenu;
QMenu* info_submenu;
QMenu* wifi_submenu;
QMenu* vpn_submenu;
QMenu* mvsrv_menu;
QActionGroup* minMaxGroup;
QActionGroup* moveGroup;
......@@ -158,10 +149,11 @@ class ControlBox : public QDialog
// functions
int managerRescan(const int& srv = 0);
void assemblePage1();
void assemblePage2();
void assemblePage3();
void assemblePage4();
void assembleTabStatus();
void assembleTabDetails();
void assembleTabWireless();
void assembleTabVPN();
void assembleTabCounters();
void assembleTrayIcon();
void sendNotifications();
bool getProperties();
......@@ -198,6 +190,7 @@ class ControlBox : public QDialog
void techSubmenuTriggered(QAction* = 0);
void infoSubmenuTriggered(QAction* = 0);
void wifiSubmenuTriggered(QAction* = 0);
void vpnSubmenuTriggered(QAction* = 0);
void getServiceDetails(int);
void showWhatsThis();
inline void trayNotifications(bool checked) {if (checked) ui.checkBox_notifydaemon->setChecked(false);}
......
......@@ -3,7 +3,7 @@
Code for the connection counter registered on DBus. When registered the
connman daemon will communicate to this object with signals.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......@@ -46,8 +46,10 @@ ConnmanCounter::ConnmanCounter(QObject* parent)
// Create Adaptor and register this Counter on the system bus.
new CounterAdaptor(this);
QDBusConnection::systemBus().registerObject("/org/cmst/Counter", this);
// Try to register an object on the system bus
QDBusConnection::systemBus().registerObject(CNTR_OBJECT, this);
}
......@@ -138,6 +140,8 @@ QString ConnmanCounter::getLabel(const QVariantMap& map)
// tasks so don't need much here
void ConnmanCounter::Release()
{
//qDebug() << "Counter Released";
return;
}
......
......@@ -3,7 +3,7 @@
Code for the connection counter registered on DBus. When registered the
connman daemon will communicate to this object with signals.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......@@ -35,17 +35,21 @@ DEALINGS IN THE SOFTWARE.
# include <QVariantMap>
# include <QtDBus/QDBusObjectPath>
# define CNTR_SERVICE "org.cmst"
# define CNTR_INTERFACE "net.connman.Counter"
# define CNTR_OBJECT "/org/cmst/Counter"
class ConnmanCounter : public QObject
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "net.connman.Counter")
Q_CLASSINFO("D-Bus Interface", CNTR_INTERFACE)
public:
ConnmanCounter(QObject*);
QString getLabel(const QVariantMap&);
QDBusObjectPath getServiceObjectPath();
inline int cnxns() {return receivers(SIGNAL(usageUpdated(const QDBusObjectPath&, const QString&, const QString&)));}
signals:
void usageUpdated(const QDBusObjectPath&, const QString&, const QString&);
......
......@@ -3,7 +3,7 @@
Class to manage icons and allow the user to provide substitutions based
on the the system theme.
Copyright (C) 2015
Copyright (C) 2015-2016
by: Andrew J. Bibb
License: MIT
......@@ -47,7 +47,7 @@ IconManager::IconManager(QObject* parent) : QObject(parent)
// APP defined in resource.h
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
QString home = env.value("HOME");
cfg = QString(env.value("XDG_CONFIG_HOME", QString(QDir::homePath())) + "/.config/%1/%1.icon").arg(QString(APP).toLower() );
cfg = QString(env.value("XDG_CONFIG_HOME", QString(QDir::homePath()) + "/.config") + "/%1/%1.icon").arg(QString(APP).toLower() );
// Set the qrc data member
qrc = QString(":/text/text/icon_def.txt");
......
......@@ -3,7 +3,7 @@
Class to manage icons and allow the user to provide substitutions based
on the the system theme.
Copyright (C) 2015
Copyright (C) 2015-2016
by: Andrew J. Bibb
License: MIT
......
......@@ -2,7 +2,7 @@
C++ main routine.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......
......@@ -3,7 +3,7 @@
Code for a notify client to interface with a desktop notification
server.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......
......@@ -3,7 +3,7 @@
Code for a notify client to interface with a desktop notification
server.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......
......@@ -2,7 +2,7 @@
Code to manage the Properties Editor dialog.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......
......@@ -2,7 +2,7 @@
Code to manage the Properties Editor dialog.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......
......@@ -2,7 +2,7 @@
Code to manage the Provisioning Editor dialog.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......@@ -70,6 +70,7 @@ void ValidatingDialog::setValidator(const int& vd, bool plural)
QString s_ip6 = "(?:[0-9a-fA-F]{1,4})";
QString s_mac = "(?:[0-9a-fA-F]{1,2})";
QString s_hex = "[0-9a-fA-F]*";
QString s_int = "[0-9]*";
QString s_dom = "[0-9a-zA-Z]*[\\.]?[0-9a-zA-Z]*";
QString s_wd = "[0-9,a-zA-Z_\\.\\!\\@\\#\\$\\%\\^\\&\\*\\+\\-]*";
QString s_start = (plural ? "\\s?|(" : "\\s?|^");
......@@ -101,6 +102,11 @@ void ValidatingDialog::setValidator(const int& vd, bool plural)
QRegularExpressionValidator* lev_h = new QRegularExpressionValidator(rxh, this);
lineedit->setValidator(lev_h); }
break;
case CMST::ProvEd_Vd_Int: {
QRegularExpression rxint(s_start + s_int + s_end);
QRegularExpressionValidator* lev_int = new QRegularExpressionValidator(rxint, this);
lineedit->setValidator(lev_int); }
break;
case CMST::ProvEd_Vd_Dom: {
QRegularExpression rxdom(s_start + s_dom + s_end);
QRegularExpressionValidator* lev_dom = new QRegularExpressionValidator(rxdom, this);
......@@ -128,6 +134,7 @@ ProvisioningEditor::ProvisioningEditor(QWidget* parent) : QDialog(parent)
// Data members
menubar = new QMenuBar(this);
ui.verticalLayout01->setMenuBar(menubar);
con_path = "/var/lib/connman";
statusbar = new QStatusBar(this);
ui.verticalLayout01->addWidget(statusbar);
......@@ -298,12 +305,12 @@ void ProvisioningEditor::inputValidated(QAction* act)
// create some prompts and set validator
if (act == ui.actionServiceMAC) {vd->setLabel(tr("MAC address.")); vd->setValidator(CMST::ProvEd_Vd_MAC);}
if (act == ui.actionWifiSSID) {vd->setLabel(tr("SSID: hexadecimal representation of an 802.11 SSID")), vd->setValidator(CMST:: ProvEd_Vd_Hex);}
if (act == ui.actionServiceNameServers) {vd->setLabel(tr("List of Nameservers")), vd->setValidator(CMST::ProvEd_Vd_46, true);}
if (act == ui.actionServiceTimeServers) {vd->setLabel(tr("List of Timeservers")), vd->setValidator(CMST::ProvEd_Vd_46, true);}
if (act == ui.actionServiceSearchDomains) {vd->setLabel(tr("List of DNS Search Domains")), vd->setValidator(CMST::ProvEd_Vd_Dom, true);}
if (act == ui.actionServiceDomain) {vd->setLabel(tr("Domain name to be used")), vd->setValidator(CMST::ProvEd_Vd_Dom);}
if (act == ui.actionWifiName) {vd->setLabel(tr("Enter the string representation of an 802.11 SSID.")), vd->setValidator(CMST::ProvEd_Vd_Wd);}
if (act == ui.actionWifiSSID) {vd->setLabel(tr("SSID: hexadecimal representation of an 802.11 SSID")); vd->setValidator(CMST:: ProvEd_Vd_Hex);}
if (act == ui.actionServiceNameServers) {vd->setLabel(tr("List of Nameservers")); vd->setValidator(CMST::ProvEd_Vd_46, true);}
if (act == ui.actionServiceTimeServers) {vd->setLabel(tr("List of Timeservers")); vd->setValidator(CMST::ProvEd_Vd_46, true);}
if (act == ui.actionServiceSearchDomains) {vd->setLabel(tr("List of DNS Search Domains")); vd->setValidator(CMST::ProvEd_Vd_Dom, true);}
if (act == ui.actionServiceDomain) {vd->setLabel(tr("Domain name to be used")); vd->setValidator(CMST::ProvEd_Vd_Dom);}
if (act == ui.actionWifiName) {vd->setLabel(tr("Enter the string representation of an 802.11 SSID.")); vd->setValidator(CMST::ProvEd_Vd_Wd);}
// if accepted put an entry in the textedit
if (vd->exec() == QDialog::Accepted) {
......@@ -546,6 +553,7 @@ void ProvisioningEditor::requestFileList(QAbstractButton* button)
// request a list of config files from roothelper
QList<QVariant> vlist;
vlist << QVariant::fromValue(con_path);
QDBusInterface* iface_rfl = new QDBusInterface("org.cmst.roothelper", "/", "org.cmst.roothelper", QDBusConnection::systemBus(), this);
iface_rfl->callWithCallback(QLatin1String("getFileList"), vlist, this, SLOT(processFileList(const QStringList&)), SLOT(callbackErrorHandler(QDBusError)));
......@@ -597,6 +605,7 @@ void ProvisioningEditor::processFileList(const QStringList& sl_conf)
// if we have a filename try to open the file
if (! filename.isEmpty() ) {
vlist.clear();
vlist << QVariant::fromValue(con_path);
vlist << QVariant::fromValue(filename);
iface_pfl->callWithCallback(QLatin1String("readFile"), vlist, this, SLOT(seedTextEdit(const QString&)), SLOT(callbackErrorHandler(QDBusError)));
} // if there is a file name
......@@ -627,6 +636,7 @@ void ProvisioningEditor::processFileList(const QStringList& sl_conf)
// if we have a filename try to delete the file
if (! filename.isEmpty() ) {
vlist.clear();
vlist << QVariant::fromValue(con_path);
vlist << QVariant::fromValue(filename);
iface_pfl->callWithCallback(QLatin1String("deleteFile"), vlist, this, SLOT(deleteCompleted(bool)), SLOT(callbackErrorHandler(QDBusError)));
} // if there is a file name
......@@ -648,6 +658,7 @@ void ProvisioningEditor::processFileList(const QStringList& sl_conf)
// if we have a filename try to save the file
if (! filename.isEmpty() ) {
vlist.clear();
vlist<< QVariant::fromValue(con_path);
vlist << QVariant::fromValue(filename);
vlist << QVariant::fromValue(ui.plainTextEdit_main->toPlainText() );
iface_pfl->callWithCallback(QLatin1String("saveFile"), vlist, this, SLOT(writeCompleted(qint64)), SLOT(callbackErrorHandler(QDBusError)));
......
......@@ -2,7 +2,7 @@
Code to manage the Provisioning Editor dialog.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......@@ -44,6 +44,7 @@ DEALINGS IN THE SOFTWARE.
# include "ui_provisioning_editor.h"
//
// Class for an QInputDialog knockoff with validator
class ValidatingDialog : public QDialog
......@@ -94,6 +95,7 @@ class ProvisioningEditor : public QDialog
QButtonGroup* bg01;
QStatusBar* statusbar;
int statustimeout;
QString con_path;
private slots:
void inputSelectFile(QAction*);
......
......@@ -146,9 +146,6 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_statusbar"/>
</item>
</layout>
<action name="actionGlobal">
<property name="text">
......
......@@ -3,7 +3,7 @@
Dialog to display text to the user. Kind of like a neutered QMessageBox
except it has scroll bars built in.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......
......@@ -3,7 +3,7 @@
Dialog to display text to the user. Kind of like a neutered QMessageBox
except it has scroll bars built in.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......
......@@ -4,7 +4,7 @@ Class to manage and present strings that need to be translated. These
are typically not inline strings, rather strings used globally or strings
returned by third parties, for instance, Connman.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......@@ -111,6 +111,12 @@ TranslateStrings::TranslateStrings(QObject* parent) : QObject(parent)
sl << tr("6to4", "connman ipv6 method string");
sl << tr("off", "connman ipv6 method string");
sl << tr("openconnect", "connman vpn connection type");
sl << tr("openvpn", "connman vpn connection type");
sl << tr("vpnc", "connman vpn connection type");
sl << tr("l2tp", "connman vpn connection type");
sl << tr("pptp", "connman vpn connection type");
return;
}
......
......@@ -4,7 +4,7 @@ Class to manage and present strings that need to be translated. These
are typically not inline strings, rather strings used globally or strings
returned by third parties, for instance, Connman.
Copyright (C) 2013-2015
Copyright (C) 2013-2016
by: Andrew J. Bibb
License: MIT
......
#!/bin/bash
#
# script to convert the header file to cpp
#
# -M all public slots
# -P all properties
#
# Adaptor and interface code is generated here because the QT autogenerator
# creates an adaptor class based on the last part of the interface name.
# So net.connman.Agent and net.connman.vpn.Agent both create an adaptor
# named AgentAdaptor. This compiles fine, but Mr. Linker does not like it.
# Generate the vpn adaptors and interfaces here and then change all instances of
# AgentAdaptor to VPNAgentAdaptor.
#
qdbuscpp2xml -M -P vpnagent.h -o org.monkey_business_enterprises.vpnagent.xml
qdbusxml2cpp org.monkey_business_enterprises.vpnagent.xml -a vpnagent_adaptor
qdbusxml2cpp org.monkey_business_enterprises.vpnagent.xml -p vpnagent_interface
sed -i 's/AgentAdaptor/VPNAgentAdaptor/g' vpnagent_adaptor.h
sed -i 's/AgentAdaptor/VPNAgentAdaptor/g' vpnagent_adaptor.cpp
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="net.connman.vpn.Agent">
<method name="Release">
</method>
<method name="ReportError">
<arg type="o" direction="in"/>
<arg type="s" direction="in"/>
</method>
<method name="RequestInput">