GlobalProtect-openconnect/GPClient/vpn_dbus.h
Kevin Yue 57df34fd1e
Prepare release 1.4.3 (#149)
* add inih

* add configuration file for gpservice

* Disable the UI configuration for extra args

* remove VERSION_SUFFIX

* remove ppa-publish.sh

* Use Git repo as the source for PKGBUILD

* remove VERSION_SUFFIX

* Use Git repo as the source for PKGBUILD

* add .install for PKGBUILD

* add configuration file

* Fix cmake

* Fix cmake

* Disable snap job

* update AUR packaging

* Disable the UI configuration for extra args

* improve packaging script

* update README.md

* restart gpservice after package upgrading
2022-05-09 21:58:58 +08:00

34 lines
1.0 KiB
C++

#ifndef VPN_DBUS_H
#define VPN_DBUS_H
#include "vpn.h"
#include "gpserviceinterface.h"
class VpnDbus : public QObject, public IVpn
{
Q_OBJECT
Q_INTERFACES(IVpn)
private:
com::yuezk::qt::GPService *inner;
public:
VpnDbus(QObject *parent) : QObject(parent) {
inner = new com::yuezk::qt::GPService("com.yuezk.qt.GPService", "/", QDBusConnection::systemBus(), this);
QObject::connect(inner, &com::yuezk::qt::GPService::connected, this, &VpnDbus::connected);
QObject::connect(inner, &com::yuezk::qt::GPService::disconnected, this, &VpnDbus::disconnected);
QObject::connect(inner, &com::yuezk::qt::GPService::error, this, &VpnDbus::error);
QObject::connect(inner, &com::yuezk::qt::GPService::logAvailable, this, &VpnDbus::logAvailable);
}
void connect(const QString &preferredServer, const QList<QString> &servers, const QString &username, const QString &passwd);
void disconnect();
int status();
signals: // SIGNALS
void connected();
void disconnected();
void error(QString errorMessage);
void logAvailable(QString log);
};
#endif