summaryrefslogtreecommitdiffstats
path: root/network/connectionprofile.cpp
diff options
context:
space:
mode:
authorRaquel Medina <raquel.medina@konsulko.com>2019-09-09 00:35:55 +0200
committerraquel medina <raquel.medina@konsulko.com>2019-09-20 15:38:55 +0000
commit18dde87f580d41f6743b64b824b55d68df81aff1 (patch)
treed5666e316fc98c1d2ed70199c3309ee472c82de2 /network/connectionprofile.cpp
parentfc0369fdb69dcdcefeea80d3ddb580980e5365f4 (diff)
wired: add hooks for addressing configuration
- Add new roles to provide UI clients with the active configuration (values obtained from the stack: agl-service-network binding + connman). - Add Q_INVOKABLE methods to feed new values from the UI client. SPEC-2676 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: Id239ddc549ec8471d44d56f7631d4e9e3efda798 (cherry picked from commit 4221fd2f9e5b72090fe5c2c5f19aa16ab8bf68b8)
Diffstat (limited to 'network/connectionprofile.cpp')
-rw-r--r--network/connectionprofile.cpp61
1 files changed, 59 insertions, 2 deletions
diff --git a/network/connectionprofile.cpp b/network/connectionprofile.cpp
index 8e30e47..6fec374 100644
--- a/network/connectionprofile.cpp
+++ b/network/connectionprofile.cpp
@@ -5,9 +5,16 @@ ConnectionProfile::ConnectionProfile(const QString &address,
const QString &service,
const QString &state,
const QString &ssid,
- const int &strength)
+ const int &strength,
+ const QString &netmask,
+ const QString &gateway,
+ const QString &amethod,
+ const QString &ns,
+ const QString &nsmethod)
: m_address(address), m_security(security), m_service(service),
- m_state(state), m_ssid(ssid), m_strength(strength)
+ m_state(state), m_ssid(ssid), m_strength(strength), m_netmask(netmask),
+ m_gateway(gateway), m_addrmethod(amethod), m_nameservers(ns),
+ m_nsmethod(nsmethod)
{
}
@@ -41,6 +48,31 @@ int ConnectionProfile::strength() const
return m_strength;
}
+QString ConnectionProfile::netmask() const
+{
+ return m_netmask;
+}
+
+QString ConnectionProfile::gateway() const
+{
+ return m_gateway;
+}
+
+QString ConnectionProfile::nameservers() const
+{
+ return m_nameservers;
+}
+
+QString ConnectionProfile::addrmethod() const
+{
+ return m_addrmethod;
+}
+
+QString ConnectionProfile::nsmethod() const
+{
+ return m_nsmethod;
+}
+
void ConnectionProfile::setAddress(const QString address)
{
m_address = address;
@@ -55,3 +87,28 @@ void ConnectionProfile::setStrength(const int strength)
{
m_strength = strength;
}
+
+void ConnectionProfile::setNetmask(const QString netmask)
+{
+ m_netmask = netmask;
+}
+
+void ConnectionProfile::setGateway(const QString gateway)
+{
+ m_gateway = gateway;
+}
+
+void ConnectionProfile::setNameservers(const QString nameservers)
+{
+ m_nameservers = nameservers;
+}
+
+void ConnectionProfile::setAddrMethod(const QString method)
+{
+ m_addrmethod = method;
+}
+
+void ConnectionProfile::setNSMethod(const QString method)
+{
+ m_nsmethod = method;
+}