summaryrefslogtreecommitdiffstats
path: root/network/wifiadapter.h
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-01-28 16:54:55 -0500
committerScott Murray <scott.murray@konsulko.com>2022-01-28 17:00:09 -0500
commit5ef90db242ad29c9772f2237b477c58ef65545c7 (patch)
treef9b7b2e56a0aaec37bb9ef99faa316465613b941 /network/wifiadapter.h
parent0fee9bfb0f656b78f34c44542329760be2980892 (diff)
Re-enable network supportmarlin_12.92.0marlin/12.92.012.92.0
Rework network support code to use new connman-glib library instead of the previously disabled agl-service-network API. The only user visible change is that a few extra previously exported header files have been pruned from installation to avoid exposing GLib usage and potentially requiring users needing to build against it. Bug-AGL: SPEC-4182 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Iab8f3c9d04ee603e06b80dfd92ac03d9d52af477
Diffstat (limited to 'network/wifiadapter.h')
-rw-r--r--network/wifiadapter.h29
1 files changed, 13 insertions, 16 deletions
diff --git a/network/wifiadapter.h b/network/wifiadapter.h
index ddb44fb..f14a07c 100644
--- a/network/wifiadapter.h
+++ b/network/wifiadapter.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 Konsulko Group
+ * Copyright (C) 2019,2022 Konsulko Group
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,23 +19,21 @@
#include <QDebug>
#include <QObject>
-#include <QJsonArray>
#include <QtQml/QQmlContext>
#include "networkadapter.h"
class Network;
class WifiNetworkModel;
-
class WifiAdapter : public QObject, public AdapterIf
{
- Q_OBJECT
- Q_INTERFACES(AdapterIf)
- Q_PROPERTY(bool wifiConnected READ wifiConnected NOTIFY wifiConnectedChanged)
- Q_PROPERTY(bool wifiEnabled READ wifiEnabled NOTIFY wifiEnabledChanged)
- Q_PROPERTY(int wifiStrength READ wifiStrength NOTIFY wifiStrengthChanged)
+ Q_OBJECT
+ Q_INTERFACES(AdapterIf)
+ Q_PROPERTY(bool wifiConnected READ wifiConnected NOTIFY wifiConnectedChanged)
+ Q_PROPERTY(bool wifiEnabled READ wifiEnabled NOTIFY wifiEnabledChanged)
+ Q_PROPERTY(int wifiStrength READ wifiStrength NOTIFY wifiStrengthChanged)
- public:
+public:
explicit WifiAdapter(Network *network, QQmlContext *context, QObject *parent);
virtual ~WifiAdapter();
@@ -43,22 +41,21 @@ class WifiAdapter : public QObject, public AdapterIf
bool wifiEnabled() const { return m_wifiEnabled; }
int wifiStrength() const { return m_wifiStrength; }
- bool addService(QString id, QJsonObject properties) override;
- void removeService(QString id) override;
- void updateProperties(QString service, QJsonObject properties) override;
+ bool addService(const QString &id, const QVariantMap &properties) override;
+ void removeService(const QString &id) override;
+ void updateProperties(const QString &service, const QVariantMap &properties) override;
QString getType() override { return "wifi"; }
- void updateStatus(QJsonObject properties) override;
+ void updateStatus(const QVariantMap &properties) override;
- //slots
void updateWifiStrength(int);
- signals:
+signals:
void wifiConnectedChanged(bool connected);
void wifiEnabledChanged(bool enabled);
void wifiStrengthChanged(int strength);
- private:
+private:
bool m_wifiConnected;
bool m_wifiEnabled;
int m_wifiStrength;