/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright (C) 2016 Simon Stürz * * * * This file is part of loopd. * * * * Loopd can not be copied and/or distributed without the express * * permission of guh GmbH. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef WIRELESSACCESSPOINT_H #define WIRELESSACCESSPOINT_H #include #include #include #include #include #include #include class WirelessAccessPoint : public QObject { Q_OBJECT Q_FLAGS(ApSecurityModes) public: enum ApSecurityMode{ ApSecurityModeNone = 0x000, ApSecurityModePairWep40 = 0x001, ApSecurityModePairWep104 = 0x002, ApSecurityModePairTkip = 0x004, ApSecurityModePairCcmp = 0x008, ApSecurityModeGroupWep40 = 0x010, ApSecurityModeGroupWep104 = 0x020, ApSecurityModeGroupTkip = 0x040, ApSecurityModeGroupCcmp = 0x080, ApSecurityModeKeyMgmtPsk = 0x100, ApSecurityModeKeyMgmt8021X = 0x200, }; Q_DECLARE_FLAGS(ApSecurityModes, ApSecurityMode) explicit WirelessAccessPoint(const QDBusObjectPath &objectPath, QObject *parent = 0); QDBusObjectPath objectPath() const; QString ssid() const; QString macAddress() const; double frequency() const; int signalStrength() const; bool isProtected() const; WirelessAccessPoint::ApSecurityModes securityFlags() const; private: QDBusObjectPath m_objectPath; QString m_ssid; QString m_macAddress; double m_frequency; int m_signalStrength; bool m_isProtected; WirelessAccessPoint::ApSecurityModes m_securityFlags; void setSsid(const QString &ssid); void setMacAddress(const QString &macAddress); void setFrequency(const double &frequency); void setSignalStrength(const int &signalStrength); void setIsProtected(const bool &isProtected); void setSecurityFlags(const WirelessAccessPoint::ApSecurityModes &securityFlags); signals: void signalStrengthChanged(); private slots: void onPropertiesChanged(const QVariantMap &properties); }; QDebug operator<<(QDebug debug, WirelessAccessPoint *accessPoint); #endif // WIRELESSACCESSPOINT_H