summaryrefslogtreecommitdiffstats
path: root/network/wirednetworkmodel.h
diff options
context:
space:
mode:
authorRaquel Medina <raquel.medina@konsulko.com>2019-06-17 19:39:23 +0200
committerraquel medina <raquel.medina@konsulko.com>2019-06-18 11:20:43 +0000
commite89c4886888a322a21cf7c89c1ee2864dbb4e815 (patch)
tree1f943c3afd60bf56f79d4e28803ffe1aca55f654 /network/wirednetworkmodel.h
parent9d896c9c8f5622370362091f38bbc5d1f4189901 (diff)
network: add wired adapter & model
-Add WiredAdapter implementation -Add WiredNetworkModel implementation Bug-AGL: SPEC-2293 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: Ibed93ae3a3cca1bc8e7a23c872c7ab3b8271e586
Diffstat (limited to 'network/wirednetworkmodel.h')
-rw-r--r--network/wirednetworkmodel.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/network/wirednetworkmodel.h b/network/wirednetworkmodel.h
new file mode 100644
index 0000000..b73fa3f
--- /dev/null
+++ b/network/wirednetworkmodel.h
@@ -0,0 +1,28 @@
+#ifndef WIRED_NETWORK_MODEL_H
+#define WIRED_NETWORK_MODEL_H
+
+#include "abstractnetworkmodel.h"
+
+class WiredNetworkModel : public AbstractNetworkModel
+{
+ Q_OBJECT
+
+ public:
+ enum WiredNetworkRoles {
+ AddressRole = Qt::UserRole + 1,
+ SecurityRole,
+ ServiceRole,
+ StateRole,
+ };
+
+ WiredNetworkModel(QObject *parent = Q_NULLPTR);
+
+ QString getType() const override { return "wired"; }
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
+ void updateProperties(QString service, QJsonObject properties) override;
+
+ protected:
+ QHash<int, QByteArray> roleNames() const;
+
+};
+#endif // WIRED_NETWORK_MODEL_H