summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2017-03-04 19:59:40 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2017-03-04 19:59:40 -0600
commit36cb1aad5c7822ca8b0f28c2efc8162588cc7449 (patch)
tree96421f18012db1aa6efed8732e5701b84337edff
parented87a0251092aa94f81fcc3ba559f340d2360b43 (diff)
downloadhorizon-qt5-36cb1aad5c7822ca8b0f28c2efc8162588cc7449.tar.gz
horizon-qt5-36cb1aad5c7822ca8b0f28c2efc8162588cc7449.tar.bz2
horizon-qt5-36cb1aad5c7822ca8b0f28c2efc8162588cc7449.tar.xz
horizon-qt5-36cb1aad5c7822ca8b0f28c2efc8162588cc7449.zip
Add reference to Horizon Core lib, and add iface list member
-rw-r--r--horizon-qt5.pro4
-rw-r--r--horizonwizard.cc9
-rw-r--r--horizonwizard.hh5
3 files changed, 16 insertions, 2 deletions
diff --git a/horizon-qt5.pro b/horizon-qt5.pro
index 19d0731..7b30ca7 100644
--- a/horizon-qt5.pro
+++ b/horizon-qt5.pro
@@ -24,3 +24,7 @@ HEADERS += \
RESOURCES += \
horizon.qrc
+
+unix: CONFIG += link_pkgconfig
+unix: PKG_CONFIG = PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkgconf
+unix: PKGCONFIG += horizon-core
diff --git a/horizonwizard.cc b/horizonwizard.cc
index 7c123ea..7ab4899 100644
--- a/horizonwizard.cc
+++ b/horizonwizard.cc
@@ -6,6 +6,10 @@
#include <string>
#include "welcomepage.hh"
+#ifndef NOT_NATIVE
+# include <horizon/networkinterface.hh>
+using Horizon::NetworkInterface;
+#endif
#include "networkingpage.hh"
#include "softwarepage.hh"
@@ -52,5 +56,8 @@ HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent)
help.exec();
});
- selected.insert("adelie-base");
+ this->selected.insert("adelie-base");
+#ifndef NOT_NATIVE
+ this->interfaces = NetworkInterface::list_available_ifs();
+#endif
}
diff --git a/horizonwizard.hh b/horizonwizard.hh
index ca7cc03..403da0e 100644
--- a/horizonwizard.hh
+++ b/horizonwizard.hh
@@ -4,13 +4,15 @@
#include <QWizard>
#include <set>
#include <string>
+#include <vector>
+
+#include <horizon/networkinterface.hh>
class HorizonWizard : public QWizard
{
public:
enum { Page_Welcome, /* introduction */
Page_Partition, /* partitioning */
- Page_NetworkDetect, /* detect interfaces/carriers */
Page_Networking, /* network type selection */
Page_Network_SimpleWireless, /* simple -> wifi */
Page_Network_SimpleWired, /* simple -> wired */
@@ -26,6 +28,7 @@ public:
HorizonWizard(QWidget *parent = 0);
std::set<std::string> selected;
+ std::vector<Horizon::NetworkInterface> interfaces;
};
#endif // HORIZONWIZARD_HH