Changeset View
Changeset View
Standalone View
Standalone View
libs/handler.h
Show All 20 Lines | |||||
21 | #ifndef PLASMA_NM_HANDLER_H | 21 | #ifndef PLASMA_NM_HANDLER_H | ||
22 | #define PLASMA_NM_HANDLER_H | 22 | #define PLASMA_NM_HANDLER_H | ||
23 | 23 | | |||
24 | #include <QDBusInterface> | 24 | #include <QDBusInterface> | ||
25 | 25 | | |||
26 | #include <NetworkManagerQt/Connection> | 26 | #include <NetworkManagerQt/Connection> | ||
27 | #include <NetworkManagerQt/Settings> | 27 | #include <NetworkManagerQt/Settings> | ||
28 | #include <NetworkManagerQt/ConnectionSettings> | 28 | #include <NetworkManagerQt/ConnectionSettings> | ||
29 | #include <NetworkManagerQt/Utils> | ||||
29 | #if WITH_MODEMMANAGER_SUPPORT | 30 | #if WITH_MODEMMANAGER_SUPPORT | ||
30 | #include <ModemManagerQt/GenericTypes> | 31 | #include <ModemManagerQt/GenericTypes> | ||
31 | #endif | 32 | #endif | ||
32 | 33 | | |||
33 | 34 | | |||
34 | class Q_DECL_EXPORT Handler : public QObject | 35 | class Q_DECL_EXPORT Handler : public QObject | ||
35 | { | 36 | { | ||
36 | Q_OBJECT | 37 | Q_OBJECT | ||
Show All 26 Lines | 53 | public Q_SLOTS: | |||
63 | * @specificParameter - d-bus path of the accesspoint you want to connect to | 64 | * @specificParameter - d-bus path of the accesspoint you want to connect to | ||
64 | * @password - pre-filled password which should be used for the new wireless connection | 65 | * @password - pre-filled password which should be used for the new wireless connection | ||
65 | * @autoConnect - boolean value whether this connection should be activated automatically when it's available | 66 | * @autoConnect - boolean value whether this connection should be activated automatically when it's available | ||
66 | * | 67 | * | ||
67 | * Works automatically for wireless connections with WEP/WPA security, for wireless connections with WPA/WPA | 68 | * Works automatically for wireless connections with WEP/WPA security, for wireless connections with WPA/WPA | ||
68 | * it will open the connection editor for advanced configuration. | 69 | * it will open the connection editor for advanced configuration. | ||
69 | * */ | 70 | * */ | ||
70 | void addAndActivateConnection(const QString &device, const QString &specificParameter, const QString &password = QString()); | 71 | void addAndActivateConnection(const QString &device, const QString &specificParameter, const QString &password = QString()); | ||
72 | | ||||
73 | /** | ||||
broulik: Docs, coding style. | |||||
74 | * Returns a code that includes the credentials to a said wifi connection | ||||
75 | * Here's some information on how this information is created, it's generally used to put in QR codes to share. | ||||
76 | * https://github.com/zxing/zxing/wiki/Barcode-Contents#wi-fi-network-config-android-ios-11 | ||||
77 | * | ||||
78 | * @param connectionPath the d-bus path to the connection we want to read | ||||
79 | * @param ssid the name of the network being displayed | ||||
80 | * @param securityType the authentication protocol used for this specific ssid | ||||
81 | */ | ||||
82 | QString wifiCode(const QString& connectionPath, const QString& ssid, /*NetworkManager::WirelessSecurityType*/ int securityType) const; | ||||
83 | | ||||
71 | /** | 84 | /** | ||
72 | * Adds a new connection | 85 | * Adds a new connection | ||
73 | * @map - NMVariantMapMap with connection settings | 86 | * @map - NMVariantMapMap with connection settings | ||
74 | */ | 87 | */ | ||
75 | void addConnection(const NMVariantMapMap &map); | 88 | void addConnection(const NMVariantMapMap &map); | ||
76 | /** | 89 | /** | ||
77 | * Deactivates given connection | 90 | * Deactivates given connection | ||
78 | * @connection - d-bus path of the connection you want to deactivate | 91 | * @connection - d-bus path of the connection you want to deactivate | ||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |
Docs, coding style.