Add Bluetooth options

pull/55/head
reionwong 4 years ago
parent e5f683cf5f
commit 65d2ceca00

@ -56,6 +56,10 @@ set(SRCS
src/touchpad.cpp src/touchpad.cpp
src/bluetooth/bluetoothmanager.cpp src/bluetooth/bluetoothmanager.cpp
src/bluetooth/bluetoothagent.cpp src/bluetooth/bluetoothagent.cpp
src/vpn/vpn.cpp
src/vpn/nm-l2tp-service.h
src/vpn/nm-openvpn-service.h
src/vpn/nm-pptp-service.h
# src/update/updatemodel.cpp # src/update/updatemodel.cpp
) )

@ -4,6 +4,7 @@
#include <BluezQt/InitManagerJob> #include <BluezQt/InitManagerJob>
#include <BluezQt/Adapter> #include <BluezQt/Adapter>
#include <BluezQt/Device> #include <BluezQt/Device>
#include <BluezQt/MediaPlayer>
BluetoothManager::BluetoothManager(QObject *parent) BluetoothManager::BluetoothManager(QObject *parent)
: QObject(parent) : QObject(parent)
@ -73,6 +74,35 @@ void BluetoothManager::confirmMatchButton(const bool match)
} }
} }
void BluetoothManager::deviceDisconnect(const QString address)
{
stopMediaPlayer(address);
BluezQt::AdapterPtr adaptor = m_manager->usableAdapter();
BluezQt::DevicePtr device = adaptor->deviceForAddress(address);
BluezQt::PendingCall *pairCall = device->disconnectFromDevice();
// connect(pairCall, &BluezQt::PendingCall::finished, this, &Bluetooth::disconnectFromDeviceFinished);
}
void BluetoothManager::deviceRemoved(const QString address)
{
stopMediaPlayer(address);
BluezQt::AdapterPtr adaptor = m_manager->usableAdapter();
BluezQt::DevicePtr device = adaptor->deviceForAddress(address);
BluezQt::PendingCall *removeCall = adaptor->removeDevice(device);
// connect(removeCall, &BluezQt::PendingCall::finished, this, &Bluetooth::removeDeviceFinished);
}
void BluetoothManager::stopMediaPlayer(const QString address)
{
BluezQt::AdapterPtr adaptor = m_manager->usableAdapter();
BluezQt::DevicePtr device = adaptor->deviceForAddress(address);
BluezQt::MediaPlayerPtr mediaPlayer = device->mediaPlayer();
if (mediaPlayer){
mediaPlayer->stop();
}
}
void BluetoothManager::onInitJobResult(BluezQt::InitManagerJob *job) void BluetoothManager::onInitJobResult(BluezQt::InitManagerJob *job)
{ {
if (job->error()) { if (job->error()) {

@ -17,6 +17,9 @@ public:
Q_INVOKABLE void connectToDevice(const QString address); Q_INVOKABLE void connectToDevice(const QString address);
Q_INVOKABLE void requestParingConnection(const QString address); Q_INVOKABLE void requestParingConnection(const QString address);
Q_INVOKABLE void confirmMatchButton(const bool match); Q_INVOKABLE void confirmMatchButton(const bool match);
Q_INVOKABLE void deviceDisconnect(const QString address);
Q_INVOKABLE void deviceRemoved(const QString address);
Q_INVOKABLE void stopMediaPlayer(const QString address);
signals: signals:
void showPairDialog(const QString name, const QString pin); void showPairDialog(const QString name, const QString pin);

@ -102,7 +102,7 @@ ItemPage {
id: _listView id: _listView
visible: count > 0 visible: count > 0
interactive: false interactive: false
spacing: FishUI.Units.largeSpacing spacing: 0
Layout.fillWidth: true Layout.fillWidth: true
@ -127,50 +127,108 @@ ItemPage {
delegate: Item { delegate: Item {
width: ListView.view.width width: ListView.view.width
height: _itemLayout.implicitHeight + FishUI.Units.largeSpacing * 1.5 height: _itemLayout.implicitHeight + FishUI.Units.largeSpacing
Rectangle { property bool paired: model.Connected && model.Paired
anchors.fill: parent
radius: FishUI.Theme.smallRadius onPairedChanged: {
color: FishUI.Theme.textColor if (!paired) {
opacity: mouseArea.pressed ? 0.15 : mouseArea.containsMouse ? 0.1 : 0.0 additionalSettings.hide()
}
} }
MouseArea { ColumnLayout {
id: mouseArea id: _itemLayout
anchors.fill: parent anchors.fill: parent
hoverEnabled: true anchors.leftMargin: 0
acceptedButtons: Qt.LeftButton anchors.rightMargin: 0
onClicked: { anchors.topMargin: FishUI.Units.smallSpacing
if (model.Connected && model.Paired){ anchors.bottomMargin: FishUI.Units.smallSpacing
return spacing: 0
Item {
Layout.fillWidth: true
height: _contentLayout.implicitHeight + FishUI.Units.largeSpacing
Rectangle {
anchors.fill: parent
radius: FishUI.Theme.smallRadius
color: FishUI.Theme.textColor
opacity: mouseArea.pressed ? 0.15 : mouseArea.containsMouse ? 0.1 : 0.0
} }
if (model.Paired) { MouseArea {
bluetoothMgr.connectToDevice(model.Address) id: mouseArea
} else { anchors.fill: parent
bluetoothMgr.requestParingConnection(model.Address) hoverEnabled: true
acceptedButtons: Qt.LeftButton
onClicked: {
if (model.Connected && model.Paired){
additionalSettings.toggle()
return
}
if (model.Paired) {
bluetoothMgr.connectToDevice(model.Address)
} else {
bluetoothMgr.requestParingConnection(model.Address)
}
}
} }
}
}
RowLayout { RowLayout {
id: _itemLayout id: _contentLayout
anchors.fill: parent anchors.fill: parent
spacing: FishUI.Units.largeSpacing
Image {
Image { width: 16
width: 16 height: 16
height: 16 sourceSize: Qt.size(16, 16)
sourceSize: Qt.size(16, 16) source: FishUI.Theme.darkMode ? "qrc:/images/sidebar/dark/bluetooth.svg"
source: FishUI.Theme.darkMode ? "qrc:/images/sidebar/dark/bluetooth.svg" : "qrc:/images/sidebar/light/bluetooth.svg"
: "qrc:/images/sidebar/light/bluetooth.svg" Layout.alignment: Qt.AlignVCenter
Layout.alignment: Qt.AlignVCenter }
Label {
text: model.DeviceFullName
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
}
}
} }
Label { Hideable {
text: model.DeviceFullName id: additionalSettings
Layout.fillWidth: true spacing: 0
ColumnLayout {
Item {
height: FishUI.Units.largeSpacing
}
RowLayout {
spacing: FishUI.Units.largeSpacing
Layout.leftMargin: FishUI.Units.smallSpacing
Button {
text: qsTr("Disconnect")
onClicked: {
bluetoothMgr.deviceDisconnect(model.Address)
additionalSettings.hide()
}
}
Button {
text: qsTr("Forget This Device")
flat: true
onClicked: {
bluetoothMgr.deviceRemoved(model.Address)
additionalSettings.hide()
}
}
}
}
} }
} }
} }

@ -87,6 +87,15 @@ Item {
category: qsTr("Network and connection") category: qsTr("Network and connection")
} }
ListElement {
title: qsTr("VPN")
name: "vpn"
page: "qrc:/qml/VPN/Main.qml"
iconSource: "bluetooth.svg"
iconColor: "#0067FF"
category: qsTr("Network and connection")
}
ListElement { ListElement {
title: qsTr("Display") title: qsTr("Display")
name: "display" name: "display"

@ -0,0 +1,76 @@
/*
* Copyright (C) 2021 CutefishOS Team.
*
* Author: revenmartin <revenmartin@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import FishUI 1.0 as FishUI
import Cutefish.Settings 1.0
import "../"
ItemPage {
headerTitle: qsTr("VPN")
property bool vpnConnected: false
function switchVPN(enabled) {
if (enabled) {
vpnConnected = true
} else {
vpnConnected = false
}
}
Scrollable {
anchors.fill: parent
contentHeight: layout.implicitHeight
ColumnLayout {
id: layout
anchors.fill: parent
RoundedItem {
id: mainItem
spacing: FishUI.Units.largeSpacing
RowLayout {
Label {
text: qsTr("VPN")
color: FishUI.Theme.disabledTextColor
}
Item {
Layout.fillWidth: true
}
Switch {
id: vpnSwitch
Layout.fillHeight: true
rightPadding: 0
onCheckedChanged: {}
}
}
}
Item {
height: FishUI.Units.smallSpacing
}
}
}
}

@ -171,7 +171,7 @@ Dialog {
RowLayout { RowLayout {
id: footerLayout id: footerLayout
spacing: FishUI.Theme.hugeRadius / 2 spacing: FishUI.Units.largeSpacing
Button { Button {
text: qsTr("Close") text: qsTr("Close")

@ -120,5 +120,6 @@
<file>images/logo.png</file> <file>images/logo.png</file>
<file>images/dock_straight.svg</file> <file>images/dock_straight.svg</file>
<file>qml/Bluetooth/PairDialog.qml</file> <file>qml/Bluetooth/PairDialog.qml</file>
<file>qml/VPN/Main.qml</file>
</qresource> </qresource>
</RCC> </RCC>

@ -0,0 +1,76 @@
// SPDX-License-Identifier: GPL-2.0+
/* nm-l2tp-service - L2TP VPN integration with NetworkManager
*
* Dan Williams <dcbw@redhat.com>
*
* Copyright 2008, 2014 Red Hat, Inc.
*/
#ifndef NM_L2TP_SERVICE_DEFINES_H
#define NM_L2TP_SERVICE_DEFINES_H
#define NM_DBUS_SERVICE_L2TP "org.freedesktop.NetworkManager.l2tp"
/* For the NM <-> VPN plugin service */
#define NM_DBUS_INTERFACE_L2TP "org.freedesktop.NetworkManager.l2tp"
#define NM_DBUS_PATH_L2TP "/org/freedesktop/NetworkManager/l2tp"
/* For the VPN plugin service <-> PPP plugin */
#define NM_DBUS_INTERFACE_L2TP_PPP "org.freedesktop.NetworkManager.l2tp.ppp"
#define NM_DBUS_PATH_L2TP_PPP "/org/freedesktop/NetworkManager/l2tp/ppp"
#define NM_L2TP_KEY_GATEWAY "gateway"
#define NM_L2TP_KEY_USER_AUTH_TYPE "user-auth-type"
#define NM_L2TP_KEY_USER "user"
#define NM_L2TP_KEY_PASSWORD "password"
#define NM_L2TP_KEY_DOMAIN "domain"
#define NM_L2TP_KEY_USER_CA "user-ca"
#define NM_L2TP_KEY_USER_CERT "user-cert"
#define NM_L2TP_KEY_USER_KEY "user-key"
#define NM_L2TP_KEY_USER_CERTPASS "user-certpass"
#define NM_L2TP_KEY_MTU "mtu"
#define NM_L2TP_KEY_MRU "mru"
#define NM_L2TP_KEY_REFUSE_EAP "refuse-eap"
#define NM_L2TP_KEY_REFUSE_PAP "refuse-pap"
#define NM_L2TP_KEY_REFUSE_CHAP "refuse-chap"
#define NM_L2TP_KEY_REFUSE_MSCHAP "refuse-mschap"
#define NM_L2TP_KEY_REFUSE_MSCHAPV2 "refuse-mschapv2"
#define NM_L2TP_KEY_REQUIRE_MPPE "require-mppe"
#define NM_L2TP_KEY_REQUIRE_MPPE_40 "require-mppe-40"
#define NM_L2TP_KEY_REQUIRE_MPPE_128 "require-mppe-128"
#define NM_L2TP_KEY_MPPE_STATEFUL "mppe-stateful"
#define NM_L2TP_KEY_NOBSDCOMP "nobsdcomp"
#define NM_L2TP_KEY_NODEFLATE "nodeflate"
#define NM_L2TP_KEY_NO_VJ_COMP "no-vj-comp"
#define NM_L2TP_KEY_NO_PCOMP "nopcomp"
#define NM_L2TP_KEY_NO_ACCOMP "noaccomp"
#define NM_L2TP_KEY_LCP_ECHO_FAILURE "lcp-echo-failure"
#define NM_L2TP_KEY_LCP_ECHO_INTERVAL "lcp-echo-interval"
#define NM_L2TP_KEY_UNIT_NUM "unit"
#define NM_L2TP_KEY_MACHINE_AUTH_TYPE "machine-auth-type"
#define NM_L2TP_KEY_MACHINE_CA "machine-ca"
#define NM_L2TP_KEY_MACHINE_CERT "machine-cert"
#define NM_L2TP_KEY_MACHINE_KEY "machine-key"
#define NM_L2TP_KEY_MACHINE_CERTPASS "machine-certpass"
#define NM_L2TP_KEY_IPSEC_ENABLE "ipsec-enabled"
#define NM_L2TP_KEY_IPSEC_REMOTE_ID "ipsec-remote-id"
#define NM_L2TP_KEY_IPSEC_GATEWAY_ID "ipsec-gateway-id" /* deprecated, use ipsec-remote-id */
#define NM_L2TP_KEY_IPSEC_PSK "ipsec-psk"
#define NM_L2TP_KEY_IPSEC_IKE "ipsec-ike"
#define NM_L2TP_KEY_IPSEC_ESP "ipsec-esp"
#define NM_L2TP_KEY_IPSEC_IKELIFETIME "ipsec-ikelifetime"
#define NM_L2TP_KEY_IPSEC_SALIFETIME "ipsec-salifetime"
#define NM_L2TP_KEY_IPSEC_FORCEENCAPS "ipsec-forceencaps"
#define NM_L2TP_KEY_IPSEC_IPCOMP "ipsec-ipcomp"
#define NM_L2TP_KEY_IPSEC_IKEV2 "ipsec-ikev2"
#define NM_L2TP_KEY_IPSEC_PFS "ipsec-pfs"
/* Internal auth-dialog -> service token indicating that no secrets are required
* for the connection if X.509 private keys are used with no password protection.
*/
#define NM_L2TP_KEY_NOSECRET "no-secret"
#define NM_L2TP_AUTHTYPE_PASSWORD "password"
#define NM_L2TP_AUTHTYPE_TLS "tls"
#define NM_L2TP_AUTHTYPE_PSK "psk"
#endif /* NM_L2TP_SERVICE_DEFINES_H */

@ -0,0 +1,111 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* nm-openvpn-service - openvpn integration with NetworkManager
*
* Copyright (C) 2005 - 2008 Tim Niemueller <tim@niemueller.de>
* Copyright (C) 2005 - 2008 Dan Williams <dcbw@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#ifndef NM_OPENVPN_SERVICE_H
#define NM_OPENVPN_SERVICE_H
#define NM_DBUS_SERVICE_OPENVPN "org.freedesktop.NetworkManager.openvpn"
#define NM_DBUS_INTERFACE_OPENVPN "org.freedesktop.NetworkManager.openvpn"
#define NM_DBUS_PATH_OPENVPN "/org/freedesktop/NetworkManager/openvpn"
#define NM_OPENVPN_KEY_AUTH "auth"
#define NM_OPENVPN_KEY_CA "ca"
#define NM_OPENVPN_KEY_CERT "cert"
#define NM_OPENVPN_KEY_CIPHER "cipher"
#define NM_OPENVPN_KEY_KEYSIZE "keysize"
#define NM_OPENVPN_KEY_COMP_LZO "comp-lzo"
#define NM_OPENVPN_KEY_CONNECTION_TYPE "connection-type"
#define NM_OPENVPN_KEY_FLOAT "float"
#define NM_OPENVPN_KEY_FRAGMENT_SIZE "fragment-size"
#define NM_OPENVPN_KEY_KEY "key"
#define NM_OPENVPN_KEY_LOCAL_IP "local-ip" /* ??? */
#define NM_OPENVPN_KEY_MSSFIX "mssfix"
#define NM_OPENVPN_KEY_NS_CERT_TYPE "ns-cert-type"
#define NM_OPENVPN_KEY_PING "ping"
#define NM_OPENVPN_KEY_PING_EXIT "ping-exit"
#define NM_OPENVPN_KEY_PING_RESTART "ping-restart"
#define NM_OPENVPN_KEY_PORT "port"
#define NM_OPENVPN_KEY_PROTO_TCP "proto-tcp"
#define NM_OPENVPN_KEY_PROXY_TYPE "proxy-type"
#define NM_OPENVPN_KEY_PROXY_SERVER "proxy-server"
#define NM_OPENVPN_KEY_PROXY_PORT "proxy-port"
#define NM_OPENVPN_KEY_PROXY_RETRY "proxy-retry"
#define NM_OPENVPN_KEY_HTTP_PROXY_USERNAME "http-proxy-username"
#define NM_OPENVPN_KEY_REMOTE "remote"
#define NM_OPENVPN_KEY_REMOTE_RANDOM "remote-random"
#define NM_OPENVPN_KEY_REMOTE_IP "remote-ip"
#define NM_OPENVPN_KEY_STATIC_KEY "static-key"
#define NM_OPENVPN_KEY_STATIC_KEY_DIRECTION "static-key-direction"
#define NM_OPENVPN_KEY_TA "ta"
#define NM_OPENVPN_KEY_TA_DIR "ta-dir"
#define NM_OPENVPN_KEY_TUNNEL_MTU "tunnel-mtu"
#define NM_OPENVPN_KEY_USERNAME "username"
#define NM_OPENVPN_KEY_TAP_DEV "tap-dev"
#define NM_OPENVPN_KEY_DEV "dev"
#define NM_OPENVPN_KEY_DEV_TYPE "dev-type"
#define NM_OPENVPN_KEY_TUN_IPV6 "tun-ipv6"
#define NM_OPENVPN_KEY_TLS_CIPHER "tls-cipher"
#define NM_OPENVPN_KEY_TLS_CRYPT "tls-crypt"
#define NM_OPENVPN_KEY_TLS_REMOTE "tls-remote"
#define NM_OPENVPN_KEY_VERIFY_X509_NAME "verify-x509-name"
#define NM_OPENVPN_KEY_REMOTE_CERT_TLS "remote-cert-tls"
#define NM_OPENVPN_KEY_MAX_ROUTES "max-routes"
#define NM_OPENVPN_KEY_PASSWORD "password"
#define NM_OPENVPN_KEY_CERTPASS "cert-pass"
#define NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD "http-proxy-password"
/* Internal auth-dialog -> service token indicating that no secrets are
* required for the connection.
*/
#define NM_OPENVPN_KEY_NOSECRET "no-secret"
#define NM_OPENVPN_KEY_RENEG_SECONDS "reneg-seconds"
#define NM_OPENVPN_AUTH_NONE "none"
#define NM_OPENVPN_AUTH_RSA_MD4 "RSA-MD4"
#define NM_OPENVPN_AUTH_MD5 "MD5"
#define NM_OPENVPN_AUTH_SHA1 "SHA1"
#define NM_OPENVPN_AUTH_SHA224 "SHA224"
#define NM_OPENVPN_AUTH_SHA256 "SHA256"
#define NM_OPENVPN_AUTH_SHA384 "SHA384"
#define NM_OPENVPN_AUTH_SHA512 "SHA512"
#define NM_OPENVPN_AUTH_RIPEMD160 "RIPEMD160"
#define NM_OPENVPN_CONTYPE_TLS "tls"
#define NM_OPENVPN_CONTYPE_STATIC_KEY "static-key"
#define NM_OPENVPN_CONTYPE_PASSWORD "password"
#define NM_OPENVPN_CONTYPE_PASSWORD_TLS "password-tls"
/* arguments of "--remote-cert-tls" */
#define NM_OPENVPN_REM_CERT_TLS_CLIENT "client"
#define NM_OPENVPN_REM_CERT_TLS_SERVER "server"
/* arguments of "--ns-cert-type" */
#define NM_OPENVPN_NS_CERT_TYPE_CLIENT "client"
#define NM_OPENVPN_NS_CERT_TYPE_SERVER "server"
/* possible types for verify-x509-name */
#define NM_OPENVPN_VERIFY_X509_NAME_TYPE_SUBJECT "subject"
#define NM_OPENVPN_VERIFY_X509_NAME_TYPE_NAME "name"
#define NM_OPENVPN_VERIFY_X509_NAME_TYPE_NAME_PREFIX "name-prefix"
#endif /* NM_OPENVPN_SERVICE_H */

@ -0,0 +1,56 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* nm-pptp-service - PPTP VPN integration with NetworkManager
*
* Dan Williams <dcbw@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* (C) Copyright 2008 Red Hat, Inc. //krazy:exclude=copyright
*/
#ifndef NM_PPTP_SERVICE_H
#define NM_PPTP_SERVICE_H
#define NM_DBUS_SERVICE_PPTP_PPP "org.freedesktop.NetworkManager.pptp-ppp"
#define NM_DBUS_PATH_PPTP_PPP "/org/freedesktop/NetworkManager/pptp/ppp"
#define NM_DBUS_INTERFACE_PPTP_PPP "org.freedesktop.NetworkManager.pptp.ppp"
/* For the NM <-> VPN plugin service */
#define NM_DBUS_SERVICE_PPTP "org.freedesktop.NetworkManager.pptp"
#define NM_DBUS_INTERFACE_PPTP "org.freedesktop.NetworkManager.pptp"
#define NM_DBUS_PATH_PPTP "/org/freedesktop/NetworkManager/pptp"
#define NM_PPTP_KEY_GATEWAY "gateway"
#define NM_PPTP_KEY_USER "user"
#define NM_PPTP_KEY_PASSWORD "password"
#define NM_PPTP_KEY_DOMAIN "domain"
#define NM_PPTP_KEY_REFUSE_EAP "refuse-eap"
#define NM_PPTP_KEY_REFUSE_PAP "refuse-pap"
#define NM_PPTP_KEY_REFUSE_CHAP "refuse-chap"
#define NM_PPTP_KEY_REFUSE_MSCHAP "refuse-mschap"
#define NM_PPTP_KEY_REFUSE_MSCHAPV2 "refuse-mschapv2"
#define NM_PPTP_KEY_REQUIRE_MPPE "require-mppe"
#define NM_PPTP_KEY_REQUIRE_MPPE_40 "require-mppe-40"
#define NM_PPTP_KEY_REQUIRE_MPPE_128 "require-mppe-128"
#define NM_PPTP_KEY_MPPE_STATEFUL "mppe-stateful"
#define NM_PPTP_KEY_NOBSDCOMP "nobsdcomp"
#define NM_PPTP_KEY_NODEFLATE "nodeflate"
#define NM_PPTP_KEY_NO_VJ_COMP "no-vj-comp"
#define NM_PPTP_KEY_LCP_ECHO_FAILURE "lcp-echo-failure"
#define NM_PPTP_KEY_LCP_ECHO_INTERVAL "lcp-echo-interval"
#endif /* NM_PPTP_PLUGIN_H */

@ -0,0 +1,28 @@
#include "vpn.h"
#include <NetworkManagerQt/Manager>
#include <NetworkManagerQt/AccessPoint>
#include <NetworkManagerQt/WiredDevice>
#include <NetworkManagerQt/WirelessDevice>
#include <NetworkManagerQt/Settings>
#include <NetworkManagerQt/Setting>
#include <NetworkManagerQt/Connection>
#include <NetworkManagerQt/Utils>
#include <NetworkManagerQt/ConnectionSettings>
#include <NetworkManagerQt/GsmSetting>
#include <NetworkManagerQt/WiredSetting>
#include <NetworkManagerQt/WirelessSetting>
#include <NetworkManagerQt/ActiveConnection>
#include <NetworkManagerQt/Ipv4Setting>
#include <NetworkManagerQt/VpnSetting>
VPN::VPN(QObject *parent)
: QObject(parent)
{
}
void VPN::activateVPNConnection(const QString &connection, const QString &device, const QString &specificObject)
{
}

@ -0,0 +1,16 @@
#ifndef VPN_H
#define VPN_H
#include <QObject>
class VPN : public QObject
{
Q_OBJECT
public:
explicit VPN(QObject *parent = nullptr);
Q_INVOKABLE void activateVPNConnection(const QString &connection, const QString &device, const QString &specificParameter);
};
#endif // VPN_H

@ -468,20 +468,30 @@
</message> </message>
<message> <message>
<location filename="../src/qml/Bluetooth/Main.qml" line="30"/> <location filename="../src/qml/Bluetooth/Main.qml" line="30"/>
<location filename="../src/qml/Bluetooth/Main.qml" line="97"/> <location filename="../src/qml/Bluetooth/Main.qml" line="84"/>
<source>Bluetooth</source> <source>Bluetooth</source>
<translation type="unfinished">Bluetooth</translation> <translation type="unfinished">Bluetooth</translation>
</message> </message>
<message> <message>
<location filename="../src/qml/Bluetooth/Main.qml" line="137"/> <location filename="../src/qml/Bluetooth/Main.qml" line="124"/>
<source>Connected devices</source> <source>Connected devices</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/Bluetooth/Main.qml" line="138"/> <location filename="../src/qml/Bluetooth/Main.qml" line="125"/>
<source>Available devices</source> <source>Available devices</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../src/qml/Bluetooth/Main.qml" line="215"/>
<source>Disconnect</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Bluetooth/Main.qml" line="223"/>
<source>Forget This Device</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../src/qml/Wired/Main.qml" line="32"/> <location filename="../src/qml/Wired/Main.qml" line="32"/>
<location filename="../src/qml/Wired/Main.qml" line="80"/> <location filename="../src/qml/Wired/Main.qml" line="80"/>
@ -606,6 +616,12 @@
<source>Pointer acceleration</source> <source>Pointer acceleration</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../src/qml/VPN/Main.qml" line="28"/>
<location filename="../src/qml/VPN/Main.qml" line="54"/>
<source>VPN</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>PairDialog</name> <name>PairDialog</name>
@ -656,12 +672,12 @@
<context> <context>
<name>SideBar</name> <name>SideBar</name>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="136"/> <location filename="../src/qml/SideBar.qml" line="145"/>
<source>User</source> <source>User</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="91"/> <location filename="../src/qml/SideBar.qml" line="100"/>
<source>Display</source> <source>Display</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -674,6 +690,7 @@
<location filename="../src/qml/SideBar.qml" line="60"/> <location filename="../src/qml/SideBar.qml" line="60"/>
<location filename="../src/qml/SideBar.qml" line="69"/> <location filename="../src/qml/SideBar.qml" line="69"/>
<location filename="../src/qml/SideBar.qml" line="87"/> <location filename="../src/qml/SideBar.qml" line="87"/>
<location filename="../src/qml/SideBar.qml" line="96"/>
<source>Network and connection</source> <source>Network and connection</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -683,26 +700,26 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="96"/>
<location filename="../src/qml/SideBar.qml" line="105"/> <location filename="../src/qml/SideBar.qml" line="105"/>
<location filename="../src/qml/SideBar.qml" line="114"/> <location filename="../src/qml/SideBar.qml" line="114"/>
<location filename="../src/qml/SideBar.qml" line="123"/> <location filename="../src/qml/SideBar.qml" line="123"/>
<location filename="../src/qml/SideBar.qml" line="132"/> <location filename="../src/qml/SideBar.qml" line="132"/>
<location filename="../src/qml/SideBar.qml" line="141"/>
<source>Display and appearance</source> <source>Display and appearance</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="100"/> <location filename="../src/qml/SideBar.qml" line="109"/>
<source>Appearance</source> <source>Appearance</source>
<translation type="unfinished">Appearance</translation> <translation type="unfinished">Appearance</translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="145"/> <location filename="../src/qml/SideBar.qml" line="154"/>
<source>Mouse</source> <source>Mouse</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="109"/> <location filename="../src/qml/SideBar.qml" line="118"/>
<source>Fonts</source> <source>Fonts</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -712,54 +729,59 @@
<translation type="unfinished">Bluetooth</translation> <translation type="unfinished">Bluetooth</translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="118"/> <location filename="../src/qml/SideBar.qml" line="91"/>
<source>Background</source> <source>VPN</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="127"/> <location filename="../src/qml/SideBar.qml" line="127"/>
<source>Background</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="136"/>
<source>Dock</source> <source>Dock</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="141"/>
<location filename="../src/qml/SideBar.qml" line="150"/> <location filename="../src/qml/SideBar.qml" line="150"/>
<location filename="../src/qml/SideBar.qml" line="159"/> <location filename="../src/qml/SideBar.qml" line="159"/>
<location filename="../src/qml/SideBar.qml" line="177"/> <location filename="../src/qml/SideBar.qml" line="168"/>
<location filename="../src/qml/SideBar.qml" line="195"/> <location filename="../src/qml/SideBar.qml" line="186"/>
<location filename="../src/qml/SideBar.qml" line="204"/> <location filename="../src/qml/SideBar.qml" line="204"/>
<location filename="../src/qml/SideBar.qml" line="213"/> <location filename="../src/qml/SideBar.qml" line="213"/>
<location filename="../src/qml/SideBar.qml" line="222"/> <location filename="../src/qml/SideBar.qml" line="222"/>
<location filename="../src/qml/SideBar.qml" line="231"/>
<source>System</source> <source>System</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="154"/> <location filename="../src/qml/SideBar.qml" line="163"/>
<source>Touchpad</source> <source>Touchpad</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="172"/> <location filename="../src/qml/SideBar.qml" line="181"/>
<source>Date &amp; Time</source> <source>Date &amp; Time</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="190"/> <location filename="../src/qml/SideBar.qml" line="199"/>
<source>Language</source> <source>Language</source>
<translation type="unfinished">Language</translation> <translation type="unfinished">Language</translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="199"/> <location filename="../src/qml/SideBar.qml" line="208"/>
<source>Battery</source> <source>Battery</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="208"/> <location filename="../src/qml/SideBar.qml" line="217"/>
<source>Power</source> <source>Power</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="217"/> <location filename="../src/qml/SideBar.qml" line="226"/>
<source>About</source> <source>About</source>
<translation type="unfinished">About</translation> <translation type="unfinished">About</translation>
</message> </message>

@ -468,20 +468,30 @@
</message> </message>
<message> <message>
<location filename="../src/qml/Bluetooth/Main.qml" line="30"/> <location filename="../src/qml/Bluetooth/Main.qml" line="30"/>
<location filename="../src/qml/Bluetooth/Main.qml" line="97"/> <location filename="../src/qml/Bluetooth/Main.qml" line="84"/>
<source>Bluetooth</source> <source>Bluetooth</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/Bluetooth/Main.qml" line="137"/> <location filename="../src/qml/Bluetooth/Main.qml" line="124"/>
<source>Connected devices</source> <source>Connected devices</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/Bluetooth/Main.qml" line="138"/> <location filename="../src/qml/Bluetooth/Main.qml" line="125"/>
<source>Available devices</source> <source>Available devices</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../src/qml/Bluetooth/Main.qml" line="215"/>
<source>Disconnect</source>
<translation></translation>
</message>
<message>
<location filename="../src/qml/Bluetooth/Main.qml" line="223"/>
<source>Forget This Device</source>
<translation></translation>
</message>
<message> <message>
<location filename="../src/qml/Wired/Main.qml" line="32"/> <location filename="../src/qml/Wired/Main.qml" line="32"/>
<location filename="../src/qml/Wired/Main.qml" line="80"/> <location filename="../src/qml/Wired/Main.qml" line="80"/>
@ -606,6 +616,12 @@
<source>Pointer acceleration</source> <source>Pointer acceleration</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../src/qml/VPN/Main.qml" line="28"/>
<location filename="../src/qml/VPN/Main.qml" line="54"/>
<source>VPN</source>
<translation>VPN</translation>
</message>
</context> </context>
<context> <context>
<name>PairDialog</name> <name>PairDialog</name>
@ -656,7 +672,7 @@
<context> <context>
<name>SideBar</name> <name>SideBar</name>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="91"/> <location filename="../src/qml/SideBar.qml" line="100"/>
<source>Display</source> <source>Display</source>
<translation></translation> <translation></translation>
</message> </message>
@ -664,6 +680,7 @@
<location filename="../src/qml/SideBar.qml" line="60"/> <location filename="../src/qml/SideBar.qml" line="60"/>
<location filename="../src/qml/SideBar.qml" line="69"/> <location filename="../src/qml/SideBar.qml" line="69"/>
<location filename="../src/qml/SideBar.qml" line="87"/> <location filename="../src/qml/SideBar.qml" line="87"/>
<location filename="../src/qml/SideBar.qml" line="96"/>
<source>Network and connection</source> <source>Network and connection</source>
<translation></translation> <translation></translation>
</message> </message>
@ -673,41 +690,41 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="96"/>
<location filename="../src/qml/SideBar.qml" line="105"/> <location filename="../src/qml/SideBar.qml" line="105"/>
<location filename="../src/qml/SideBar.qml" line="114"/> <location filename="../src/qml/SideBar.qml" line="114"/>
<location filename="../src/qml/SideBar.qml" line="123"/> <location filename="../src/qml/SideBar.qml" line="123"/>
<location filename="../src/qml/SideBar.qml" line="132"/> <location filename="../src/qml/SideBar.qml" line="132"/>
<location filename="../src/qml/SideBar.qml" line="141"/>
<source>Display and appearance</source> <source>Display and appearance</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="100"/> <location filename="../src/qml/SideBar.qml" line="109"/>
<source>Appearance</source> <source>Appearance</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="145"/> <location filename="../src/qml/SideBar.qml" line="154"/>
<source>Mouse</source> <source>Mouse</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="109"/> <location filename="../src/qml/SideBar.qml" line="118"/>
<source>Fonts</source> <source>Fonts</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="127"/> <location filename="../src/qml/SideBar.qml" line="136"/>
<source>Dock</source> <source>Dock</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="136"/> <location filename="../src/qml/SideBar.qml" line="145"/>
<source>User</source> <source>User</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="118"/> <location filename="../src/qml/SideBar.qml" line="127"/>
<source>Background</source> <source>Background</source>
<translation></translation> <translation></translation>
</message> </message>
@ -722,44 +739,49 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="141"/> <location filename="../src/qml/SideBar.qml" line="91"/>
<source>VPN</source>
<translation>VPN</translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="150"/> <location filename="../src/qml/SideBar.qml" line="150"/>
<location filename="../src/qml/SideBar.qml" line="159"/> <location filename="../src/qml/SideBar.qml" line="159"/>
<location filename="../src/qml/SideBar.qml" line="177"/> <location filename="../src/qml/SideBar.qml" line="168"/>
<location filename="../src/qml/SideBar.qml" line="195"/> <location filename="../src/qml/SideBar.qml" line="186"/>
<location filename="../src/qml/SideBar.qml" line="204"/> <location filename="../src/qml/SideBar.qml" line="204"/>
<location filename="../src/qml/SideBar.qml" line="213"/> <location filename="../src/qml/SideBar.qml" line="213"/>
<location filename="../src/qml/SideBar.qml" line="222"/> <location filename="../src/qml/SideBar.qml" line="222"/>
<location filename="../src/qml/SideBar.qml" line="231"/>
<source>System</source> <source>System</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="154"/> <location filename="../src/qml/SideBar.qml" line="163"/>
<source>Touchpad</source> <source>Touchpad</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="172"/> <location filename="../src/qml/SideBar.qml" line="181"/>
<source>Date &amp; Time</source> <source>Date &amp; Time</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="190"/> <location filename="../src/qml/SideBar.qml" line="199"/>
<source>Language</source> <source>Language</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="199"/> <location filename="../src/qml/SideBar.qml" line="208"/>
<source>Battery</source> <source>Battery</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="208"/> <location filename="../src/qml/SideBar.qml" line="217"/>
<source>Power</source> <source>Power</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/SideBar.qml" line="217"/> <location filename="../src/qml/SideBar.qml" line="226"/>
<source>About</source> <source>About</source>
<translation></translation> <translation></translation>
</message> </message>

Loading…
Cancel
Save